Revert "Adds a standard DONT_CARE pin name that allows specifying that any pin will..."

This reverts commit c804dc8013.
pull/447/head
Brian Webb 2014-08-17 09:43:32 -07:00
parent c804dc8013
commit c3e6faaa76
48 changed files with 5 additions and 97 deletions

View File

@ -21,7 +21,7 @@ void pinmap_pinout(PinName pin, const PinMap *map) {
return;
while (map->pin != NC) {
if ((map->pin == DONT_CARE) || (map->pin == pin)) {
if (map->pin == pin) {
pin_function(pin, map->function);
pin_mode(pin, PullNone);
@ -50,7 +50,7 @@ uint32_t pinmap_merge(uint32_t a, uint32_t b) {
uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map) {
while (map->pin != NC) {
if ((map->pin == DONT_CARE) || (map->pin == pin))
if (map->pin == pin)
return map->peripheral;
map++;
}

View File

@ -237,8 +237,6 @@ typedef enum {
TSI_ELEC0 = PTB16,
TSI_ELEC1 = PTB17,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -118,8 +118,6 @@ typedef enum {
TSI_ELEC0 = PTA13,
TSI_ELEC1 = PTB12,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -236,8 +236,6 @@ typedef enum {
TSI_ELEC0 = PTB16,
TSI_ELEC1 = PTB17,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -239,8 +239,6 @@ typedef enum {
TSI_ELEC0 = PTB16,
TSI_ELEC1 = PTB17,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -239,8 +239,6 @@ typedef enum {
DAC0_OUT = 0xFEFE, /* DAC does not have Pin Name in RM */
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -208,8 +208,6 @@ typedef enum {
DAC0_OUT = 0xFEFE, /* DAC does not have Pin Name in RM */
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -159,8 +159,6 @@ typedef enum {
A4 = p5,
A5 = p6,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -135,8 +135,6 @@ typedef enum {
I2C_SDA1 = p13,
I2C_SCL1 = p15,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -135,9 +135,6 @@ typedef enum {
I2C_SDA1 = p13,
I2C_SCL1 = p15,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -162,8 +162,6 @@ typedef enum {
A4 = p5,
A5 = p6,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -28,12 +28,12 @@
#define UART_NUM 1
static const PinMap PinMap_UART_TX[] = {
{DONT_CARE, UART_0, 1},
{TX_PIN_NUMBER, UART_0, 1},
{ NC , NC , 0}
};
static const PinMap PinMap_UART_RX[] = {
{DONT_CARE, UART_0, 1},
{RX_PIN_NUMBER, UART_0, 1},
{NC , NC , 0}
};

View File

@ -157,8 +157,6 @@ typedef enum {
SDA= P0_5, // same port as A4
SCL= P0_4, // same port as A5
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -164,8 +164,6 @@ typedef enum {
I2C_SCL = D15,
I2C_SDA = D14,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -74,8 +74,6 @@ typedef enum {
I2C_SCL = P0_4,
I2C_SDA = P0_5,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -135,8 +135,6 @@ typedef enum {
USBTX = P0_19,
USBRX = P0_18,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -164,8 +164,6 @@ typedef enum {
I2C_SCL = D15,
I2C_SDA = D14,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -130,8 +130,6 @@ typedef enum {
UART_TX = P0_19,
UART_RX = P0_18,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -103,8 +103,6 @@ typedef enum {
UART_TX = P0_19,
UART_RX = P0_18,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -145,8 +145,6 @@ typedef enum {
UART_TX = P0_19,
UART_RX = P0_18,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -148,8 +148,6 @@ typedef enum {
I2C_SCL = P0_4,
I2C_SDA = P0_5,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -188,8 +188,6 @@ typedef enum {
dp27 = P0_4,
dp28 = P0_7,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -202,8 +202,7 @@ typedef enum {
dip28 = P0_7,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -115,8 +115,6 @@ typedef enum {
UART_TX = P0_19,
UART_RX = P0_18,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,

View File

@ -75,8 +75,6 @@ typedef enum {
SDA= P0_23, // same port as A4
SCL= P0_22, // same port as A5
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -109,8 +109,6 @@ typedef enum {
I2C_SCL = D15,
I2C_SDA = D14,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -109,8 +109,6 @@ typedef enum {
I2C_SCL = D15,
I2C_SDA = D14,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -158,8 +158,6 @@ typedef enum {
USBTXD = USBTX, // identical USBTX
USBRXD = USBRX, // identical USBRX
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -76,8 +76,6 @@ typedef enum {
USBTX = P0_2,
USBRX = P0_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -109,8 +109,6 @@ typedef enum {
A5 = p20,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -451,8 +451,6 @@ typedef enum {
// Dedicated pin (no GPIO)
P_DED = MBED_PIN(0, 0, NO_GPIO, 0),
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,

View File

@ -53,8 +53,6 @@ typedef enum {
USBTX = P0_4,
USBRX = P0_0,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -81,8 +81,6 @@ typedef enum {
USBTX = P0_6,
USBRX = P0_1,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF,
} PinName;

View File

@ -211,8 +211,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -171,8 +171,6 @@ typedef enum {
SPI_CS = PB_12,
PWM_OUT = PB_8,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -207,8 +207,6 @@ typedef enum {
SPI_CS = PA_15,
PWM_OUT = PB_1,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -264,8 +264,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -160,8 +160,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PC_7,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -164,8 +164,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -148,8 +148,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -155,8 +155,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_4,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -163,8 +163,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_4,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -162,8 +162,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -162,8 +162,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -163,8 +163,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -155,8 +155,6 @@ typedef enum {
SPI_CS = PB_6,
PWM_OUT = PB_3,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -161,8 +161,6 @@ typedef enum {
LED1 = PE_9,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;

View File

@ -50,8 +50,6 @@ typedef enum {
LED5 = PD_14,
LED6 = PD_15,
// Do not care
DONT_CARE = (int)0xFFFFFFFE,
// Not connected
NC = (int)0xFFFFFFFF
} PinName;