![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
USB_SERIAL_STM32 example 2 - sends lot of data through serial port. More...
#include "modules/com/usb_serial_stm32.h"
Go to the source code of this file.
Functions | |
void | send_command (void) |
void | init_usb_serial (void) |
Init module, call VCOM_init() from here. | |
void | periodic_usb_serial (void) |
Periodic function in case you needed to send data periodically like telemetry Note that the data are sent once the buffer is full, not immediately. | |
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 catch -1 in case no more data were available. | |
void | event_usb_serial (void) |
Call VCOM_poll() from module event function. | |
Variables | |
uint8_t | run |
uint8_t | prompt = '$' |
uint8_t | big_buffer [] |
USB_SERIAL_STM32 example 2 - sends lot of data through serial port.
User can control the flow by pressing "S" for stop and "R" for run.
Definition in file usb_serial_stm32_example2.c.
Call VCOM_poll() from module event function.
Definition at line 91 of file usb_serial_stm32_example2.c.
References cmd_avail, cmd_execute(), ReadUsbBuffer(), usb_serial_parse_packet(), VCOM_check_available(), VCOM_event(), and VCOM_getchar().
Init module, call VCOM_init() from here.
Definition at line 44 of file usb_serial_stm32_example2.c.
References cmd_avail, cmd_idx, run, and VCOM_init().
Periodic function in case you needed to send data periodically like telemetry Note that the data are sent once the buffer is full, not immediately.
Definition at line 55 of file usb_serial_stm32_example2.c.
References big_buffer, run, and VCOM_putchar().
Parse data from buffer Note that the function receives int, not char Because we want to be able to catch -1 in case no more data were available.
Definition at line 70 of file usb_serial_stm32_example2.c.
References cmd_avail, cmd_buf, cmd_idx, foo, prompt, run, VCOM_putchar(), and VCOM_send_message().
Referenced by event_usb_serial().
uint8_t big_buffer[] |
Definition at line 38 of file usb_serial_stm32_example2.c.
Referenced by periodic_usb_serial().
uint8_t prompt = '$' |
Definition at line 35 of file usb_serial_stm32_example2.c.
Referenced by usb_serial_parse_packet().
uint8_t run |
Definition at line 34 of file usb_serial_stm32_example2.c.
Referenced by init_usb_serial(), periodic_usb_serial(), and usb_serial_parse_packet().