IRPyro Micro controller template only
Routines to enable the MCU to use the USART and the I2C
|
Public functions of Micro controller specific code to access the IRPyro sensor. More...
#include <stddef.h>
#include <stdio.h>
#include <stdarg.h>
#include "stm32f30x.h"
#include "stm32f30x_exti.h"
#include "stm32f30x_gpio.h"
#include "stm32f30x_i2c.h"
#include "stm32f30x_syscfg.h"
#include "stm32f30x_usart.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | EXTernal_callback) (void) |
typedef void(* | TIM_callback) (void) |
typedef void(* | USART_callback) (void) |
Functions | |
void | CS_pin_set (uint8_t port, uint8_t pin, uint8_t value) |
ON/OFF control from the MCU to the IRPyro sensor. More... | |
void | Emitter_control (uint8_t *EmitterStatus, uint8_t EmitterONTime, uint8_t EmitterOFFTime) |
Changes Emitter status and applies timing parameters. More... | |
void | EXTernal_Callback_Setup (EXTernal_callback Callback) |
Configures function callbacks. More... | |
uint8_t | EXTI_detected (uint8_t exti_line) |
This function access the status of the interrupt lines for the wake up event. More... | |
uint8_t | i2c_Read (uint8_t DeviceAddr, uint8_t Command, uint8_t *pBuffer, uint16_t len) |
Reads data via I2C port. More... | |
uint8_t | i2c_Write (uint8_t DeviceAddr, uint8_t Command, uint8_t *pBuffer, uint8_t len) |
Sends data via I2C port. More... | |
uint8_t | INT_pin_read (uint8_t port, uint8_t pin) |
Reads the status of the pin assigned to the INT line of IRPyro. More... | |
void | LED_READY (uint8_t LED_ready) |
Control for the READY led state. More... | |
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... | |
uint32_t | Micro_controller_sample_period_timer_get (void) |
void | Micro_controller_sample_period_timer_set (uint32_t count_value) |
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 | power_set (uint8_t port, uint8_t pin) |
Power sequence from the MCU to the IRPyro sensor. More... | |
void | TIM_Callback_Setup (TIM_callback Callback) |
Configures function callbacks. More... | |
uint8_t | UART_byte_get (void) |
Interface to acces uart_byte. 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 | USART_Callback_Rx_Setup (USART_callback Callback) |
Configures function callbacks. More... | |
void | USART_Callback_Tx_Setup (USART_callback Callback) |
Configures function callbacks. More... | |
Public functions of Micro controller specific code to access the IRPyro sensor.
=============================================================================== ##### How to use this template ##### =============================================================================== [..] This functions are referred on the IRPyro API, changing the names disables the API. [..]
Copyright (c) 2018, _KEMET, Ltd All rights reserved. THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file Micro_controller_template.h.
typedef void(* EXTernal_callback) (void) |
Definition at line 64 of file Micro_controller_template.h.
typedef void(* TIM_callback) (void) |
Definition at line 87 of file Micro_controller_template.h.
typedef void(* USART_callback) (void) |
Definition at line 73 of file Micro_controller_template.h.