IRPyro TO API demo
Specific demo for the IRPyro TO with IRPyro API
Code examples for IRPyro TO

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_TO_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_TO_sample (IRPyro_sensor_device_type *this_device)
 Collects the number of data samples indicated by NUMBER_OF_FRAMES_TO_COUNT. More...
 
static void read_sample_multiple_TO_devices (void)
 Example to initialize multiple IRPyros and stream data. More...
 
static void read_sample_single_TO_device (void)
 Example to initialize one IRPyro TO and stream data Creates an IRPyro TO sensor with one channel active and the minimal Required configuration: location of the CS port and pin and a I2C address. See Read_Me.txt. More...
 
static void rx_function (void)
 USART RX function. More...
 
static void sensor_power_stabilize ()
 power cycles the sensors on the board to assure stability More...
 
static void tx_function (void)
 USART TX function. More...
 
static void usart_callback_setup (void)
 configures USART irq functions More...
 
static void wake_up_TO_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 668 of file main_for_TO.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 651 of file main_for_TO.c.

Here is the caller graph for this function:

static void IOCTL_TO_example ( void  )
static

Shows how to change sensor parameters on the run.

Attention
Set your serial terminal console with the following parameters:
*        Baud Rate:           921600
*        Parity:                None
*        Data Bits:                8
*        Stop Bits:                1
*        Hardware Flow Control: None
*        Software Flow Control: None
* 
Select display format to the UART by un-commenting the appropriate function:
  • UART_stream_char_send() for plain text display comma delimited.
  • UART_stream_binary_send() for binary format package.
Note
This function demonstrates sampling_rate_set, high_pass_set, low_pass_set, gain_set, power_off, sampling_rate_get, high_pass_get, low_pass_get, gain_get, power_normal, power_low, power_sleep, power_wakeup

Definition at line 387 of file main_for_TO.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 76 of file main_for_TO.c.

Here is the call graph for this function:

static void read_a_TO_sample ( IRPyro_sensor_device_type *  this_device)
static

Collects the number of data samples indicated by NUMBER_OF_FRAMES_TO_COUNT.

Parameters
this_deviceIRPyro configuration data
Attention
Set your serial terminal console with the following parameters:
*        Baud Rate:           921600
*        Parity:                None
*        Data Bits:                8
*        Stop Bits:                1
*        Hardware Flow Control: None
*        Software Flow Control: None
* 
Select display format to the UART by un-commenting the appropriate function:
  • UART_stream_char_send() for plain text display comma delimited.
  • UART_stream_binary_send() for binary format package.

Definition at line 200 of file main_for_TO.c.

Here is the caller graph for this function:

static void read_sample_multiple_TO_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
Set your serial terminal console with the following parameters:
*        Baud Rate:           921600
*        Parity:                None
*        Data Bits:                8
*        Stop Bits:                1
*        Hardware Flow Control: None
*        Software Flow Control: None
* 
Select display format to the UART by un-commenting the appropriate function:
  • UART_stream_char_send() for plain text display comma delimited.
  • UART_stream_binary_send() for binary format package.
Note
Modify accordingly depending on architecture

Definition at line 250 of file main_for_TO.c.

Here is the call graph for this function:

static void read_sample_single_TO_device ( void  )
static

Example to initialize one IRPyro TO and stream data Creates an IRPyro TO sensor with one channel active and the minimal Required configuration: location of the CS port and pin and a I2C address. See Read_Me.txt.

Attention
Set your serial terminal console with the following parameters:
*        Baud Rate:           921600
*        Parity:                None
*        Data Bits:                8
*        Stop Bits:                1
*        Hardware Flow Control: None
*        Software Flow Control: None
* 
Select display format to the UART by un-commenting the appropriate function:
  • UART_stream_char_send() for plain text display comma delimited.
  • UART_stream_binary_send() for binary format package.
Note
Modify accordingly depending on architecture
The field .number_of_active_channels on the IRPyro TO devices can only be set to 1.
  • when equal to 1 data from channel 2 is collected
Attention
FIFO data collected is stored in the first available position of the channel_value array. channel 2 -> channel_value[0] frame counter -> channel_value[5]

Definition at line 109 of file main_for_TO.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.

Definition at line 634 of file main_for_TO.c.

Here is the caller graph for this function:

static void sensor_power_stabilize ( )
static

power cycles the sensors on the board to assure stability

Definition at line 678 of file main_for_TO.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void tx_function ( void  )
static

USART TX function.

Definition at line 627 of file main_for_TO.c.

Here is the caller graph for this function:

static void usart_callback_setup ( void  )
static

configures USART irq functions

Definition at line 641 of file main_for_TO.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void wake_up_TO_event_detection ( void  )
static

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

Attention
Set your serial terminal console with the following parameters:
*        Baud Rate:           921600
*        Parity:                None
*        Data Bits:                8
*        Stop Bits:                1
*        Hardware Flow Control: None
*        Software Flow Control: None
* 
Select display format to the UART by un-commenting the appropriate function:
  • UART_stream_char_send() for plain text display comma delimited.
  • UART_stream_binary_send() for binary format package.
This function is called from an interrupt service request function and should be minimal.

Definition at line 538 of file main_for_TO.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_for_TO.c.

Here is the caller graph for this function: