SPI HAL implemented and more (#207)
- Cleanup unused code and move ISR/IRQ checks to `Kernel.h` - Improve clang-format - Fix for LVGL lock transfer: ensure lock isn't activate when changing the lock - Implement SPI HAL - Remove `initHardware` HAL configuration entry - Fix `I2cScanner`: don't scan when port isn't started
This commit is contained in:
committed by
GitHub
parent
88b3bfbe3e
commit
c1f55429b6
@@ -1,6 +1,7 @@
|
||||
#include "Tactility/hal/Device.h"
|
||||
#include "Tactility/hal/Hal_i.h"
|
||||
#include "Tactility/hal/i2c/I2c.h"
|
||||
#include "Tactility/hal/spi/Spi.h"
|
||||
|
||||
#include <Tactility/kernel/SystemEvents.h>
|
||||
|
||||
@@ -13,12 +14,12 @@ void init(const Configuration& configuration) {
|
||||
|
||||
kernel::systemEventPublish(kernel::SystemEvent::BootInitI2cBegin);
|
||||
tt_check(i2c::init(configuration.i2c), "I2C init failed");
|
||||
if (configuration.initHardware != nullptr) {
|
||||
TT_LOG_I(TAG, "Init hardware");
|
||||
tt_check(configuration.initHardware(), "Hardware init failed");
|
||||
}
|
||||
kernel::systemEventPublish(kernel::SystemEvent::BootInitI2cEnd);
|
||||
|
||||
kernel::systemEventPublish(kernel::SystemEvent::BootInitSpiBegin);
|
||||
tt_check(spi::init(configuration.spi), "SPI init failed");
|
||||
kernel::systemEventPublish(kernel::SystemEvent::BootInitSpiEnd);
|
||||
|
||||
if (configuration.initBoot != nullptr) {
|
||||
TT_LOG_I(TAG, "Init power");
|
||||
tt_check(configuration.initBoot(), "Init power failed");
|
||||
|
||||
Reference in New Issue
Block a user