Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
usb_serial_stm32_example2.c File Reference

USB_SERIAL_STM32 example 2 - sends lot of data through serial port. More...

+ Include dependency graph for usb_serial_stm32_example2.c:

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 []
 

Detailed Description

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.

Function Documentation

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(), and VCOM_event().

+ Here is the call graph for this function:

void init_usb_serial ( void  )

Init module, call VCOM_init() from here.

Definition at line 44 of file usb_serial_stm32_example2.c.

References FALSE, run, and VCOM_init().

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

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 FALSE, prompt, run, TRUE, VCOM_putchar(), and VCOM_send_message().

Referenced by event_usb_serial().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

uint8_t big_buffer[]
Initial value:
=
" ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-printing characters. ASCII was actually designed for use with teletypes and so the descriptions are somewhat obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain' text with no formatting such as tabs, bold or underscoring - the raw format that any computer can understand. This is usually so they can easily import the file into their own applications without issues. Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only' "

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().