IRPyro TO unit test console using the IRPyro API
Functions for single and multiple sensor configurations in a Unit test format
IRPyro_UT.h
Go to the documentation of this file.
1 /**
2 ******************************************************************************
3 * @file IRPyro_UT.H
4 * @author _KEMET, Ltd
5 * @date March 2018
6 * @version Release 1.0.6
7 * @copyright (c) 2018 _KEMET, Ltd
8 * @brief Unit Testing module
9 ******************************************************************************
10  @attention <h2><center>&copy; COPYRIGHT 2018 _KEMET, Ltd</center></h2>
11  @verbatim
12  Copyright (c) 2018, _KEMET, Ltd
13  All rights reserved.
14 
15  THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY
16  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY
19  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  @endverbatim
26 ******************************************************************************
27 
28 */
29 #ifndef IRPyro_UT
30 #define IRPyro_UT
31 #include "IRPyro_API_multi_device_layer.h"
32 #endif
33 #define IRPyro_FIFO_RESET_OK 0X31
34 #define IRPyro_FIFO_RESET 0x0C
35 
36 #define IRPyro_CCP_SIZE 5 // bytes on the IRPyro CCP register
37 #define IRPyro_FRAME_COUNT_LOCATION 5 // position on the user data buffer
38 #define NUMBER_OF_FRAMES_TO_COUNT 3600000 // 60000 1 minute, 900000 approximate 15 minutes, 3600000 1 hour, 4294967295 milliseconds = 50 days, 60 000 000
39 #define TIME_TO_WAIT 3600000
40 /**
41  * @struct IOCTL_test IRPyro_UT.h
42  * @brief Special struct to test IOCTL
43  */
44 typedef struct IOCTL_test
45 {
46  IRPyro_cmd_type command; ///< Command
47  IRPyro_arg_type argument; ///< Argument
49 
50 uint8_t ut01_single_sensor_init(IRPyro_sensor_device_type *IRPyro_TEST_Sensor);
51 uint8_t ut03_single_sensor_read(IRPyro_sensor_device_type *IRPyro_TEST_Sensor);
52 uint8_t ut02_multiple_sensor_init(IRPyro_devices this_list, uint8_t list_size);
53 uint8_t ut04_multiple_sensor_read(IRPyro_devices this_list, uint8_t list_size);
54 uint8_t ut06_IOCTL01(IRPyro_sensor_device_type* IRPyro_test_Sensor);
55 uint8_t ut06_IOCTL02(IRPyro_sensor_device_type *IRPyro_test_Sensor);
56 uint8_t ut_wake_up_event(IRPyro_sensor_device_type *IRPyro_test_Sensor);
57 
58 void ut_TO_CAN_read(void);
59 void ut_initialization(IRPyro_sensor_device_type* this_device, IRPyro_devices this_list);
60 void IRPyro_demo_board(uint8_t value);
61 
62 /* ********** Copyright (c) 2018 _KEMET, Ltd. **********END OF FILE************/
uint8_t ut02_multiple_sensor_init(IRPyro_devices this_list, uint8_t list_size)
uint8_t ut03_single_sensor_read(IRPyro_sensor_device_type *IRPyro_TEST_Sensor)
uint8_t ut01_single_sensor_init(IRPyro_sensor_device_type *IRPyro_TEST_Sensor)
uint8_t ut_wake_up_event(IRPyro_sensor_device_type *IRPyro_test_Sensor)
Wake up event.
void IRPyro_demo_board(uint8_t value)
Changes the state of all the CS lines as used on the IRPyro backplane board.
void ut_TO_CAN_read(void)
Single TO-CAN read.
uint8_t ut06_IOCTL02(IRPyro_sensor_device_type *IRPyro_test_Sensor)
IRPyro_arg_type argument
Argument.
Definition: IRPyro_UT.h:47
void ut_initialization(IRPyro_sensor_device_type *this_device, IRPyro_devices this_list)
uint8_t ut06_IOCTL01(IRPyro_sensor_device_type *IRPyro_test_Sensor)
Test of IOCTL functions.
struct IOCTL_test IOCTL_test_type
uint8_t ut04_multiple_sensor_read(IRPyro_devices this_list, uint8_t list_size)
IRPyro_cmd_type command
Command.
Definition: IRPyro_UT.h:46
Special struct to test IOCTL.
Definition: IRPyro_UT.h:44