| 250 | } |
| 251 | |
| 252 | static bool initBoot() { |
| 253 | auto* i2c0 = device_find_by_name("i2c0"); |
| 254 | check(i2c0, "i2c0 not found"); |
| 255 | |
| 256 | auto* io_expander0 = device_find_by_name("io_expander0"); |
| 257 | check(io_expander0, "io_expander0 not found"); |
| 258 | auto* io_expander1 = device_find_by_name("io_expander1"); |
| 259 | check(io_expander1, "io_expander1 not found"); |
| 260 | |
| 261 | initExpander0(io_expander0); |
| 262 | initExpander1(io_expander1); |
| 263 | |
| 264 | error_t error = initSound(i2c0, io_expander0); |
| 265 | if (error != ERROR_NONE) { |
| 266 | LOG_E(TAG, "Failed to enable ES8388"); |
| 267 | } |
| 268 | |
| 269 | error = initMicrophone(i2c0); |
| 270 | if (error != ERROR_NONE) { |
| 271 | LOG_E(TAG, "Failed to init ES7210"); |
| 272 | } |
| 273 | |
| 274 | return true; |
| 275 | } |
| 276 | |
| 277 | extern const Configuration hardwareConfiguration = { |
| 278 | .initBoot = initBoot, |
nothing calls this directly
no test coverage detected