IRPyro API demo
Shows the basic functionality of the IRPyro API
Code examples

How to stream IRPyro data and change parameters at high level. More...

Functions

static void demo_board_sensor_control (int state)
 Changes the state of all the CS lines as used on the IRPyro backplane board. More...
 
static void IRPyro_sensor_population (IRPyro_devices this_list, uint8_t *list_size)
 Detect IRPyro sensors present in the demo board. More...
 
static void IOCTL_example (void)
 Shows how to change sensor parameters on the run. More...
 
int main (void)
 Call point to the example functions. More...
 
static void read_a_sample (IRPyro_sensor_device_type *this_device)
 IRPyro data collection for a number samples More...
 
static void read_sample_multiple_devices (void)
 Example to initialize multiple IRPyros and stream data. More...
 
static void read_sample_single_device (void)
 Example to initialize one IRPyro and stream data. More...
 
static void rx_function (void)
 USART RX function Code to catch data on the USART interface. More...
 
static void tx_function (void)
 USART transmission function Code can be added here for the firmware to respond when the transmission software interrupt is enabled. More...
 
static void usart_callback_setup (void)
 configures USART irq functions More...
 
static void wake_up_event_detection (void)
 Wake up event detection This function configures the IRPyro sensor to sleep mode. More...
 
static void wakeup_event_callback (void)
 callback function More...
 

Detailed Description

How to stream IRPyro data and change parameters at high level.

Function Documentation

void demo_board_sensor_control ( int  state)
static

Changes the state of all the CS lines as used on the IRPyro backplane board.

Parameters
state0 disabled / 1 enabled

Definition at line 657 of file main.c.

Here is the caller graph for this function:

static void IRPyro_sensor_population ( IRPyro_devices  this_list,
uint8_t *  list_size 
)
static

Detect IRPyro sensors present in the demo board.

Parameters
this_listIRPyro sensor array
list_sizenumber of sensors in the array

Definition at line 640 of file main.c.

Here is the caller graph for this function:

static void IOCTL_example ( void  )
static

Shows how to change sensor parameters on the run.

Attention
Select display format to the UART: UART_stream_char_send() or UART_stream_binary_send() for plain text or binary format package.
Note
This function demonstrates sampling_rate_set, sampling_rate_get, high_pass_set, high_pass_get, low_pass_set, low_pass_get, gain_set, gain_get, power_off, power_normal, power_low, power_sleep, power_wakeup

Definition at line 387 of file main.c.

Here is the call graph for this function:

int main ( void  )

Call point to the example functions.

Attention
Uncomment the function to run

Definition at line 74 of file main.c.

Here is the call graph for this function:

static void read_a_sample ( IRPyro_sensor_device_type *  this_device)
static

IRPyro data collection for a number samples

Parameters
this_deviceIRPyro configuration data
Return values
number_of_frames_lost
Attention
Select display format to the UART: UART_stream_char_send() or UART_stream_binary_send() for plain text or binary format package.

Definition at line 194 of file main.c.

Here is the caller graph for this function:

static void read_sample_multiple_devices ( void  )
static

Example to initialize multiple IRPyros and stream data.

Creates a list of IRPyro sensors with all four channels active and the minimal required configuration: location of the CS and INT port/pin and a I2C address. See Read_Me.txt

Attention
Select display format to the UART: UART_stream_char_send() or UART_stream_binary_send() for plain text or binary format package.
Note
Modify accordingly depending on architecture

Definition at line 234 of file main.c.

Here is the call graph for this function:

static void read_sample_single_device ( void  )
static

Example to initialize one IRPyro and stream data.

Creates an IRPyro sensor with all four channels active and the minimal required configuration: location of the CS and INT port/pin and a I2C address. See Read_Me.txt

Attention
Select display format to the UART: UART_stream_char_send() or UART_stream_binary_send() for plain text or binary format package.
Note
Modify accordingly depending on architecture

Definition at line 91 of file main.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void rx_function ( void  )
static

USART RX function Code to catch data on the USART interface.

Definition at line 623 of file main.c.

Here is the caller graph for this function:

static void tx_function ( void  )
static

USART transmission function Code can be added here for the firmware to respond when the transmission software interrupt is enabled.

Definition at line 615 of file main.c.

Here is the caller graph for this function:

static void usart_callback_setup ( void  )
static

configures USART irq functions

Definition at line 630 of file main.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void wake_up_event_detection ( void  )
static

Wake up event detection This function configures the IRPyro sensor to sleep mode.

Attention
This function is called from an interrupt service request function and should be minimal.

Definition at line 526 of file main.c.

Here is the call graph for this function:

static void wakeup_event_callback ( void  )
static

callback function

Attention
This function is called from an interrupt service request function and should be minimal.

Definition at line 516 of file main.c.

Here is the caller graph for this function: