MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / initBoot

Function initBoot

Devices/m5stack-tab5/Source/Configuration.cpp:252–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252static 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
277extern const Configuration hardwareConfiguration = {
278 .initBoot = initBoot,

Callers

nothing calls this directly

Calls 6

device_find_by_nameFunction · 0.85
initExpander0Function · 0.85
initExpander1Function · 0.85
initSoundFunction · 0.70
initMicrophoneFunction · 0.70
checkFunction · 0.50

Tested by

no test coverage detected