From c8cc2aa6f9a0c3eb791e6d288a83c04a8684a6ac Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sun, 8 Jan 2017 21:18:18 +0100 Subject: [PATCH] nrf5/boards: Enabling ili9341 display drivers and to be compiled in on pca10056 target board. Updating SPI configuration with gpio port. --- nrf5/boards/pca10056/mpconfigboard.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nrf5/boards/pca10056/mpconfigboard.h b/nrf5/boards/pca10056/mpconfigboard.h index caf03462bd..4ffd372d81 100644 --- a/nrf5/boards/pca10056/mpconfigboard.h +++ b/nrf5/boards/pca10056/mpconfigboard.h @@ -31,7 +31,11 @@ #define MICROPY_PY_SYS_PLATFORM "nrf52840-PDK" #define MICROPY_PY_MACHINE_PWM (0) -#define MICROPY_PY_MACHINE_SPI (0) +#define MICROPY_PY_MACHINE_SPI (1) + +#define MICROPY_PY_DISPLAY (1) +#define MICROPY_PY_DISPLAY_EPAPER_SLD00200P (0) +#define MICROPY_PY_DISPLAY_LCD_ILI9341 (1) #define MICROPY_HW_HAS_SWITCH (0) #define MICROPY_HW_HAS_FLASH (0) @@ -66,6 +70,16 @@ #define MICROPY_HW_UART1_HWFC (1) +// SPI0 config +#define MICROPY_HW_SPI0_NAME "SPI0" +#define MICROPY_HW_SPI0_SCK (15) // B15 (Arduino D13) +#define MICROPY_HW_SPI0_MOSI (13) // B13 (Arduino D11) +#define MICROPY_HW_SPI0_MISO (14) // B14 (Arduino D12) +#define MICROPY_HW_SPI0_SCK_PORT (1) +#define MICROPY_HW_SPI0_MOSI_PORT (1) +#define MICROPY_HW_SPI0_MISO_PORT (1) + + #define MICROPY_HW_PWM0_NAME "PWM0" #define MICROPY_HW_PWM1_NAME "PWM1" #define MICROPY_HW_PWM2_NAME "PWM2"