IRPyro API  (sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
Micro controller interface

Micro controller architecture dependent functions. More...

Collaboration diagram for Micro controller interface:

Functions

uint32_t Micro_controller_delay_get (void)
 Retrieves the tick counter. More...
 
void Micro_controller_delay_ms (uint32_t time_ms)
 Example of delay function. More...
 
void Micro_controller_delay_set (uint32_t delay)
 Sets the tick counter. More...
 
void Micro_controller_delay_us (uint32_t time_us)
 Example of delay function in micro seconds. Refer to section "12.8 Device Power Up and Reset" in the Reference Manual. More...
 
static void Micro_controller_GPIO_init (void)
 Example of board initialization to set up all the ports and peripherals. (Read_Me.txt) More...
 
static void Micro_controller_I2C_init (void)
 Calls I2C initialization. See Read_Me.txt. More...
 
static void Micro_controller_Systick_init (uint16_t frequency)
 Example of board timer initialization to set a delay. More...
 
void Micro_controller_template_init (void)
 Groups all required initialization in one function. More...
 
uint32_t Micro_controller_timeout_get (void)
 Recovers the tick_down value to check is not expired. More...
 
void Micro_controller_timeout_set (uint32_t timeout)
 Sets the tick_down to monitor a time out. More...
 
void SysTick_Handler (void)
 Updates the both tick counters on a Systick interrupt every millisecond. More...
 
static uint32_t SysTick_millis (void)
 return the system clock as milliseconds More...
 

Variables

static volatile uint32_t ticks
 
static volatile uint32_t ticks_down
 

Detailed Description

Micro controller architecture dependent functions.

*    Functions to initialize ports, timers and delays
*    implemented for the STM32 micro controllers
* 
Note
Modify accordingly depending on architecture

Function Documentation

uint32_t Micro_controller_delay_get ( void  )

Retrieves the tick counter.

Attention
Modify accordingly depending on architecture

Definition at line 353 of file Micro_controller_template.c.

void Micro_controller_delay_ms ( uint32_t  time_ms)

Example of delay function.

This delay function is required to allow the IRPyro sensor to stabilize on power up. In this example SysTick_Handler() provides the delay. Refer to section "12.8 Device Power Up and Reset" in the Reference Manual

Parameters
time_msdelay time in milliseconds.
Return values
None.
Attention
Modify accordingly depending on architecture

Definition at line 394 of file Micro_controller_template.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Micro_controller_delay_set ( uint32_t  delay)

Sets the tick counter.

Parameters
delayinteger value in milliseconds
Attention
Modify accordingly depending on architecture

Definition at line 345 of file Micro_controller_template.c.

void Micro_controller_delay_us ( uint32_t  time_us)

Example of delay function in micro seconds. Refer to section "12.8 Device Power Up and Reset" in the Reference Manual.

Parameters
time_usinteger value in micro seconds
Attention
Modify accordingly depending on architecture

Definition at line 371 of file Micro_controller_template.c.

Here is the caller graph for this function:

void Micro_controller_GPIO_init ( void  )
static

Example of board initialization to set up all the ports and peripherals. (Read_Me.txt)

Attention
Modify this function to enable the appropriate pins location for INT and CS lines where the IRPyro is connected.

Definition at line 193 of file Micro_controller_template.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Micro_controller_I2C_init ( void  )
static

Calls I2C initialization. See Read_Me.txt.

Attention
Modify accordingly depending on the initialization of the I2C lines on the micro controller architecture.

Definition at line 225 of file Micro_controller_template.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void Micro_controller_Systick_init ( uint16_t  frequency)
static

Example of board timer initialization to set a delay.

The IRPyro sensor requires a delay loop to allow settling Refer to section "12.8 Device Power Up and Reset" in the Reference Manual This can be achieved using an interrupt based counter as shown in this example.

Attention
This function is required to use Micro_controller_delay_ms()

Definition at line 301 of file Micro_controller_template.c.

Here is the caller graph for this function:

void Micro_controller_template_init ( void  )

Groups all required initialization in one function.

Attention
Modify accordingly depending on architecture

Definition at line 175 of file Micro_controller_template.c.

Here is the call graph for this function:

uint32_t Micro_controller_timeout_get ( void  )

Recovers the tick_down value to check is not expired.

Attention
Modify accordingly depending on architecture

Definition at line 336 of file Micro_controller_template.c.

void Micro_controller_timeout_set ( uint32_t  timeout)

Sets the tick_down to monitor a time out.

Attention
Modify accordingly depending on architecture

Definition at line 328 of file Micro_controller_template.c.

void SysTick_Handler ( void  )

Updates the both tick counters on a Systick interrupt every millisecond.

Attention
Modify accordingly depending on architecture

Definition at line 313 of file Micro_controller_template.c.

static uint32_t SysTick_millis ( void  )
static

return the system clock as milliseconds

Attention
Modify accordingly depending on architecture

Definition at line 361 of file Micro_controller_template.c.

Here is the caller graph for this function:

Variable Documentation

volatile uint32_t ticks
static

Definition at line 307 of file Micro_controller_template.c.

volatile uint32_t ticks_down
static

Definition at line 308 of file Micro_controller_template.c.