# RTC_SetAlarmStatusAsync

## Syntax

  `#include <nitro/rtc.h>`

      RTCResult RTC_SetAlarmStatusAsync(
                  RTCAlarmChan	        chan,
                  const RTCAlarmStatus*	status,
                  RTCCallback			callback,
                  void*			arg );

## Arguments

chan | Uses `RTCAlarmChan` to specify the alarm channel.
status | Pointer to `RTCAlarmStatus` containing status to set.
callback | Pointer to the callback function. This callback is called from within the interrupt handler.
arg | Argument to pass to the callback function.

## Return Values

If the request succeeds, it returns 0. If the request fails, it returns a numeric value other than 0.

## Description

This function asynchronously writes alarm permission status for the real-time clock. It sends a request to ARM7 to allow alarm permissions and returns the process result without waiting for a response from the processor. To get the result from the processor, you must use the `result` argument. If this function fails, no operation is performed and no user callback function is called.

## Note

In write alarm state, do not set to any state other than enable or prohibit. Values are written to the variable specified by the `status` argument asynchronously. Do not use this variable for anything else until a user callback function confirms the completion of this operation.

## See Also

`RTC_SetAlarmStatus, RTC_GetAlarmStatus, RTC_GetAlarmStatusAsync, RTCResult, RTCAlarmChan, RTCAlarmStatus, RTCCallback`

## Revision History

2005/06/27 Added a statement about callbacks being invoked from the interrupt handler.
2005/03/08 Standardized use of the term "interrupt" in Japanese.
2004/05/18 Initial version.

CONFIDENTIAL