From 791343a1f703255e51632eeabf348620ceb43b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20Kiiskil=C3=A4?= Date: Tue, 28 Nov 2017 22:00:53 +0200 Subject: [PATCH] Realtek RTL8195AM - define A3-A5 as NC Based on the Mbed OS website the A3 is connected to "DAC", however there is no define for DAC. In order to get the Realtek RTL8195AM to even compile with mbed-os-example-client now, we must have the A3 defined - it is one of the standard Arduine header pins. Therefore, setting it as NC. A4-A5 are not connected either, so adding them as "NC" as well. Realtek will hopefully push a proper fix sooner or later, if there is a more meaningful define for the A3 pin. They do state however that the A0-A3 pins are not GPIO capable anyway. Ref: https://os.mbed.com/platforms/Realtek-RTL8195AM/ --- .../TARGET_AMEBA/TARGET_RTL8195A/PinNames.h | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h b/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h index c8d96ab66f4..525b7cd0e7f 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h +++ b/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h @@ -50,6 +50,7 @@ typedef enum { PIN_OUTPUT } PinDirection; + typedef enum { PA_0 = (PORT_A<<4|0), PA_1 = (PORT_A<<4|1), @@ -158,7 +159,7 @@ typedef enum { PK_5 = (PORT_K<<4|5), PK_6 = (PORT_K<<4|6), /* unavailable pins */ -// PK_7 = (PORT_K<<4|7), + // PK_7 = (PORT_K<<4|7), AD_1 = (PORT_V<<4|1), AD_2 = (PORT_V<<4|2), @@ -166,13 +167,37 @@ typedef enum { DA_0 = (PORT_U<<4|0), DA_1 = (PORT_U<<4|1), - + + // Not connected + NC = (uint32_t)0xFFFFFFFF, + + // Generic signals namings + /* LED1~4 are defined as alias of GPIO pins, they are not the LEDs on board*/ + LED1 = PB_4, + LED2 = PB_5, + LED3 = PB_6, + LED4 = PB_7, + SERIAL_TX = PA_7, + SERIAL_RX = PA_6, + USBTX = PB_0, + USBRX = PB_1, + I2C_SCL = PC_5, + I2C_SDA = PC_4, + SPI_MOSI = PC_2, + SPI_MISO = PC_3, + SPI_SCK = PC_1, + SPI_CS = PC_0, + PWM_OUT = PD_4, + // Arduino connector namings A0 = AD_2,//A0 and A1 are connected A1 = AD_2, A2 = AD_3, - + A3 = NC, + A4 = NC, + A5 = NC, + D0 = PA_6, D1 = PA_7, D2 = PA_5, @@ -189,32 +214,10 @@ typedef enum { D13 = PC_1, D14 = PB_3, D15 = PB_2, - D16 = PA_1, D17 = PA_0, - D18 = PE_5, - + D18 = PE_5 - // Generic signals namings - /* LED1~4 are defined as alias of GPIO pins, they are not the LEDs on board*/ - LED1 = PB_4, - LED2 = PB_5, - LED3 = PB_6, - LED4 = PB_7, - SERIAL_TX = PA_7, - SERIAL_RX = PA_6, - USBTX = PB_0, - USBRX = PB_1, - I2C_SCL = PC_5, - I2C_SDA = PC_4, - SPI_MOSI = PC_2, - SPI_MISO = PC_3, - SPI_SCK = PC_1, - SPI_CS = PC_0, - PWM_OUT = PD_4, - - // Not connected - NC = (uint32_t)0xFFFFFFFF } PinName; typedef enum {