From 5557082177a7532af6fa73fcaf631636a2724c2e Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 6 Apr 2021 11:31:23 +0200 Subject: [PATCH] Update longan nano board --- os/hal/boards/SIPEED_LONGAN_NANO/board.c | 1 - os/hal/boards/SIPEED_LONGAN_NANO/board.h | 41 +++++++++++------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/os/hal/boards/SIPEED_LONGAN_NANO/board.c b/os/hal/boards/SIPEED_LONGAN_NANO/board.c index b4504179..6bf05ce0 100644 --- a/os/hal/boards/SIPEED_LONGAN_NANO/board.c +++ b/os/hal/boards/SIPEED_LONGAN_NANO/board.c @@ -28,7 +28,6 @@ const PALConfig pal_default_config = {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},TODO*/ }; #endif diff --git a/os/hal/boards/SIPEED_LONGAN_NANO/board.h b/os/hal/boards/SIPEED_LONGAN_NANO/board.h index 399047c1..82df36ef 100644 --- a/os/hal/boards/SIPEED_LONGAN_NANO/board.h +++ b/os/hal/boards/SIPEED_LONGAN_NANO/board.h @@ -42,20 +42,27 @@ /* * IO pins assignments */ -#define GPIOA_GREEN_LED 1 -#define GPIOA_BLUE_LED 2 -#define GPIOC_RED_LED 13 +#define PIN_GREEN_LED 1 +#define PIN_BLUE_LED 2 +#define PIN_RED_LED 13 -#define GPIOA_DISPLAY_MISO 6 -#define GPIOA_DISPLAY_MOSI 7 -#define GPIOA_DISPLAY_SCK 5 -#define GPIOB_DISPLAY_CS 2 -#define GPIOB_DISPLAY_DC 0 -#define GPIOB_DISPLAY_RST 1 +#define PIN_DISPLAY_MISO 6 +#define PIN_DISPLAY_MOSI 7 +#define PIN_DISPLAY_SCK 5 +#define PIN_DISPLAY_CS 2 +#define PIN_DISPLAY_DC 0 +#define PIN_DISPLAY_RST 1 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 +#define LINE_GREEN_LED PAL_LINE(GPIOA, PIN_GREEN_LED) +#define LINE_BLUE_LED PAL_LINE(GPIOA, PIN_BLUE_LED) +#define LINE_RED_LED PAL_LINE(GPIOA, PIN_RED_LED) +#define LINE_DISPLAY_MISO PAL_LINE(GPIOA, PIN_DISPLAY_MISO) +#define LINE_DISPLAY_MOSI PAL_LINE(GPIOA, PIN_DISPLAY_MOSI) +#define LINE_DISPLAY_SCK PAL_LINE(GPIOA, PIN_DISPLAY_SCK) +#define LINE_DISPLAY_CS PAL_LINE(GPIOB, PIN_DISPLAY_CS) +#define LINE_DISPLAY_DC PAL_LINE(GPIOB, PIN_DISPLAY_DC) +#define LINE_DISPLAY_RST PAL_LINE(GPIOB, PIN_DISPLAY_RST) /* * I/O ports initial setup, this configuration is established soon after reset * in the initialization code. @@ -114,21 +121,11 @@ /* * Port D setup. * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRL 0x88888888 /* PD7...PD0 */ #define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ #define VAL_GPIODODR 0xFFFFFFFF -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - #if !defined(_FROM_ASM_) #ifdef __cplusplus extern "C" {