Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
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. More... | |
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. More... | |
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. More... | |
void | event_usb_serial (void) |
Call VCOM_poll() from module event function. More... | |
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.
void event_usb_serial | ( | void | ) |
Call VCOM_poll() from module event function.
Definition at line 91 of file usb_serial_stm32_example2.c.
References usb_serial_parse_packet(), VCOM_check_available(), VCOM_event(), and VCOM_getchar().
void init_usb_serial | ( | void | ) |
Init module, call VCOM_init() from here.
Definition at line 44 of file usb_serial_stm32_example2.c.
References run, and VCOM_init().
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.
Definition at line 55 of file usb_serial_stm32_example2.c.
References big_buffer, run, and VCOM_putchar().
void send_command | ( | void | ) |
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.
Definition at line 70 of file usb_serial_stm32_example2.c.
References 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().