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

Function rt_hw_acmp_init

bsp/efm32/drv_acmp.c:332–350  ·  view source on GitHub ↗

/ * @brief * Initialize all ACMP module related hardware and register ACMP device to * kernel * * @details * * @note * ******************************************************************************/

Source from the content-addressed store, hash-verified

330 *
331 ******************************************************************************/
332void rt_hw_acmp_init(void)
333{
334 struct efm32_acmp_device_t *acmp;
335
336#ifdef RT_USING_ACMP0
337 if ((acmp = rt_hw_acmp_unit_init(&acmp0_device, 0)) != RT_NULL)
338 {
339 rt_hw_acmp_register(&acmp0_device, RT_ACMP0_NAME, EFM32_NO_DATA, acmp);
340 }
341#endif
342
343#ifdef RT_USING_ACMP1
344 if ((acmp = rt_hw_acmp_unit_init(&acmp1_device, 1)) != RT_NULL)
345 {
346 rt_hw_acmp_register(&acmp1_device, RT_ACMP1_NAME, EFM32_NO_DATA, acmp);
347 }
348#endif
349
350}
351
352/***************************************************************************//**
353 * @brief

Callers 1

rt_hw_driver_initFunction · 0.85

Calls 2

rt_hw_acmp_unit_initFunction · 0.85
rt_hw_acmp_registerFunction · 0.85

Tested by

no test coverage detected