mbed library sources
Fork of mbed-src by
Revision 273:92da1fd309d2, committed 2014-08-06
- Comitter:
- mbed_official
- Date:
- Wed Aug 06 07:45:07 2014 +0100
- Parent:
- 272:949bd8bf133b
- Child:
- 274:6937b19af361
- Commit message:
- Synchronized with git revision 885659a30e22d0ead2f98a5a1ba173ec4e7caec8
Full URL: https://github.com/mbedmicro/mbed/commit/885659a30e22d0ead2f98a5a1ba173ec4e7caec8/
[MTS_GAMBIT] Modified PinNames.h and device.h for Gambit platform
Changed in this revision
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PeripheralNames.h Tue Aug 05 14:30:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PeripheralNames.h Wed Aug 06 07:45:07 2014 +0100 @@ -28,10 +28,9 @@ typedef enum { UART_0 = 0, - UART_1 = 1, UART_2 = 2, UART_3 = 3, - UART_4 = 4, + UART_5 = 5, } UARTName; #define STDIO_UART_TX USBTX @@ -41,9 +40,9 @@ typedef enum { I2C_0 = 0, I2C_1 = 1, - I2C_2 = 2, } I2CName; + #define TPM_SHIFT 8 typedef enum { PWM_1 = (0 << TPM_SHIFT) | (0), // FTM0 CH0 @@ -82,6 +81,8 @@ PWM_32 = (3 << TPM_SHIFT) | (7), // FTM3 CH7 } PWMName; + + #define ADC_INSTANCE_SHIFT 8 #define ADC_B_CHANNEL_SHIFT 5 typedef enum { @@ -113,6 +114,8 @@ ADC1_SE18 = (1 << ADC_INSTANCE_SHIFT) | 18, } ADCName; + + typedef enum { DAC_0 = 0 } DACName; @@ -121,7 +124,6 @@ typedef enum { SPI_0 = 0, SPI_1 = 1, - SPI_2 = 2, } SPIName; #ifdef __cplusplus
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PeripheralPins.c Tue Aug 05 14:30:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PeripheralPins.c Wed Aug 06 07:45:07 2014 +0100 @@ -21,182 +21,58 @@ {NC, OSC32KCLK, 0}, }; -/************ADC***************/ -const PinMap PinMap_ADC[] = { - {PTC2, ADC0_SE4b, 0}, - {PTC8, ADC1_SE4b, 0}, - {PTC9, ADC1_SE5b, 0}, - {PTD1, ADC0_SE5b, 0}, - {PTC10, ADC1_SE6b, 0}, - {PTD5, ADC0_SE6b, 0}, - {PTC11, ADC1_SE7b, 0}, - {PTD6, ADC0_SE7b, 0}, - {PTB0 , ADC0_SE8 , 0}, - {PTB1 , ADC0_SE9 , 0}, - {PTB2 , ADC0_SE12, 0}, - {PTB3 , ADC0_SE13, 0}, - {PTC0 , ADC0_SE14, 0}, - {PTB10, ADC1_SE14, 0}, - {PTB11, ADC1_SE15, 0}, - {PTC1 , ADC0_SE15, 0}, - {PTA17, ADC1_SE17, 0}, - //{PTE24, ADC0_SE17, 0}, //I2C pull up - //{PTE25, ADC0_SE18, 0}, //I2C pull up - {NC , NC , 0} -}; - -/************DAC***************/ -const PinMap PinMap_DAC[] = { - {DAC0_OUT, DAC_0, 0}, - {NC , NC , 0} -}; - /************I2C***************/ const PinMap PinMap_I2C_SDA[] = { - {PTE25, I2C_0, 5}, - {PTB1 , I2C_0, 2}, - {PTB3 , I2C_0, 2}, {PTC11, I2C_1, 2}, - {PTA13, I2C_2, 5}, - {PTD3 , I2C_0, 7}, - {PTE0 , I2C_1, 6}, + {PTB3 , I2C_0, 7}, {NC , NC , 0} }; const PinMap PinMap_I2C_SCL[] = { - {PTE24, I2C_0, 5}, - {PTB0 , I2C_0, 2}, {PTB2 , I2C_0, 2}, {PTC10, I2C_1, 2}, - {PTA12, I2C_2, 5}, - {PTA14, I2C_2, 5}, - {PTD2 , I2C_0, 7}, - {PTE1 , I2C_1, 6}, {NC , NC , 0} }; /************UART***************/ const PinMap PinMap_UART_TX[] = { {PTB17, UART_0, 3}, - {PTC17, UART_3, 3}, - {PTD7 , UART_0, 3}, {PTD3 , UART_2, 3}, - {PTC4 , UART_1, 3}, - {PTC15, UART_4, 3}, {PTB11, UART_3, 3}, - {PTA14, UART_0, 3}, - {PTE24, UART_4, 3}, - {PTE4 , UART_3, 3}, - {PTE0, UART_1, 3}, - {NC , NC , 0} + {PTE8, UART_5, 0}, + {NC, NC, 0} }; const PinMap PinMap_UART_RX[] = { {PTB16, UART_0, 3}, - {PTE1 , UART_1, 3}, - {PTE5 , UART_3, 3}, - {PTE25, UART_4, 3}, - {PTA15, UART_0, 3}, - {PTC16, UART_3, 3}, {PTB10, UART_3, 3}, - {PTC3 , UART_1, 3}, - {PTC14, UART_4, 3}, - {PTD2 , UART_2, 3}, - {PTC6 , UART_0, 3}, - {NC , NC , 0} + {PTD2, UART_2, 3}, + {PTE9, UART_5, 0}, + {NC, NC, 0} }; /************SPI***************/ const PinMap PinMap_SPI_SCLK[] = { - {PTD1 , SPI_0, 2}, {PTE2 , SPI_1, 2}, - {PTA15, SPI_0, 2}, - {PTB11, SPI_1, 2}, - {PTB21, SPI_2, 2}, {PTC5 , SPI_0, 2}, - {PTD5 , SPI_1, 7}, {NC , NC , 0} }; const PinMap PinMap_SPI_MOSI[] = { - {PTD2 , SPI_0, 2}, - {PTE1 , SPI_1, 2}, {PTE3 , SPI_1, 7}, - {PTA16, SPI_0, 2}, - {PTB16, SPI_1, 2}, - {PTB22, SPI_2, 2}, {PTC6 , SPI_0, 2}, - {PTD6 , SPI_1, 7}, {NC , NC , 0} }; const PinMap PinMap_SPI_MISO[] = { - {PTD3 , SPI_0, 2}, {PTE1 , SPI_1, 7}, - {PTE3 , SPI_1, 2}, - {PTA17, SPI_0, 2}, - {PTB17, SPI_1, 2}, - {PTB23, SPI_2, 2}, {PTC7 , SPI_0, 2}, - {PTD7 , SPI_1, 7}, {NC , NC , 0} }; const PinMap PinMap_SPI_SSEL[] = { - {PTD0 , SPI_0, 2}, {PTE4 , SPI_1, 2}, - {PTA14, SPI_0, 2}, - {PTB10, SPI_1, 2}, - {PTB20, SPI_2, 2}, {PTC4 , SPI_0, 2}, - {PTD4 , SPI_1, 7}, {NC , NC , 0} }; -/************PWM***************/ -const PinMap PinMap_PWM[] = { - {PTA0 , PWM_6 , 3}, - {PTA1 , PWM_7 , 3}, - {PTA2 , PWM_8 , 3}, - {PTA3 , PWM_1 , 3}, - {PTA4 , PWM_2 , 3}, - {PTA5 , PWM_3 , 3}, - {PTA6 , PWM_4 , 3}, - {PTA7 , PWM_5 , 3}, - {PTA8 , PWM_9 , 3}, - {PTA9 , PWM_10, 3}, - {PTA10, PWM_17, 3}, - {PTA11, PWM_18, 3}, - {PTA12, PWM_9 , 3}, - {PTA13, PWM_10, 3}, - - {PTB0 , PWM_9 , 3}, - {PTB1 , PWM_10, 3}, - {PTB18, PWM_17, 3}, - {PTB19, PWM_18, 3}, - - {PTC1 , PWM_1 , 4}, - {PTC2 , PWM_2 , 4}, - {PTC3 , PWM_3 , 4}, - {PTC4 , PWM_4 , 4}, - {PTC5 , PWM_3 , 7}, - {PTC8 , PWM_29, 3}, - {PTC9 , PWM_30, 3}, - {PTC10, PWM_31, 3}, - {PTC11, PWM_32, 3}, - - {PTD0 , PWM_25, 4}, - {PTD1 , PWM_26, 4}, - {PTD2 , PWM_27, 4}, - {PTD3 , PWM_28, 4}, - {PTD4 , PWM_5 , 4}, - {PTD5 , PWM_6 , 4}, - {PTD6 , PWM_7 , 4}, - {PTD4 , PWM_5 , 4}, - {PTD7 , PWM_8 , 4}, - - {PTE5 , PWM_25, 6}, - {PTE6 , PWM_26, 6}, - - {NC , NC , 0} -};
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PinNames.h Tue Aug 05 14:30:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/PinNames.h Wed Aug 06 07:45:07 2014 +0100 @@ -191,21 +191,17 @@ PTE30 = (4 << GPIO_PORT_SHIFT | 30), PTE31 = (4 << GPIO_PORT_SHIFT | 31), - // #TODO all friendly names per platform // led color naming - LED_RED = PTA0, - LED_GREEN = PTA1, - LED_BLUE = PTA2, + LED_GREEN = PTC0, + // mbed original LED naming - LED1 = LED_RED, - LED2 = LED_GREEN, - LED3 = LED_BLUE, - LED4 = LED_RED, + LED1 = PTD15, + LED2 = PTD14, + LED3 = PTD13, + LED4 = PTD11, + LED5 = PTD12, + STATUS = LED_GREEN, - //Push buttons - //SW2 = PTC6, - //SW3 = PTA4, - // USB Pins USBTX = PTB17, USBRX = PTB16,
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/device.h Tue Aug 05 14:30:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/TARGET_MTS_GAMBIT/device.h Wed Aug 06 07:45:07 2014 +0100 @@ -16,28 +16,28 @@ #ifndef MBED_DEVICE_H #define MBED_DEVICE_H -#define DEVICE_PORTIN 0 -#define DEVICE_PORTOUT 0 -#define DEVICE_PORTINOUT 0 +#define DEVICE_PORTIN 1 +#define DEVICE_PORTOUT 1 +#define DEVICE_PORTINOUT 1 -#define DEVICE_INTERRUPTIN 0 +#define DEVICE_INTERRUPTIN 1 #define DEVICE_ANALOGIN 0 #define DEVICE_ANALOGOUT 0 -#define DEVICE_SERIAL 0 +#define DEVICE_SERIAL 1 -#define DEVICE_I2C 0 -#define DEVICE_I2CSLAVE 0 +#define DEVICE_I2C 1 +#define DEVICE_I2CSLAVE 1 -#define DEVICE_SPI 0 -#define DEVICE_SPISLAVE 0 +#define DEVICE_SPI 1 +#define DEVICE_SPISLAVE 1 #define DEVICE_CAN 0 -#define DEVICE_RTC 0 +#define DEVICE_RTC 1 -#define DEVICE_ETHERNET 0 +#define DEVICE_ETHERNET 1 #define DEVICE_PWMOUT 0 @@ -45,11 +45,11 @@ #define DEVICE_LOCALFILESYSTEM 0 #define DEVICE_ID_LENGTH 24 -#define DEVICE_SLEEP 0 +#define DEVICE_SLEEP 1 #define DEVICE_DEBUG_AWARENESS 0 -#define DEVICE_STDIO_MESSAGES 0 +#define DEVICE_STDIO_MESSAGES 1 #define DEVICE_ERROR_RED 0