Revision f3ac1c96 unittests/lld/src/ut_lld_adc.c
unittests/lld/src/ut_lld_adc.c | ||
---|---|---|
20 | 20 |
|
21 | 21 |
#if ((AMIROOS_CFG_TESTS_ENABLE == true) && (HAL_USE_ADC == TRUE))|| defined(__DOXYGEN__) |
22 | 22 |
|
23 |
/******************************************************************************/ |
|
24 |
/* LOCAL DEFINITIONS */ |
|
25 |
/******************************************************************************/ |
|
23 | 26 |
#include <aos_debug.h> |
24 | 27 |
#include <aos_thread.h> |
25 | 28 |
#include <chprintf.h> |
... | ... | |
34 | 37 |
*/ |
35 | 38 |
#define _adcWdgThreshold (uint16_t)(9.0f / 5.0f / 3.3f * ((1 << 12) - 1) + 0.5f) |
36 | 39 |
|
40 |
/******************************************************************************/ |
|
41 |
/* EXPORTED VARIABLES */ |
|
42 |
/******************************************************************************/ |
|
43 |
|
|
44 |
/******************************************************************************/ |
|
45 |
/* LOCAL TYPES */ |
|
46 |
/******************************************************************************/ |
|
47 |
|
|
48 |
/******************************************************************************/ |
|
49 |
/* LOCAL VARIABLES */ |
|
50 |
/******************************************************************************/ |
|
51 |
|
|
37 | 52 |
/** |
38 | 53 |
* @brief Pointer to the thread listening for an ADC analog watchdog event. |
39 | 54 |
*/ |
40 | 55 |
static thread_t* _listener; |
41 | 56 |
|
57 |
/******************************************************************************/ |
|
58 |
/* LOCAL FUNCTIONS */ |
|
59 |
/******************************************************************************/ |
|
60 |
|
|
42 | 61 |
/** |
43 | 62 |
* @brief Helper function to convert ADC sample value to volts. |
44 | 63 |
* |
... | ... | |
72 | 91 |
return; |
73 | 92 |
} |
74 | 93 |
|
94 |
/******************************************************************************/ |
|
95 |
/* EXPORTED FUNCTIONS */ |
|
96 |
/******************************************************************************/ |
|
97 |
|
|
75 | 98 |
/** |
76 | 99 |
* @brief ADC unit test function. |
77 | 100 |
* |
Also available in: Unified diff