/ * @brief * Initialize all Timer module related hardware and register Timer device to * kernel * * @details * * @note ******************************************************************************/
| 333 | * @note |
| 334 | ******************************************************************************/ |
| 335 | void rt_hw_timer_init(void) |
| 336 | { |
| 337 | struct efm32_timer_device_t *timer; |
| 338 | |
| 339 | #ifdef RT_USING_TIMER0 |
| 340 | if ((timer = rt_hw_timer_unit_init(&timer0_device, 0, RT_USING_TIMER0)) \ |
| 341 | != RT_NULL) |
| 342 | { |
| 343 | rt_hw_timer_register(&timer0_device, RT_TIMER0_NAME, 0, timer); |
| 344 | } |
| 345 | #endif |
| 346 | |
| 347 | |
| 348 | #ifdef RT_USING_TIMER1 |
| 349 | if ((timer = rt_hw_timer_unit_init(&timer1_device, 1, RT_USING_TIMER1)) \ |
| 350 | != RT_NULL) |
| 351 | { |
| 352 | rt_hw_timer_register(&timer1_device, RT_TIMER1_NAME, 0, timer); |
| 353 | } |
| 354 | #endif |
| 355 | |
| 356 | #ifdef RT_USING_TIMER2 |
| 357 | if ((timer = rt_hw_timer_unit_init(&timer2_device, 2, RT_USING_TIMER2)) \ |
| 358 | != RT_NULL) |
| 359 | { |
| 360 | rt_hw_timer_register(&timer2_device, RT_TIMER2_NAME, 0, timer); |
| 361 | } |
| 362 | #endif |
| 363 | } |
| 364 | |
| 365 | #endif |
| 366 | /***************************************************************************//** |
no test coverage detected