![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs related to XFP module. More...
#define | XFP_OPERATION_IN_PROGRESS 0 |
#define | XFP_OPERATION_BOOTCHARS_DETECTED 1 |
#define | XFP_OPERATION_DONE 2 |
#define | XFP_OPERATION_FAILED 3 |
typedef M2MB_OS_RESULT_E(* | xfp_io_write) (UINT8 *p, UINT32 length) |
IO write callback for XFP. More... | |
typedef VOID(* | fwup_xfp_user_cb) (UINT32 response_code) |
This function prototype is Firmware Upgrade callback for XFP user. More... | |
INT32 | m2mb_xfp_open (xfp_io_write io_write_cb, M2MB_FWUP_USER_CB_T user_cb, void *user_cb_ctx) |
m2mb_xfp_init is called to initialize XFP module. More... | |
INT32 | m2mb_xfp_io_read (uint8_t *buff, uint32_t size) |
m2mb_xfp_io_read reads the XFP data sent by the XFP tool. More... | |
This section describes the M2MB APIs related to XFP module.
XFP is the protocol to be followed to upgrade firmware of the device through UART.
#define XFP_OPERATION_BOOTCHARS_DETECTED 1 |
Definition at line 55 of file m2mb_xfp.h.
#define XFP_OPERATION_DONE 2 |
Definition at line 56 of file m2mb_xfp.h.
#define XFP_OPERATION_FAILED 3 |
Definition at line 57 of file m2mb_xfp.h.
#define XFP_OPERATION_IN_PROGRESS 0 |
Definition at line 54 of file m2mb_xfp.h.
This function prototype is Firmware Upgrade callback for XFP user.
Firmware Upgrade callback for XFP user. This callback will be called on either success or failure of FWUP operation. response_code is of type 'M2MB_FWUP_STATUS_CODE_T'
Example
Definition at line 137 of file m2mb_xfp.h.
typedef M2MB_OS_RESULT_E(* xfp_io_write) (UINT8 *p, UINT32 length) |
IO write callback for XFP.
IO write callback for XFP. This is to send ACK Xfp tool on receiving 512B chunk through UART. p is pointer to ACK and length is the size of ACK. User has to write this ACK sent by XFP to UART port used by XFP, so that tool will send the next chunk.
[in] | p | It is pointer to ACK. |
[in] | length | It is the size of ACK. |
Example
Definition at line 101 of file m2mb_xfp.h.
INT32 m2mb_xfp_io_read | ( | uint8_t * | buff, |
uint32_t | size | ||
) |
m2mb_xfp_io_read reads the XFP data sent by the XFP tool.
m2mb_xfp_io_read reads the XFP data sent by the XFP tool and sends it to firmware upgrade.
INT32 m2mb_xfp_open | ( | xfp_io_write | io_write_cb, |
M2MB_FWUP_USER_CB_T | user_cb, | ||
void * | user_cb_ctx | ||
) |
m2mb_xfp_init is called to initialize XFP module.
m2mb_xfp_init initializes the XFP module and registers the callbacks of type xfp_io_write and fwup_xfp_user_cb.
[in] | io_write_cb | callback set by user of type xfp_io_write. IO write callback for XFP. |
[in] | user_cb | Pointer to a Firmware Upgrade callback function of type for fwup_xfp_user_cb. |