diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 062a36e4..14be5ca2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -158,6 +158,20 @@ void OnNewTime(current_time_char_t* currentTime) { dayOfWeek, hour, minute, second, nrf_rtc_counter_get(portNRF_RTC_REG)); } +extern Pinetime::Drivers::SpiMaster* spiInstance; +void SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler(void) { + if(((NRF_SPIM0->INTENSET & (1<<6)) != 0) && NRF_SPIM0->EVENTS_END == 1) { + NRF_SPIM0->EVENTS_END = 0; + spiInstance->irq(); + } + + + if(((NRF_SPIM0->INTENSET & (1<<1)) != 0) && NRF_SPIM0->EVENTS_STOPPED == 1) { + NRF_SPIM0->EVENTS_STOPPED = 0; + } + + return; +} int main(void) { displayApp.reset(new Pinetime::Applications::DisplayApp(batteryController, bleController, dateTimeController)); logger.Init(); |
