diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-15 22:11:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-15 22:11:24 +0000 |
commit | 6ebace65d8530505ae32559d06b6a68b57b1b585 (patch) | |
tree | 8eb9490e587c97c4be503d4bcb69cdd0d0fb196a /nuttx/configs/kwikstik-k40/include/board.h | |
parent | 6738657390598bac04d5be9d72ee6021fe87e835 (diff) | |
download | px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.tar.gz px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.tar.bz2 px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.zip |
Add board support for the FreeScale Kinetis TWR-K60N512
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3884 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/kwikstik-k40/include/board.h')
-rwxr-xr-x | nuttx/configs/kwikstik-k40/include/board.h | 146 |
1 files changed, 104 insertions, 42 deletions
diff --git a/nuttx/configs/kwikstik-k40/include/board.h b/nuttx/configs/kwikstik-k40/include/board.h index cfd32b0fb..e709ea5af 100755 --- a/nuttx/configs/kwikstik-k40/include/board.h +++ b/nuttx/configs/kwikstik-k40/include/board.h @@ -69,7 +69,7 @@ #define BOARD_VDIV 48 /* PLL VCO Divider (frequency multiplier) */ #define BOARD_PLLIN_FREQ (BOARD_EXTAL_FREQ / BOARD_PRDIV) -#define BOARD_PLLOUT_FREQ (BOARD_EXTAL_FREQ * BOARD_VDIV) +#define BOARD_PLLOUT_FREQ (BOARD_PLLIN_FREQ * BOARD_VDIV) #define BOARD_MCG_FREQ BOARD_PLLOUT_FREQ /* SIM CLKDIV1 dividers */ @@ -85,6 +85,7 @@ #define BOARD_FLASHCLK_FREQ (BOARD_MCG_FREQ / BOARD_OUTDIV4) /* LED definitions ******************************************************************/ +/* The KwikStik-K40 board has no MCU driven, GPIO-based LEDs */ #define LED_STARTED 0 #define LED_HEAPALLOCATE 1 @@ -96,7 +97,7 @@ #define LED_PANIC 7 /* Button definitions ***************************************************************/ - +/* The KwikStik-K40 board has no standard GPIO contact buttons */ /* Alternative pin resolution *******************************************************/ /* If there are alternative configurations for various pins in the @@ -105,15 +106,107 @@ * configuration for the board by defining a pin configuration (with no suffix) that * maps to the correct alternative. */ -#warning "Revisit: This only only here to get a clean compiliation" -#define PIN_UART0_RX PIN_UART0_RX_1 -#define PIN_UART0_TX PIN_UART0_TX_1 -#define PIN_UART1_RX PIN_UART1_RX_1 -#define PIN_UART1_TX PIN_UART1_TX_1 -#define PIN_UART3_RX PIN_UART3_RX_1 -#define PIN_UART3_TX PIN_UART3_TX_1 -#define PIN_UART4_RX PIN_UART4_RX_1 -#define PIN_UART4_TX PIN_UART4_TX_1 + +/* On-Board Connections + * + * ------------------- -------------------------- -------- ------------------- + * FEATURE CONNECTION PORT/PIN PIN FUNCTION + * ------------------- -------------------------- -------- ------------------- + * Audio Jack Output Audio Amp On PTE28 PTE28 + * Audio Output DAC1_OUT DAC1_OUT + * Volume Up PTD10 PTD10 + * Volume Down PTD11 PTD11 + * Buzzer Audio Out PTA8 FTM1_CH0 + * Microphone Microphone input PTA7 ADC0_SE10 + * SD Card Slot SD Clock PTE2 SDHC0_DCLK + * SD Command PTE3 SDHC0_CMD + * SD Data0 PTD12 SDHC0_D4 + * SD Data1 PTD13 SDHC0_D5 + * SD Data2 PTD14 SDHC0_D6 + * SD Data3 PTD15 SDHC0_D7 + * SD Card Detect PTE27 PTE27 + * SD Card On PTE6 PTE6 + * Infrared Port IR Transmit PTE4 IR_TX + * IR Receive PTA13 CMP2_IN0 + * Touch Pads E1 / Touch PTB0 TSI0_CH0 + * E2 / Touch PTA4 TSI0_CH5 + * E3 / Touch PTA24 PTA24 + * E4 / Touch PTA25 PTA25 + * E5 / Touch PTA26 PTA26 + * E6 / Touch PTA27 PTA27 + */ + +#define PIN_FTM1_CH0 PIN_FTM1_CH0_1 + +/* Connections via the General Purpose Tower Plug-in (TWRPI) Socket + * ------------------- -------------------------- -------- ------------------- + * FEATURE CONNECTION PORT/PIN PIN FUNCTION + * ------------------- -------------------------- -------- ------------------- + * General Purpose TWRPI AN0 (J8 Pin 8) ? ADC0_DP0/ADC1_DP3 + * TWRPI Socket TWRPI AN1 (J8 Pin 9) ? ADC0_DM0/ADC1_DM3 + * TWRPI AN2 (J8 Pin 12) ? ADC1_DP0/ADC0_DP3 + * TWRPI ID0 (J8 Pin 17) ? ADC0_DP1 + * TWRPI ID1 (J8 Pin 18) ? ADC0_DM1 + * TWRPI I2C SCL (J9 Pin 3) PTC10 I2C1_SCL + * TWRPI I2C SDA (J9 Pin 4) PTC11 I2C1_SDA + * TWRPI SPI MISO (J9 Pin 9) PTB23 SPI2_SIN + * TWRPI SPI MOSI (J9 Pin 10) PTB22 SPI2_SOUT + * TWRPI SPI SS (J9 Pin 11) PTB20 SPI2_PCS0 + * TWRPI SPI CLK (J9 Pin 12) PTB21 SPI2_SCK + * TWRPI GPIO0 (J9 Pin 15) PTC12 PTC12 + * TWRPI GPIO1 (J9 Pin 16) PTB9 PTB9 + * TWRPI GPIO2 (J9 Pin 17) PTB10 PTB10 + * TWRPI GPIO3 (J9 Pin 18) PTC5 PTC5 + * TWRPI GPIO4 (J9 Pin 19) PTA5 PTA5 + */ + +#define PIN_I2C1_SCL PIN_I2C1_SCL_1 +#define PIN_I2C1_SDA PIN_I2C1_SDA_1 +#define PIN_SPI2_SIN PIN_SPI2_SIN_1 +#define PIN_SPI2_SOUT PIN_SPI2_SOUT_1 +#define PIN_SPI2_PCS0 PIN_SPI2_PCS0_1 +#define PIN_SPI2_SCK PIN_SPI2_SCK_1 + +/* Connections via the Tower Primary Connector Side A + * --- -------------------- -------------------------------- + * PIN NAME USAGE + * --- -------------------- -------------------------------- + * A9 GPIO9 / CTS1 PTE10/UART_CTS + * A43 RXD1 PTE9/UART_RX + * A44 TXD1 PTE8/UART_TX + * A63 RSTOUT_b PTA9/FTM1_CH1 + */ + +#define PIN_UART5_CTS PIN_UART5_CTS_2 +#define PIN_FTM1_CH1 PIN_FTM1_CH1_1 + +/* Connections via the Tower Primary Connector Side B + * --- -------------------- -------------------------------- + * PIN NAME USAGE + * --- -------------------- -------------------------------- + * B21 GPIO1 / RTS1 PTE7/UART_RTS + * B37 PWM7 PTA8/FTM1_CH0 + * B38 PWM6 PTA9/FTM1_CH1 + * B41 CANRX0 PTE25/CAN1_RX + * B42 CANTX0 PTE24/CAN1_TX + * B44 SPI0_MISO PTA17/SPI0_SIN + * B45 SPI0_MOSI PTA16/SPI0_SOUT + * B46 SPI0_CS0_b PTA14/SPI0_PCS0 + * B48 SPI0_CLK PTA15/SPI0_SCK + * B50 SCL1 PTE1/I2C1_SCL + * B51 SDA1 PTE0/I2C1_SDA + * B52 GPIO5 / SD_CARD_DET PTA16 + */ + +#define PIN_UART3_RTS PIN_UART3_RTS_3 +#define PIN_CAN1_RX PIN_CAN1_RX_2 +#define PIN_CAN1_TX PIN_CAN1_TX_2 +#define PIN_SPI0_SIN PIN_SPI0_SIN_1 +#define PIN_SPI0_SOUT PIN_SPI0_SOUT_1 +#define PIN_SPI0_SCK PIN_SPI0_SCK_1 +#define PIN_SPI0_PCS0 PIN_SPI0_PCS0_1 +#define PIN_I2C1_SCL PIN_I2C1_SCL_2 +#define PIN_I2C1_SDA PIN_I2C1_SDA_2 /************************************************************************************ * Public Data @@ -144,37 +237,6 @@ extern "C" { EXTERN void kinetis_boardinitialize(void); -/************************************************************************************ - * Button support. - * - * Description: - * up_buttoninit() must be called to initialize button resources. After - * that, up_buttons() may be called to collect the current state of all - * buttons or up_irqbutton() may be called to register button interrupt - * handlers. - * - * After up_buttoninit() has been called, up_buttons() may be called to - * collect the state of all buttons. up_buttons() returns an 8-bit bit set - * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT - * definitions in board.h for the meaning of each bit. - * - * up_irqbutton() may be called to register an interrupt handler that will - * be called when a button is depressed or released. The ID value is a - * button enumeration value that uniquely identifies a button resource. See the - * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration - * value. The previous interrupt handler address is returned (so that it may - * restored, if so desired). - * - ************************************************************************************/ - -#ifdef CONFIG_ARCH_BUTTONS -EXTERN void up_buttoninit(void); -EXTERN uint8_t up_buttons(void); -#ifdef CONFIG_ARCH_IRQBUTTONS -EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); -#endif -#endif - #undef EXTERN #if defined(__cplusplus) } |