New implementation of the I²C/TWI driver.
Fix reset timing and add dummy reading in Cst816S to fix init error on some devices.
This commit is contained in:
parent
42d8a18fe7
commit
6af5bbcbc8
9 changed files with 239 additions and 55 deletions
|
|
@ -24,12 +24,14 @@ void IdleTimerCallback(TimerHandle_t xTimer) {
|
|||
|
||||
|
||||
SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash, Drivers::Cst816S &touchPanel,
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
|
||||
Drivers::TwiMaster& twiMaster, Drivers::Cst816S &touchPanel,
|
||||
Components::LittleVgl &lvgl,
|
||||
Controllers::Battery &batteryController, Controllers::Ble &bleController,
|
||||
Controllers::DateTime &dateTimeController,
|
||||
Pinetime::Controllers::NotificationManager& notificationManager) :
|
||||
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
|
||||
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash},
|
||||
twiMaster{twiMaster}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
|
||||
bleController{bleController}, dateTimeController{dateTimeController},
|
||||
watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager},
|
||||
nimbleController(*this, bleController,dateTimeController, notificationManager, spiNorFlash) {
|
||||
|
|
@ -67,6 +69,7 @@ void SystemTask::Work() {
|
|||
nimbleController.StartAdvertising();
|
||||
lcd.Init();
|
||||
|
||||
twiMaster.Init();
|
||||
touchPanel.Init();
|
||||
batteryController.Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ namespace Pinetime {
|
|||
};
|
||||
|
||||
SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash, Drivers::Cst816S &touchPanel,
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
|
||||
Drivers::TwiMaster& twiMaster, Drivers::Cst816S &touchPanel,
|
||||
Components::LittleVgl &lvgl,
|
||||
Controllers::Battery &batteryController, Controllers::Ble &bleController,
|
||||
Controllers::DateTime &dateTimeController,
|
||||
|
|
@ -42,6 +43,7 @@ namespace Pinetime {
|
|||
Pinetime::Drivers::SpiMaster& spi;
|
||||
Pinetime::Drivers::St7789& lcd;
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash;
|
||||
Pinetime::Drivers::TwiMaster& twiMaster;
|
||||
Pinetime::Drivers::Cst816S& touchPanel;
|
||||
Pinetime::Components::LittleVgl& lvgl;
|
||||
Pinetime::Controllers::Battery& batteryController;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue