38 #ifndef SERIAL_HANDLER_COMMON_H__ 39 #define SERIAL_HANDLER_COMMON_H__ 42 #include "serial_packet.h" 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...
serial_handler_common_cmd_cb_t callback
Command processing function.
uint8_t payload_minlen
Expected minimum payload for this serial command (can be 0).
uint8_t opcode
Serial command opcode.
Structure for mapping a command opcode to the command processing function.
uint8_t payload_optional_extra_bytes
Additonal payload bytes: can also be 0.
void(* serial_handler_common_cmd_cb_t)(const serial_packet_t *p_cmd)
Command processing function call back dedicated to a specific command.
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.