Data Structures | |
| struct | serial_handler_common_opcode_to_fp_map_t |
| Structure for mapping a command opcode to the command processing function. More... | |
Typedefs | |
| typedef void(* | serial_handler_common_cmd_cb_t) (const serial_packet_t *p_cmd) |
| Command processing function call back dedicated to a specific command. More... | |
Functions | |
| void | serial_handler_common_cmd_rsp_nodata_on_error (uint8_t opcode, uint32_t status, const uint8_t *p_data, uint16_t length) |
Send command response with the given data if the status is NRF_SUCCESS, otherwise sends NULL. More... | |
| void | serial_handler_common_rx (const serial_packet_t *p_cmd, const serial_handler_common_opcode_to_fp_map_t *p_cmd_handlers, uint32_t no_handlers) |
| RX handler pattern for serial packets. More... | |
Detailed Description
Typedef Documentation
◆ serial_handler_common_cmd_cb_t
| typedef void(* serial_handler_common_cmd_cb_t) (const serial_packet_t *p_cmd) |
Command processing function call back dedicated to a specific command.
- Parameters
-
[in] p_cmd The serial command received
Definition at line 62 of file serial_handler_common.h.
Function Documentation
◆ serial_handler_common_cmd_rsp_nodata_on_error()
| void serial_handler_common_cmd_rsp_nodata_on_error | ( | uint8_t | opcode, |
| uint32_t | status, | ||
| const uint8_t * | p_data, | ||
| uint16_t | length | ||
| ) |
Send command response with the given data if the status is NRF_SUCCESS, otherwise sends NULL.
- Parameters
-
[in] opcode The opcode of the command. [in] status Status as defined by NRF_ERROR_H__[in] p_data The pointer to the data to be sent. Can be NULLiflengthis 0.[in] length The length of the p_datain bytes.
◆ serial_handler_common_rx()
| void serial_handler_common_rx | ( | const serial_packet_t * | p_cmd, |
| const serial_handler_common_opcode_to_fp_map_t * | p_cmd_handlers, | ||
| uint32_t | no_handlers | ||
| ) |
RX handler pattern for serial packets.
- Parameters
-
[in] p_cmd The serial command received [in] p_cmd_handlers A populated array of command handlers. [in] no_handlers Number of handler in p_cmd_handlers.