amiro-os / unittests / periphery-lld / inc / ut_alld_VL53L0X_v1.h @ a845d9eb
History | View | Annotate | Download (3.18 KB)
1 |
/*
|
---|---|
2 |
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
3 |
Copyright (C) 2016..2018 Thomas Schöpping et al.
|
4 |
|
5 |
This program is free software: you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
7 |
the Free Software Foundation, either version 3 of the License, or
|
8 |
(at your option) any later version.
|
9 |
|
10 |
This program is distributed in the hope that it will be useful,
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
GNU General Public License for more details.
|
14 |
|
15 |
You should have received a copy of the GNU General Public License
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
*/
|
18 |
|
19 |
#ifndef AMIROOS_UT_ALLD_VL53L0X_V1_H
|
20 |
#define AMIROOS_UT_ALLD_VL53L0X_V1_H
|
21 |
|
22 |
#include <amiroos.h> |
23 |
|
24 |
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_VL53L0X) && (AMIROLLD_CFG_VL53L0X == 1)) || defined(__DOXYGEN__) |
25 |
|
26 |
|
27 |
#include <alld_VL53L0X.h> |
28 |
|
29 |
|
30 |
/******************************************************************************/
|
31 |
/* CONSTANTS */
|
32 |
/******************************************************************************/
|
33 |
|
34 |
/******************************************************************************/
|
35 |
/* SETTINGS */
|
36 |
/******************************************************************************/
|
37 |
|
38 |
/******************************************************************************/
|
39 |
/* CHECKS */
|
40 |
/******************************************************************************/
|
41 |
|
42 |
/******************************************************************************/
|
43 |
/* DATA STRUCTURES AND TYPES */
|
44 |
/******************************************************************************/
|
45 |
|
46 |
/**
|
47 |
* @brief Custom data structure for the unit test.
|
48 |
*/
|
49 |
typedef struct { |
50 |
/**
|
51 |
* @brief VL53L0X driver to use.
|
52 |
*/
|
53 |
VL53L0XDriver *vl53d; |
54 |
|
55 |
/**
|
56 |
* @brief Timeout for certain tests.
|
57 |
*/
|
58 |
apalTime_t timeout; |
59 |
|
60 |
/**
|
61 |
* @brief Event source to listen to.
|
62 |
*/
|
63 |
event_source_t* evtsource; |
64 |
|
65 |
/**
|
66 |
* @brief Event flags to watch.
|
67 |
*/
|
68 |
eventflags_t evtflags; |
69 |
|
70 |
/**
|
71 |
* @brief GPIO PCAL6524 driver to get interrupts.
|
72 |
*/
|
73 |
PCAL6524Driver *gpio; |
74 |
|
75 |
} ut_vl53l0xdata_t; |
76 |
|
77 |
|
78 |
/******************************************************************************/
|
79 |
/* MACROS */
|
80 |
/******************************************************************************/
|
81 |
|
82 |
/******************************************************************************/
|
83 |
/* EXTERN DECLARATIONS */
|
84 |
/******************************************************************************/
|
85 |
|
86 |
|
87 |
#ifdef __cplusplus
|
88 |
extern "C" { |
89 |
#endif
|
90 |
aos_utresult_t utAlldVL53L0XFunc(BaseSequentialStream* stream, aos_unittest_t* ut); |
91 |
#ifdef __cplusplus
|
92 |
} |
93 |
#endif
|
94 |
|
95 |
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) && defined(AMIROLLD_CFG_USE_VL53L0X) */ |
96 |
|
97 |
#endif /* _AMIROOS_UT_VL53L0X_LLD_HPP_ */ |