60 if (data == -1) {
return; }
63 if (c ==
'\r' || c ==
'\n') {
96 for (
int i = 0; i <
cmd_idx; i++) {
100 if (strncmp(
"help",
cmd_buf, cmd_idx) == 0) {
101 uint8_t response[] =
" - user asked for help";
102 for (
uint16_t i = 0; i <
sizeof(response); i++) {
106 uint8_t response[] =
" Command not recognized";
107 for (
uint16_t i = 0; i <
sizeof(response); i++) {
void cmd_execute(void)
Execute command from user use strncmp.
static void ReadUsbBuffer(void)
Helper function.
void VCOM_send_message(void)
void event_usb_serial(void)
Call VCOM_poll() from module event function.
void init_usb_serial(void)
Init module, call VCOM_init() from here.
int VCOM_getchar(void)
Reads one character from VCOM port.
header for serial over USB modules
int VCOM_putchar(int c)
Writes one character to VCOM port.
int VCOM_check_available(void)
Checks if data available in VCOM buffer.
void usb_serial_parse_packet(int data)
Parse data from buffer Note that the function receives int, not char Because we want to be able to ca...