[ion/device/external_flash] Move model specific code

As the N0100 does not have an external flash chip, the code to handle
the external flash does not need to be compiled on this model.
This commit is contained in:
Gabriel Ozouf
2021-04-12 17:18:09 +02:00
committed by Gabriel
parent bd0c7de2bf
commit 03c85c0b0e
6 changed files with 22 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
ion_device_src += $(addprefix ion/src/device/n0100/drivers/, \
board.cpp \
external_flash.cpp \
led.cpp \
power.cpp \
reset.cpp \

View File

@@ -0,0 +1,18 @@
#include <drivers/external_flash.h>
namespace Ion {
namespace Device {
namespace ExternalFlash {
void init() {}
void shutdown() {}
void MassErase() {}
int SectorAtAddress(uint32_t) { return 0; }
void EraseSector(int) {}
void WriteMemory(uint8_t *, const uint8_t *, size_t) {}
void JDECid(uint8_t *, uint8_t *, uint8_t *) {}
}
}
}

View File

@@ -1,6 +1,7 @@
ion_device_src += $(addprefix ion/src/device/n0110/drivers/, \
board.cpp \
cache.cpp \
external_flash.cpp \
led.cpp \
power.cpp \
reset.cpp \

View File

@@ -1,4 +1,4 @@
#include "external_flash.h"
#include <drivers/external_flash.h>
#include <drivers/cache.h>
#include <drivers/config/external_flash.h>
#include <drivers/config/clocks.h>

View File

@@ -12,7 +12,6 @@ ion_device_src += $(addprefix ion/src/device/shared/drivers/, \
display.cpp \
events_keyboard_platform.cpp \
exam_mode.cpp \
external_flash.cpp \
flash.cpp \
internal_flash.cpp \
keyboard.cpp \

View File

@@ -43,6 +43,7 @@ ion_device_dfu_src += libaxx/src/cxxabi/pure_virtual.cpp
ion_device_dfu_src += ion/src/device/shared/usb/boot.cpp
ion_device_dfu_src += ion/src/device/$(MODEL)/drivers/board.cpp
ion_device_dfu_src += ion/src/device/$(MODEL)/drivers/cache.cpp
ion_device_dfu_src += ion/src/device/$(MODEL)/drivers/external_flash.cpp
ion_device_dfu_src += ion/src/device/$(MODEL)/drivers/reset.cpp
ion_device_dfu_src += ion/src/device/$(MODEL)/drivers/usb.cpp
ion_device_dfu_src += $(addprefix ion/src/device/shared/drivers/, \
@@ -54,7 +55,6 @@ ion_device_dfu_src += $(addprefix ion/src/device/shared/drivers/, \
crc32.cpp \
display.cpp \
events_keyboard_platform.cpp \
external_flash.cpp \
flash.cpp \
internal_flash.cpp \
keyboard.cpp \