IRPyro API  (sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
IRPyro Functions access the USART

Allows to get a byte from the USART and send a stream of data to a client. More...

Collaboration diagram for IRPyro Functions access the USART:

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
 

Detailed Description

Allows to get a byte from the USART and send a stream of data to a client.

end of Micro_controller_interrupt_external group

Note
Modify accordingly depending on architecture

Function Documentation

◆ UART_byte_get()

uint8_t UART_byte_get ( )

Interface to acces uart_byte.

Definition at line 1182 of file Micro_controller_template.c.

◆ UART_display_write()

static void UART_display_write ( char const *  format,
  ... 
)
static

Formats output and sends to USART as a string.

Parameters
formatconstant format string as with printf
...variable argument, list pf values.

Definition at line 1191 of file Micro_controller_template.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART_PutChar()

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.

Here is the caller graph for this function:

◆ UART_PutNumber()

void UART_PutNumber ( USART_TypeDef *  USARTx,
uint32_t  number 
)

Puts a number in the USART.

Parameters
USARTxusart port sending the number
numberto be send

Definition at line 1082 of file Micro_controller_template.c.

Here is the call graph for this function:

◆ UART_PutString()

void UART_PutString ( USART_TypeDef *  USARTx,
uint8_t *  str 
)

Puts a string in the USART.

Parameters
USARTxusart
str

Definition at line 1069 of file Micro_controller_template.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART_stream_binary_send()

void UART_stream_binary_send ( uint8_t *  DataS)

Builds a binary data packet for the channels of the sensor, frame counter and saturation byte.

Parameters
DataSraw data from the sensor

Definition at line 1219 of file Micro_controller_template.c.

Here is the call graph for this function:

◆ UART_stream_char_send()

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.

Parameters
channel_valuearray of channel values
channel_saturationencoded saturation bits

Definition at line 1205 of file Micro_controller_template.c.

Here is the call graph for this function:

◆ USART2_IRQHandler()

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.

◆ USART_Callback_Rx_Disable()

static void USART_Callback_Rx_Disable ( void  )
static

Ends function callbacks.

Definition at line 1138 of file Micro_controller_template.c.

Here is the caller graph for this function:

◆ USART_Callback_Rx_Enable()

static void USART_Callback_Rx_Enable ( USART_callback  Callback)
static

Definition at line 1131 of file Micro_controller_template.c.

Here is the caller graph for this function:

◆ USART_Callback_Rx_Setup()

void USART_Callback_Rx_Setup ( USART_callback  Callback)

Configures function callbacks.

Parameters
CallbackFunction to call after event detected

Definition at line 1146 of file Micro_controller_template.c.

Here is the call graph for this function:

◆ USART_Callback_Tx_Disable()

static void USART_Callback_Tx_Disable ( void  )
static

Ends function callbacks.

Definition at line 1112 of file Micro_controller_template.c.

Here is the caller graph for this function:

◆ USART_Callback_Tx_Enable()

static void USART_Callback_Tx_Enable ( USART_callback  Callback)
static

Starts function callbacks.

Parameters
CallbackFunction to call after each interval.

Definition at line 1105 of file Micro_controller_template.c.

Here is the caller graph for this function:

◆ USART_Callback_Tx_Setup()

void USART_Callback_Tx_Setup ( USART_callback  Callback)

Configures function callbacks.

Parameters
CallbackFunction to call after event detected

Definition at line 1120 of file Micro_controller_template.c.

Here is the call graph for this function:

Variable Documentation

◆ uart_byte

volatile uint8_t uart_byte

Definition at line 1053 of file Micro_controller_template.c.

◆ USARTCallback_Rx_Fn

USART_callback USARTCallback_Rx_Fn = NULL
static

Definition at line 1100 of file Micro_controller_template.c.

◆ USARTCallback_Tx_Fn

USART_callback USARTCallback_Tx_Fn = NULL
static

Definition at line 1099 of file Micro_controller_template.c.