/ * @brief * Initialize all the miscellaneous drivers * * @details * * @note * * @return * Error code ******************************************************************************/
| 117 | * Error code |
| 118 | ******************************************************************************/ |
| 119 | rt_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 |
no test coverage detected