* @brief RT-Thread Components Initialization. */
| 108 | * @brief RT-Thread Components Initialization. |
| 109 | */ |
| 110 | void rt_components_init(void) |
| 111 | { |
| 112 | #ifdef RT_DEBUGING_AUTO_INIT |
| 113 | int result; |
| 114 | const struct rt_init_desc *desc; |
| 115 | |
| 116 | rt_kprintf("do components initialization.\n"); |
| 117 | for (desc = &__rt_init_desc_rti_board_end; desc < &__rt_init_desc_rti_end; desc ++) |
| 118 | { |
| 119 | rt_kprintf("initialize %s\n", desc->fn_name); |
| 120 | result = desc->fn(); |
| 121 | rt_kprintf(":%d done\n", result); |
| 122 | } |
| 123 | #else |
| 124 | volatile const init_fn_t *fn_ptr; |
| 125 | |
| 126 | for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; fn_ptr ++) |
| 127 | { |
| 128 | (*fn_ptr)(); |
| 129 | } |
| 130 | #endif /* RT_DEBUGING_AUTO_INIT */ |
| 131 | } |
| 132 | #endif /* RT_USING_COMPONENTS_INIT */ |
| 133 | |
| 134 | #ifdef RT_USING_USER_MAIN |
no test coverage detected