![]() |
m2mb API docs
25.30.003
m2mb API sets documentation
|
Header file for m2mb_backup APIs. More...
Go to the source code of this file.
Typedefs | |
| typedef void * | M2MB_BACKUP_HANDLE |
| typedef void(* | m2mb_backup_ind_callback) (M2MB_BACKUP_HANDLE h, M2MB_BACKUP_EVT_E backup_event, UINT16 resp_size, void *resp_struct, void *userdata) |
Enumerations | |
| enum | M2MB_BACKUP_EVT_E { M2MB_BACKUP_EVENT_DUMMY } |
Functions | |
| M2MB_RESULT_E | m2mb_backup_init (M2MB_BACKUP_HANDLE *pHandle, m2mb_backup_ind_callback callback, void *userdata) |
| m2mb_backup_init initializes the backup system More... | |
| M2MB_RESULT_E | m2mb_backup_deinit (M2MB_BACKUP_HANDLE handle) |
| m2mb_backup_deinit deinitializes the backup management system More... | |
| M2MB_RESULT_E | m2mb_backup_get_enable (M2MB_BACKUP_HANDLE handle, BOOLEAN *isEnabled) |
| m2mb_backup_get_enable verifies if the backup system is enabled More... | |
| M2MB_RESULT_E | m2mb_backup_set_enable (M2MB_BACKUP_HANDLE handle, BOOLEAN isEnabled) |
| m2mb_backup_set_enable enables or disables backup. More... | |
Header file for m2mb_backup APIs.
m2m/m2m_common/m2mb_inc/m2mb_backup.h
m2mb_backup APIs provide actions and events for file backup management. When the user enables the backup, after reboot, the system verify if the FIRST user application has been backuped. If not, the system verify if the CRC of the file in filesystem is correct and if yes, it backs up the user application in a specific nand sector. Every time at boot the system verify if the user application in filesystem is correct, and if not, it restores the application present in nand. The first user application is that has the lower delay in ini file (appcfg.ini).
@notes
| M2MB_RESULT_E m2mb_backup_deinit | ( | M2MB_BACKUP_HANDLE | handle | ) |
m2mb_backup_deinit deinitializes the backup management system
It returns a NULL pointer for a specific handle, and in case of last handle has to be freed, it frees the main handle
| [in] | handle | It is the handle to the backup service, that will be freed by the function. |
m2mb_backup_deinit(h);
| M2MB_RESULT_E m2mb_backup_get_enable | ( | M2MB_BACKUP_HANDLE | handle, |
| BOOLEAN * | isEnabled | ||
| ) |
m2mb_backup_get_enable verifies if the backup system is enabled
It returns information about enabling backup system
| [in] | handle | It is the handle to the backup service, that will be freed by the function. |
| [out] | *isEnabled | It is the pointer where information about enabling will be stored |
m2mb_backup_get_enable(h);
| M2MB_RESULT_E m2mb_backup_init | ( | M2MB_BACKUP_HANDLE * | pHandle, |
| m2mb_backup_ind_callback | callback, | ||
| void * | userdata | ||
| ) |
m2mb_backup_init initializes the backup system
m2mb_backup_init initializes the backup handle and the backup state machine
| [out] | *pHandle | It is the handle to the backup service, that will be initialized by the function. |
| [in] | callback | It is the callback that will be called if an event or a response happens. In this case is a dummy callback, it will never be called. |
| [in] | *userdata | It is a pointer to generic user data that will be returned as it is in the callback. As the callback, it is a dummy parameter. |
m2mb_backup_init(&h);
| M2MB_RESULT_E m2mb_backup_set_enable | ( | M2MB_BACKUP_HANDLE | handle, |
| BOOLEAN | isEnabled | ||
| ) |
m2mb_backup_set_enable enables or disables backup.
In order to apply that value the system must be rebooted
| [in] | handle | It is the handle to the backup service, that will be freed by the function. |
| [in] | isEnabled | It is the enable/disable of backup system |
m2mb_backup_set_enable(h);