MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_misc_init

Function rt_hw_misc_init

bsp/efm32/dev_misc.c:119–137  ·  view source on GitHub ↗

/ * @brief * Initialize all the miscellaneous drivers * * @details * * @note * * @return * Error code ******************************************************************************/

Source from the content-addressed store, hash-verified

117 * Error code
118 ******************************************************************************/
119rt_err_t rt_hw_misc_init(void)
120{
121 do
122 {
123 /* Find ADC device */
124 adc0 = rt_device_find(RT_ADC0_NAME);
125 if (adc0 == RT_NULL)
126 {
127 misc_debug("Misc err: Can't find device: %s!\n", RT_ADC0_NAME);
128 break;
129 }
130 misc_debug("Misc: Find device %s\n", RT_ADC0_NAME);
131
132 return RT_EOK;
133 } while (0);
134
135 misc_debug("Misc err: Init failed!\n");
136 return -RT_ERROR;
137}
138
139/***************************************************************************//**
140 * @brief

Callers 1

rt_application_initFunction · 0.85

Calls 1

rt_device_findFunction · 0.85

Tested by

no test coverage detected