Skip to content

Commit

Permalink
mio168 sd card support
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Dec 7, 2020
1 parent ef07414 commit 92e6186
Show file tree
Hide file tree
Showing 17 changed files with 829 additions and 243 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ src/third_party/micropython/ports/bare-arm/build
src/third_party/stm32_cubeide/Debug
src/third_party/stm32_cubeide/Debug (R3B3)
src/third_party/stm32_cubeide/Debug (FPGA)
src/third_party/stm32_cubeide/Release
src/third_party/stm32_truestudio/Debug
src/third_party/stm32_truestudio/Debug (R3B3)
src/third_party/stm32_truestudio/Debug (FPGA)
Expand Down
2 changes: 2 additions & 0 deletions src/eez/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ void Module::writeUnsavedData() {
void Module::onPowerDown() {
}

#if defined(EEZ_PLATFORM_STM32)
void Module::onSpiIrq() {
}

void Module::onSpiDmaTransferCompleted(int status) {
}
#endif

gui::Page *Module::getPageFromId(int pageId) {
return nullptr;
Expand Down
4 changes: 4 additions & 0 deletions src/eez/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,12 @@ struct Module {
virtual void tick();
virtual void writeUnsavedData();
virtual void onPowerDown();

#if defined(EEZ_PLATFORM_STM32)
virtual void onSpiIrq();
virtual void onSpiDmaTransferCompleted(int status);
#endif

virtual gui::Page *getPageFromId(int pageId);
virtual void animatePageAppearance(int previousPageId, int activePageId);
virtual int getSlotView(SlotViewType slotViewType, int slotIndex, int cursor);
Expand Down
6 changes: 3 additions & 3 deletions src/eez/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,17 @@ extern "C" void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
if (g_slots[0]->moduleType == MODULE_TYPE_DCP405) {
readIntcapRegisterShortcut(0);
}
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 0, 0);
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 0);
} else if (GPIO_Pin == SPI4_IRQ_Pin) {
if (g_slots[1]->moduleType == MODULE_TYPE_DCP405) {
readIntcapRegisterShortcut(1);
}
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 1, 0);
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 1);
} else if (GPIO_Pin == SPI5_IRQ_Pin) {
if (g_slots[2]->moduleType == MODULE_TYPE_DCP405) {
readIntcapRegisterShortcut(2);
}
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 2, 0);
sendMessageToPsu(PSU_MESSAGE_SPI_IRQ, 2);
}

#ifdef MASTER_MCU_REVISION_R3B3_OR_NEWER
Expand Down
Loading

0 comments on commit 92e6186

Please sign in to comment.