mirror of https://github.com/ARMmbed/mbed-os.git
Modified the TARGET_GHI_MBUINO/PeripheralNames.h and targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PinNames.h to reflect the mBuino base hardware;
I commented out the non useful SPI pins and Serial pins from our hardware build; For pwmout, I removed the non useful pins and added two more pins that are part of our hardware build.pull/422/head
parent
68b2f4648f
commit
6b910f2763
|
@ -57,7 +57,9 @@ typedef enum {
|
||||||
PWM_8,
|
PWM_8,
|
||||||
PWM_9,
|
PWM_9,
|
||||||
PWM_10,
|
PWM_10,
|
||||||
PWM_11
|
PWM_11,
|
||||||
|
PWM_12,
|
||||||
|
PWM_13
|
||||||
} PWMName;
|
} PWMName;
|
||||||
|
|
||||||
#define STDIO_UART_TX USBTX
|
#define STDIO_UART_TX USBTX
|
||||||
|
@ -65,20 +67,22 @@ typedef enum {
|
||||||
#define STDIO_UART UART_0
|
#define STDIO_UART UART_0
|
||||||
|
|
||||||
// Default peripherals
|
// Default peripherals
|
||||||
#define MBED_SPI0 p5, p6, p7, p8
|
#define MBED_SPI0 P0_9, P0_8, P0_6, P0_2 // MOSI, MISO, CLK, SEL
|
||||||
#define MBED_SPI1 p11, p12, p13, p14
|
#define MBED_SPI1 P0_21, P0_22, P1_15, P01_19 // MOSI, MISO, CLK, SEL
|
||||||
|
|
||||||
#define MBED_UART0 p9, p10
|
#define MBED_UART0 USBTX, USBRX
|
||||||
#define MBED_UARTUSB USBTX, USBRX
|
#define MBED_UARTUSB USBTX, USBRX
|
||||||
|
|
||||||
#define MBED_I2C0 p28, p27
|
#define MBED_I2C0 P0_5, P0_4
|
||||||
|
|
||||||
#define MBED_ANALOGIN0 p15
|
#define MBED_ANALOGIN0 P0_11
|
||||||
#define MBED_ANALOGIN1 p16
|
#define MBED_ANALOGIN1 P0_12
|
||||||
#define MBED_ANALOGIN2 p17
|
#define MBED_ANALOGIN2 P0_13
|
||||||
#define MBED_ANALOGIN3 p18
|
#define MBED_ANALOGIN3 P0_14
|
||||||
#define MBED_ANALOGIN4 p19
|
#define MBED_ANALOGIN4 P0_15
|
||||||
#define MBED_ANALOGIN5 p20
|
#define MBED_ANALOGIN5 P0_16
|
||||||
|
#define MBED_ANALOGIN6 P0_22
|
||||||
|
#define MBED_ANALOGIN7 P0_23
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ typedef enum {
|
||||||
#define PORT_SHIFT 5
|
#define PORT_SHIFT 5
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// LPC11U Pin Names
|
// LPC11U24 HVQFN33 Pin Names
|
||||||
P0_0 = 0,
|
P0_0 = 0,
|
||||||
P0_1 = 1,
|
P0_1 = 1,
|
||||||
P0_2 = 2,
|
P0_2 = 2,
|
||||||
|
@ -55,114 +55,24 @@ typedef enum {
|
||||||
P0_21 = 21,
|
P0_21 = 21,
|
||||||
P0_22 = 22,
|
P0_22 = 22,
|
||||||
P0_23 = 23,
|
P0_23 = 23,
|
||||||
P0_24 = 24,
|
|
||||||
P0_25 = 25,
|
|
||||||
P0_26 = 26,
|
|
||||||
P0_27 = 27,
|
|
||||||
|
|
||||||
P1_0 = 32,
|
|
||||||
P1_1 = 33,
|
|
||||||
P1_2 = 34,
|
|
||||||
P1_3 = 35,
|
|
||||||
P1_4 = 36,
|
|
||||||
P1_5 = 37,
|
|
||||||
P1_6 = 38,
|
|
||||||
P1_7 = 39,
|
|
||||||
P1_8 = 40,
|
|
||||||
P1_9 = 41,
|
|
||||||
P1_10 = 42,
|
|
||||||
P1_11 = 43,
|
|
||||||
P1_12 = 44,
|
|
||||||
P1_13 = 45,
|
|
||||||
P1_14 = 46,
|
|
||||||
P1_15 = 47,
|
P1_15 = 47,
|
||||||
P1_16 = 48,
|
|
||||||
P1_17 = 49,
|
|
||||||
P1_18 = 50,
|
|
||||||
P1_19 = 51,
|
P1_19 = 51,
|
||||||
P1_20 = 52,
|
|
||||||
P1_21 = 53,
|
|
||||||
P1_22 = 54,
|
|
||||||
P1_23 = 55,
|
|
||||||
P1_24 = 56,
|
|
||||||
P1_25 = 57,
|
|
||||||
P1_26 = 58,
|
|
||||||
P1_27 = 59,
|
|
||||||
P1_28 = 60,
|
|
||||||
P1_29 = 61,
|
|
||||||
|
|
||||||
P1_31 = 63,
|
|
||||||
|
|
||||||
// mbed DIP Pin Names
|
|
||||||
p5 = P0_9,
|
|
||||||
p6 = P0_8,
|
|
||||||
p7 = P1_29,
|
|
||||||
p8 = P0_2,
|
|
||||||
p9 = P1_27,
|
|
||||||
p10 = P1_26,
|
|
||||||
p11 = P1_22,
|
|
||||||
p12 = P1_21,
|
|
||||||
p13 = P1_20,
|
|
||||||
p14 = P1_23,
|
|
||||||
p15 = P0_11,
|
|
||||||
p16 = P0_12,
|
|
||||||
p17 = P0_13,
|
|
||||||
p18 = P0_14,
|
|
||||||
p19 = P0_16,
|
|
||||||
p20 = P0_22,
|
|
||||||
p21 = P0_7,
|
|
||||||
p22 = P0_17,
|
|
||||||
p23 = P1_17,
|
|
||||||
p24 = P1_18,
|
|
||||||
p25 = P1_24,
|
|
||||||
p26 = P1_25,
|
|
||||||
p27 = P0_4,
|
|
||||||
p28 = P0_5,
|
|
||||||
p29 = P1_5,
|
|
||||||
p30 = P1_2,
|
|
||||||
|
|
||||||
p33 = P0_3,
|
|
||||||
p34 = P1_15,
|
|
||||||
p35 = P0_20,
|
|
||||||
p36 = P0_21,
|
|
||||||
|
|
||||||
// Other mbed Pin Names
|
// Other mbed Pin Names
|
||||||
LED1 = P1_8,
|
LED1 = P0_7,
|
||||||
LED2 = P1_9,
|
LED2 = P0_8,
|
||||||
LED3 = P1_10,
|
LED3 = P0_2,
|
||||||
LED4 = P1_11,
|
LED4 = P0_20,
|
||||||
|
LED5 = P1_19,
|
||||||
|
LED6 = P0_17,
|
||||||
|
LED7 = P0_23,
|
||||||
|
|
||||||
USBTX = P0_19,
|
USBTX = P0_19,
|
||||||
USBRX = P0_18,
|
USBRX = P0_18,
|
||||||
|
|
||||||
// for Arch V1.1
|
I2C_SCL = P0_4,
|
||||||
D0 = P0_18,
|
I2C_SDA = P0_5,
|
||||||
D1 = P0_19,
|
|
||||||
D2 = P0_17,
|
|
||||||
D3 = P1_17,
|
|
||||||
D4 = P1_18,
|
|
||||||
D5 = P1_24,
|
|
||||||
D6 = P1_25,
|
|
||||||
D7 = P1_5,
|
|
||||||
D8 = P1_26,
|
|
||||||
D9 = P1_27,
|
|
||||||
D10 = P0_2,
|
|
||||||
D11 = P0_9, // P1_29 for Arch V1.0
|
|
||||||
D12 = P0_8,
|
|
||||||
D13 = P1_29, // P0_9 for Arch V1.0
|
|
||||||
|
|
||||||
D14 = P0_5,
|
|
||||||
D15 = P0_4,
|
|
||||||
|
|
||||||
A0 = P0_11,
|
|
||||||
A1 = P0_12,
|
|
||||||
A2 = P0_13,
|
|
||||||
A3 = P0_14,
|
|
||||||
A4 = P0_16,
|
|
||||||
A5 = P0_22,
|
|
||||||
|
|
||||||
I2C_SCL = D15,
|
|
||||||
I2C_SDA = D14,
|
|
||||||
|
|
||||||
// Not connected
|
// Not connected
|
||||||
NC = (int)0xFFFFFFFF,
|
NC = (int)0xFFFFFFFF,
|
||||||
|
|
|
@ -28,23 +28,25 @@
|
||||||
*/
|
*/
|
||||||
static const PinMap PinMap_PWM[] = {
|
static const PinMap PinMap_PWM[] = {
|
||||||
/* CT16B0 */
|
/* CT16B0 */
|
||||||
{P0_8 , PWM_1, 2}, {P1_13, PWM_1, 2}, /* MR0 */
|
{P0_8 , PWM_1, 2}, /* MR0 */
|
||||||
{P0_9 , PWM_2, 2}, {P1_14, PWM_2, 2}, /* MR1 */
|
{P0_9 , PWM_2, 2}, /* MR1 */
|
||||||
{P0_10, PWM_3, 3}, {P1_15, PWM_3, 2}, /* MR2 */
|
{P0_10, PWM_3, 3}, {P1_15, PWM_3, 2}, /* MR2 */
|
||||||
|
|
||||||
/* CT16B1 */
|
/* CT16B1 */
|
||||||
{P0_21, PWM_4, 1}, /* MR0 */
|
{P0_21, PWM_4, 1}, /* MR0 */
|
||||||
{P0_22, PWM_5, 2}, {P1_23, PWM_5, 1}, /* MR1 */
|
{P0_22, PWM_5, 2}, /* MR1 */
|
||||||
|
|
||||||
/* CT32B0 */
|
/* CT32B0 */
|
||||||
{P0_18, PWM_6, 2}, {P1_24, PWM_6, 1}, /* MR0 */
|
{P0_18, PWM_6, 2}, /* MR0 */
|
||||||
{P0_19, PWM_7, 2}, {P1_25, PWM_7, 1}, /* MR1 */
|
{P0_19, PWM_7, 2}, /* MR1 */
|
||||||
{P0_1 , PWM_8, 2}, {P1_26, PWM_8, 1}, /* MR2 */
|
{P0_1 , PWM_8, 2}, /* MR2 */
|
||||||
|
{P0_11, PWM_9, 3}, /* MR3 */
|
||||||
|
|
||||||
/* CT32B1 */
|
/* CT32B1 */
|
||||||
{P0_13, PWM_9 , 3}, {P1_0, PWM_9 , 1}, /* MR0 */
|
{P0_13, PWM_10, 3}, /* MR0 */
|
||||||
{P0_14, PWM_10, 3}, {P1_1, PWM_10, 1}, /* MR1 */
|
{P0_14, PWM_11, 3}, /* MR1 */
|
||||||
{P0_15, PWM_11, 3}, {P1_2, PWM_11, 1}, /* MR2 */
|
{P0_15, PWM_12, 3}, /* MR2 */
|
||||||
|
{P0_16, PWM_13, 2}, /* MR3 */
|
||||||
|
|
||||||
{NC, NC, 0}
|
{NC, NC, 0}
|
||||||
};
|
};
|
||||||
|
@ -54,11 +56,11 @@ typedef struct {
|
||||||
uint8_t mr;
|
uint8_t mr;
|
||||||
} timer_mr;
|
} timer_mr;
|
||||||
|
|
||||||
static timer_mr pwm_timer_map[11] = {
|
static timer_mr pwm_timer_map[13] = {
|
||||||
{0, 0}, {0, 1}, {0, 2},
|
{0, 0}, {0, 1}, {0, 2},
|
||||||
{1, 0}, {1, 1},
|
{1, 0}, {1, 1},
|
||||||
{2, 0}, {2, 1}, {2, 2},
|
{2, 0}, {2, 1}, {2, 2}, {2, 3},
|
||||||
{3, 0}, {3, 1}, {3, 2},
|
{3, 0}, {3, 1}, {3, 2}, {3, 3},
|
||||||
};
|
};
|
||||||
|
|
||||||
static LPC_CTxxBx_Type *Timers[4] = {
|
static LPC_CTxxBx_Type *Timers[4] = {
|
||||||
|
|
|
@ -29,15 +29,15 @@
|
||||||
|
|
||||||
static const PinMap PinMap_UART_TX[] = {
|
static const PinMap PinMap_UART_TX[] = {
|
||||||
{P0_19, UART_0, 1},
|
{P0_19, UART_0, 1},
|
||||||
{P1_13, UART_0, 3},
|
// {P1_13, UART_0, 3},
|
||||||
{P1_27, UART_0, 2},
|
// {P1_27, UART_0, 2},
|
||||||
{ NC , NC , 0}
|
{ NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PinMap PinMap_UART_RX[] = {
|
static const PinMap PinMap_UART_RX[] = {
|
||||||
{P0_18, UART_0, 1},
|
{P0_18, UART_0, 1},
|
||||||
{P1_14, UART_0, 3},
|
// {P1_14, UART_0, 3},
|
||||||
{P1_26, UART_0, 2},
|
// {P1_26, UART_0, 2},
|
||||||
{NC , NC , 0}
|
{NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,30 +23,30 @@
|
||||||
static const PinMap PinMap_SPI_SCLK[] = {
|
static const PinMap PinMap_SPI_SCLK[] = {
|
||||||
{P0_6 , SPI_0, 0x02},
|
{P0_6 , SPI_0, 0x02},
|
||||||
{P0_10, SPI_0, 0x02},
|
{P0_10, SPI_0, 0x02},
|
||||||
{P1_29, SPI_0, 0x01},
|
// {P1_29, SPI_0, 0x01},
|
||||||
{P1_15, SPI_1, 0x03},
|
{P1_15, SPI_1, 0x03},
|
||||||
{P1_20, SPI_1, 0x02},
|
// {P1_20, SPI_1, 0x02},
|
||||||
{NC , NC , 0}
|
{NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PinMap PinMap_SPI_MOSI[] = {
|
static const PinMap PinMap_SPI_MOSI[] = {
|
||||||
{P0_9 , SPI_0, 0x01},
|
{P0_9 , SPI_0, 0x01},
|
||||||
{P0_21, SPI_1, 0x02},
|
{P0_21, SPI_1, 0x02},
|
||||||
{P1_22, SPI_1, 0x02},
|
// {P1_22, SPI_1, 0x02},
|
||||||
{NC , NC , 0}
|
{NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PinMap PinMap_SPI_MISO[] = {
|
static const PinMap PinMap_SPI_MISO[] = {
|
||||||
{P0_8 , SPI_0, 0x01},
|
{P0_8 , SPI_0, 0x01},
|
||||||
{P0_22, SPI_1, 0x03},
|
{P0_22, SPI_1, 0x03},
|
||||||
{P1_21, SPI_1, 0x02},
|
// {P1_21, SPI_1, 0x02},
|
||||||
{NC , NC , 0}
|
{NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PinMap PinMap_SPI_SSEL[] = {
|
static const PinMap PinMap_SPI_SSEL[] = {
|
||||||
{P0_2 , SPI_0, 0x01},
|
{P0_2 , SPI_0, 0x01},
|
||||||
{P1_19, SPI_1, 0x02},
|
{P1_19, SPI_1, 0x02},
|
||||||
{P1_23, SPI_1, 0x02},
|
// {P1_23, SPI_1, 0x02},
|
||||||
{NC , NC , 0}
|
{NC , NC , 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue