44 kCommandState_CommandPhase,
45 kCommandState_DataPhase
49 typedef struct CommandHandlerEntry
51 void (*handleCommand)(uint8_t *packet, uint32_t packetLength);
52 status_t (*handleData)(
bool *hasMoreData);
56 typedef struct CommandProcessorData
70 #if defined(__cplusplus) 75 , dataBytesAvailable(0)
83 #if defined(__cplusplus) 85 : state(kCommandState_CommandPhase)
95 typedef struct CommandInterface
114 #if defined(__cplusplus) 116 #endif // __cplusplus 126 #if defined(__cplusplus) 128 #endif // __cplusplus 132 #endif // _bl_command.h_ command_interface_t g_commandInterface
Default command interface.
Definition: bl_command.c:207
_command_state
Command state machine states.
Definition: bl_command.h:42
uint8_t * packet
Pointer to packet in process.
Definition: bl_command.h:59
uint32_t packetLength
Length of packet in process.
Definition: bl_command.h:60
Format of command handler entry.
Definition: bl_command.h:49
Command processor data format.
Definition: bl_command.h:56
int32_t state
Current state machine state.
Definition: bl_command.h:58
uint32_t count
Remaining count to produce/consume.
Definition: bl_command.h:64
CommandProcessorData()
Pointer to handler table entry for packet in process.
Definition: bl_command.h:84
uint32_t dataBytesAvailable
Number of bytes available at data pointer.
Definition: bl_command.h:66
uint8_t commandTag
Tag of command running data phase.
Definition: bl_command.h:67
uint8_t * data
Data for data phase.
Definition: bl_command.h:63
Definition: bl_command.h:61
uint8_t option
option for special command
Definition: bl_command.h:68
uint32_t address
Address for data phase.
Definition: bl_command.h:65
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:121
status_t bootloader_command_pump(void)
Pump the command state machine.
Definition: bl_command.c:224
Interface to command processor operations.
Definition: bl_command.h:95
status_t bootloader_command_init(void)
Initialize the command processor component.
Definition: bl_command.c:215