11 #define TWR_ATCI_UART TWR_UART_UART2
14 #define TWR_ATCI_COMMANDS_LENGTH(COMMANDS) (sizeof(COMMANDS) / sizeof(COMMANDS[0]))
16 #define TWR_ATCI_COMMAND_CLAC {"+CLAC", twr_atci_clac_action, NULL, NULL, NULL, "List all available AT commands"}
17 #define TWR_ATCI_COMMAND_HELP {"$HELP", twr_atci_help_action, NULL, NULL, NULL, "This help"}
bool twr_atci_get_buffer_from_hex_string(twr_atci_param_t *param, void *buffer, size_t *length)
Decode HEX string to buffer and move parsing cursor forward.
bool twr_atci_skip_response(void)
Skip response, use in callback in twr_atci_command_t.
bool twr_atci_is_comma(twr_atci_param_t *param)
Check if the character at cursor is comma.
size_t twr_atci_printf(const char *format,...)
Prinf message.
bool twr_atci_clac_action(void)
Helper for clac action.
bool twr_atci_help_action(void)
Helper for help action.
bool twr_atci_is_quotation_mark(twr_atci_param_t *param)
Check if the character at cursor is quotation mark (")
size_t twr_atci_print(const char *message)
Print message.
void twr_atci_write_error(void)
Write ERROR.
bool twr_atci_get_uint(twr_atci_param_t *param, uint32_t *value)
Parse string to uint and move parsing cursor forward.
void twr_atci_init(const twr_atci_command_t *commands, int length)
Initialize.
bool twr_atci_get_string(twr_atci_param_t *param, char *str, size_t length)
Copy string and move parsing cursor forward.
void twr_atci_write_ok(void)
Write OK.
size_t twr_atci_print_buffer_as_hex(const void *buffer, size_t length)
Print buffer as HEX string.
size_t twr_atci_println(const char *message)
Print message and add CR LF.
void twr_atci_set_uart_active_callback(bool(*callback)(void), twr_tick_t scan_interval)
Set callback function for scan if uart is active. Used for low-power when USB is disconnected (defaul...
size_t twr_atci_printfln(const char *format,...)
Prinf message and add CR LF.
uint64_t twr_tick_t
Timestamp data type.