IRPyro API  (sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
IRPyro_API_multi_device_layer.h
Go to the documentation of this file.
1 /**
2 ******************************************************************************
3 * @file IRPyro_API_multi_device_layer.h
4 * @author _KEMET Ltd.
5 * @date March 2018
6 * @version Release 1.0.6
7 * @copyright (c) 2018 _KEMET, Ltd
8 * @brief IRPyro data structures and prototype functions
9 * @verbatim
10  ===============================================================================
11  ##### How to use this driver #####
12  ===============================================================================
13  [..]
14  (#) Make sure that IRPyro_LIST_SIZE is big enough for your list
15  (#) Declare an IRPyro_list_type variable in your code
16  (#) Declare as many IRPyro_sensor_device_type variables as IRPyros sensors
17  on the list.
18  (#) Fill the values for CS, INT and address for each IRPyro
19  (#) Fill the values for number_of_active_channels and read_mode
20  (#) AFE, CCP and WUP can be left empty if desired, configuration macros
21  will fill them with default values
22  (#) Call IRPyro_open() to commit the values to the physical IRPyro
23  (#) IRPyro_read() retrieves the values sampled by the IRPyro sensor
24  (#) Modify the IRPyro settings using IRPyro_IOCTL()
25  (#) Close the device when finished using IRPyro_read()
26  [..]
27  @endverbatim
28 ******************************************************************************
29  @attention <h2><center>&copy; COPYRIGHT 2018 _KEMET, Ltd</center></h2>
30  @verbatim
31  Copyright (c) 2018, _KEMET, Ltd
32  All rights reserved.
33 
34  THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY
35  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37  DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY
38  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
41  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44  @endverbatim
45 ******************************************************************************
46  */
47 
48 /* Define to prevent recursive inclusion -------------------------------------*/
49 #ifndef IRPyro_API_multi_device_layer
50 #define IRPyro_API_multi_device_layer
51 
52 /* Includes ------------------------------------------------------------------*/
54 
55 /** @defgroup IRPyro_LIST_ctes Constants to access IRPyro multi device layer
56  * @ingroup IRPyro_multi
57  * @brief Defines the size of a LIST
58  * @{
59  */
60 /* Exported constants ------------------------------------------------------------*/
61 #define IRPyro_LIST_SIZE 4 // IRPyros in a LIST
62 /** end of group IRPyro_LIST_ctes
63  * @}
64  */
65 /** @defgroup IRPyro_LIST_structs Structures to access the multi device layer of IRPyro
66  * @ingroup IRPyro_multi
67  * @brief An IRPyro LIST is an array of pointers to an IRPyro_device_type variable
68  * @{
69  */
70 /* Exported types ------------------------------------------------------------*/
71 /**
72  * @struct IRPyro_devices IRPyro_API_multi_device_layer.h
73  * @brief IRPyro group definition
74  */
75 typedef IRPyro_sensor_device_type IRPyro_devices[IRPyro_LIST_SIZE]; ///< pointers to pre-allocated IRPyro sensors
76 // struct IRPyro_sensor_device
77 //IRPyro_sensor_device_type
78 
79 /** end of group IRPyro_LIST_structs
80  * @}
81  */
82 /* Exported functions ------------------------------------------------------- */
83 uint8_t IRPyro_open_devices(IRPyro_devices this_list, uint8_t list_size);
84 uint8_t IRPyro_read_devices(IRPyro_devices this_list, uint8_t list_size);
85 uint8_t IRPyro_close_devices(IRPyro_devices this_list, uint8_t list_size);
86 uint8_t IRPyro_ioctl_devices(IRPyro_devices this_list, uint8_t list_size, IRPyro_cmd_type* cmd, IRPyro_arg_type arg);
87 //------------------------------------------------------------------------------//
88 #endif
89 /* ********** Copyright (c) 2018 _KEMET, Ltd. **********END OF FILE************/
IRPyro_API_single_device_layer.h
IRPyro data structures and prototype functions.
IRPyro_sensor_device
IRPyro device structure definition.
Definition: IRPyro_API_single_device_layer.h:331
IRPyro_devices
IRPyro group definition.
IRPyro_arg
IRPyro command argument.
Definition: IRPyro_API_single_device_layer.h:397
IRPyro_cmd
IRPyro commands.
Definition: IRPyro_API_single_device_layer.h:385
IRPyro_open_devices
uint8_t IRPyro_open_devices(IRPyro_devices this_list, uint8_t list_size)
initializes a group of IRPyro sensors
Definition: IRPyro_API_multi_device_layer.c:82
IRPyro_ioctl_devices
uint8_t IRPyro_ioctl_devices(IRPyro_devices this_list, uint8_t list_size, IRPyro_cmd_type *cmd, IRPyro_arg_type arg)
access to IRPyro registers
Definition: IRPyro_API_multi_device_layer.c:131
IRPyro_LIST_SIZE
#define IRPyro_LIST_SIZE
Definition: IRPyro_API_multi_device_layer.h:61
IRPyro_close_devices
uint8_t IRPyro_close_devices(IRPyro_devices this_list, uint8_t list_size)
Stops streaming, deallocates memory and disable the IRPyro sensor.
Definition: IRPyro_API_multi_device_layer.c:114
IRPyro_read_devices
uint8_t IRPyro_read_devices(IRPyro_devices this_list, uint8_t list_size)
Collects data from the IRPyro group.
Definition: IRPyro_API_multi_device_layer.c:98