IRPyro Micro controller template only
Routines to enable the MCU to use the USART and the I2C
|
Allows to get a byte from the USART and send a stream of data to a client. More...
Functions | |
uint8_t | UART_byte_get () |
Interface to acces uart_byte. More... | |
static void | UART_display_write (char const *format,...) |
Formats output and sends to USART as a string. More... | |
void | UART_PutChar (USART_TypeDef *USARTx, uint8_t ch) |
Puts a char in the USART. More... | |
void | UART_PutNumber (USART_TypeDef *USARTx, uint32_t number) |
Puts a number in the USART. More... | |
void | UART_PutString (USART_TypeDef *USARTx, uint8_t *str) |
Puts a string in the USART. More... | |
void | UART_stream_binary_send (uint8_t *DataS) |
Builds a binary data packet for the channels of the sensor, frame counter and saturation byte. More... | |
void | UART_stream_char_send (uint32_t *channel_value, uint8_t channel_saturation) |
Plain text data for the active channels of the sensor including, frame counter and saturation byte. More... | |
void | USART2_IRQHandler () |
Handles incomming char from the USART and stores it in global uart_byte. More... | |
static void | USART_Callback_Rx_Disable (void) |
Ends function callbacks. More... | |
static void | USART_Callback_Rx_Enable (USART_callback Callback) |
void | USART_Callback_Rx_Setup (USART_callback Callback) |
Configures function callbacks. More... | |
static void | USART_Callback_Tx_Disable (void) |
Ends function callbacks. More... | |
static void | USART_Callback_Tx_Enable (USART_callback Callback) |
Starts function callbacks. More... | |
void | USART_Callback_Tx_Setup (USART_callback Callback) |
Configures function callbacks. More... | |
Variables | |
volatile uint8_t | uart_byte |
static USART_callback | USARTCallback_Rx_Fn = NULL |
static USART_callback | USARTCallback_Tx_Fn = NULL |
Allows to get a byte from the USART and send a stream of data to a client.
end of Micro_controller_interrupt_external group
uint8_t UART_byte_get | ( | ) |
Interface to acces uart_byte.
Definition at line 1182 of file Micro_controller_template.c.
|
static |
Formats output and sends to USART as a string.
format | constant format string as with printf |
... | variable argument, list pf values. |
Definition at line 1191 of file Micro_controller_template.c.
void UART_PutChar | ( | USART_TypeDef * | USARTx, |
uint8_t | ch | ||
) |
Puts a char in the USART.
Definition at line 1059 of file Micro_controller_template.c.
void UART_PutNumber | ( | USART_TypeDef * | USARTx, |
uint32_t | number | ||
) |
Puts a number in the USART.
USARTx | usart port sending the number |
number | to be send |
Definition at line 1082 of file Micro_controller_template.c.
void UART_PutString | ( | USART_TypeDef * | USARTx, |
uint8_t * | str | ||
) |
Puts a string in the USART.
USARTx | usart |
str |
Definition at line 1069 of file Micro_controller_template.c.
void UART_stream_binary_send | ( | uint8_t * | DataS | ) |
Builds a binary data packet for the channels of the sensor, frame counter and saturation byte.
DataS | raw data from the sensor |
Definition at line 1219 of file Micro_controller_template.c.
void UART_stream_char_send | ( | uint32_t * | channel_value, |
uint8_t | channel_saturation | ||
) |
Plain text data for the active channels of the sensor including, frame counter and saturation byte.
channel_value | array of channel values |
channel_saturation | encoded saturation bits |
Definition at line 1205 of file Micro_controller_template.c.
void USART2_IRQHandler | ( | ) |
Handles incomming char from the USART and stores it in global uart_byte.
Definition at line 1160 of file Micro_controller_template.c.
|
static |
Ends function callbacks.
Definition at line 1138 of file Micro_controller_template.c.
|
static |
Definition at line 1131 of file Micro_controller_template.c.
void USART_Callback_Rx_Setup | ( | USART_callback | Callback | ) |
Configures function callbacks.
Callback | Function to call after event detected |
Definition at line 1146 of file Micro_controller_template.c.
|
static |
Ends function callbacks.
Definition at line 1112 of file Micro_controller_template.c.
|
static |
Starts function callbacks.
Callback | Function to call after each interval. |
Definition at line 1105 of file Micro_controller_template.c.
void USART_Callback_Tx_Setup | ( | USART_callback | Callback | ) |
Configures function callbacks.
Callback | Function to call after event detected |
Definition at line 1120 of file Micro_controller_template.c.
volatile uint8_t uart_byte |
Definition at line 1053 of file Micro_controller_template.c.
|
static |
Definition at line 1100 of file Micro_controller_template.c.
|
static |
Definition at line 1099 of file Micro_controller_template.c.