IRPyro API
(sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
|
Micro controller architecture dependent functions. More...
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 |
Micro controller architecture dependent functions.
* Functions to initialize ports, timers and delays * implemented for the STM32 micro controllers *
uint32_t Micro_controller_delay_get | ( | void | ) |
Retrieves the tick counter.
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
time_ms | delay time in milliseconds. |
None. |
Definition at line 394 of file Micro_controller_template.c.
void Micro_controller_delay_set | ( | uint32_t | delay | ) |
Sets the tick counter.
delay | integer value in milliseconds |
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.
time_us | integer value in micro seconds |
Definition at line 371 of file Micro_controller_template.c.
|
static |
Example of board initialization to set up all the ports and peripherals. (Read_Me.txt)
Definition at line 193 of file Micro_controller_template.c.
|
static |
Calls I2C initialization. See Read_Me.txt.
Definition at line 225 of file Micro_controller_template.c.
|
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.
Definition at line 301 of file Micro_controller_template.c.
void Micro_controller_template_init | ( | void | ) |
Groups all required initialization in one function.
Definition at line 175 of file Micro_controller_template.c.
uint32_t Micro_controller_timeout_get | ( | void | ) |
Recovers the tick_down value to check is not expired.
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.
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.
Definition at line 313 of file Micro_controller_template.c.
|
static |
return the system clock as milliseconds
Definition at line 361 of file Micro_controller_template.c.
|
static |
Definition at line 307 of file Micro_controller_template.c.
|
static |
Definition at line 308 of file Micro_controller_template.c.