![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs to perform various RTC operations. More...
This section describes the M2MB APIs to perform various RTC operations.
#define M2MB_RTC_CLIENT_NOT_FOUND ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 6))) |
Definition at line 59 of file m2mb_rtc_mem.h.
#define M2MB_RTC_DRIVER_NOT_INITIALIZED ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 4))) |
Definition at line 57 of file m2mb_rtc_mem.h.
#define M2MB_RTC_ERROR ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 9))) |
Definition at line 62 of file m2mb_rtc_mem.h.
#define M2MB_RTC_FATAL_ERROR ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 10))) |
Definition at line 63 of file m2mb_rtc_mem.h.
#define M2MB_RTC_INVALID_BUFFER ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 1))) |
Definition at line 54 of file m2mb_rtc_mem.h.
#define M2MB_RTC_INVALID_CALL_SEQUENCE ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 7))) |
Definition at line 60 of file m2mb_rtc_mem.h.
#define M2MB_RTC_INVALID_CLIENT_ID ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 3))) |
Definition at line 56 of file m2mb_rtc_mem.h.
#define M2MB_RTC_INVALID_POOL_ID ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 2))) |
Definition at line 55 of file m2mb_rtc_mem.h.
#define M2MB_RTC_OUT_OF_MEMORY ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 8))) |
Definition at line 61 of file m2mb_rtc_mem.h.
#define M2MB_RTC_POOL_NOT_INITIALIZED ((M2MB_STATUS_T)(__M2MB_ERROR(M2MB_MOD_BASE, 5))) |
Definition at line 58 of file m2mb_rtc_mem.h.
Allocate Buffer in RTC memory.
This function is called by clients who need to save data before the framework decides to do a Operating Mode [OM] transition. The Pool from which the buffer is requested is assumed to be retained across the pending Mode Transition. The client will get a valid handle to a buffer in the pool, if the allocation succeeds. These resources are releases in the m2mb_rtc_mem_free.
[in] | client_id | Unique client ID corresponding to the caller. |
[in] | buffer_size | Size of the buffer requested by the client in Bytes. Max Buffer size requested limited to 2^16 Bytes |
[out] | buffer_ptr | Valid handle to the buffer if the allocation is successful. If not successful handle will be NULL. |
Example
Free the previously alloctaed buffer in RTC memory.
De-initialize and frees the resources allocated through m2mb_rtc_mem_alloc API.
[in] | client_id | Unique client ID corresponding to the caller. |
Example
Read data from RTC memory.
This function is called by clients to retrieve data saved in a Pool before performing Operating Mode transition. The client will get a valid handle to a buffer in the pool, and size of the buffer, if the allocation was valid. The client can then copy over the data to their local memory.
[in] | client_id | Unique client ID corresponding to the caller. |
[out] | buffer_size | Returns the size of the buffer orinally allocated to the client through m2mb_rtc_mem_alloc |
[out] | buffer_ptr | Valid handle to the buffer if the allocation is successful. If not successful handle will be NULL. |
Example
Save data in RTC memory.
This function is called by client after they have copied the data that needs to be saved to the buffer allocated through m2mb_rtc_mem_alloc or through m2mb_rtc_mem_read. After OM transition clients can retrieve data from their buffer and either close the buffer through ( m2mb_rtc_mem_free ) or again commit the data after data manipulation.
[in] | client_id | Unique client ID corresponding to the caller. |
Example