2 * @brief NGX Xplorer 1830/4330 board file
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __BOARD_NGX_XPLORER_18304330_H_
\r
33 #define __BOARD_NGX_XPLORER_18304330_H_
\r
36 #include "board_api.h"
\r
37 #include "lpc_phy.h"
\r
38 #include "uda1380.h"
\r
44 /** @defgroup BOARD_NGX_XPLORER_18304330 LPC1830 and LPC4330 NGX Xplorer board support functions
\r
45 * @ingroup BOARDS_18XX_43XX
\r
49 /** @defgroup BOARD_NGX_XPLORER_1830_OPTIONS BOARD: LPC1830 NGX Xplorer board builds options
\r
50 * This board has options that configure its operation at build-time.<br>
\r
52 * For more information on driver options see<br>
\r
53 * @ref LPCOPEN_DESIGN_ARPPROACH<br>
\r
61 /** @defgroup BOARD_NGX_XPLORER_4330_OPTIONS BOARD: LPC4330 NGX Xplorer board builds options
\r
62 * This board has options that configure its operation at build-time.<br>
\r
64 * For more information on driver options see<br>
\r
65 * @ref LPCOPEN_DESIGN_ARPPROACH<br>
\r
73 #define BOARD_NGX_XPLORER_18304330
\r
75 #define I2CDEV_UDA1380_ADDR (0x34 >> 1)
\r
76 #define UDA1380_I2C_BUS I2C0
\r
78 /* For USBLIB examples */
\r
79 #define LEDS_LED1 0x01
\r
80 #define LEDS_LED2 0x02
\r
81 #define LEDS_LED3 0x04
\r
82 #define LEDS_LED4 0x08
\r
83 #define LEDS_NO_LEDS 0x00
\r
84 #define BUTTONS_BUTTON1 0x01
\r
86 #define JOY_DOWN 0x02
\r
87 #define JOY_LEFT 0x04
\r
88 #define JOY_RIGHT 0x08
\r
89 #define JOY_PRESS 0x10
\r
90 #define NO_BUTTON_PRESSED 0x00
\r
92 /*Define if use SDCARD for Mass Storage Example*/
\r
93 //#define CFG_SDCARD
\r
95 #define BUTTONS_BUTTON1_GPIO_PORT_NUM 0
\r
96 #define BUTTONS_BUTTON1_GPIO_BIT_NUM 7
\r
97 #define LED1_GPIO_PORT_NUM 1
\r
98 #define LED1_GPIO_BIT_NUM 11
\r
99 #define LED2_GPIO_PORT_NUM 1
\r
100 #define LED2_GPIO_BIT_NUM 12
\r
103 * @brief Sets up board specific I2C interface
\r
104 * @param id : I2C Peripheral ID (I2C0, I2C1)
\r
107 void Board_I2C_Init(I2C_ID_T id);
\r
110 * @brief Sets up I2C Fast Plus mode
\r
111 * @param id : Must always be I2C0
\r
113 * @note This function must be called before calling
\r
114 * Chip_I2C_SetClockRate() to set clock rates above
\r
115 * normal range 100KHz to 400KHz. Only I2C0 supports
\r
118 STATIC INLINE void Board_I2C_EnableFastPlus(I2C_ID_T id)
\r
120 Chip_SCU_I2C0PinConfig(I2C0_FAST_MODE_PLUS);
\r
124 * @brief Disable I2C Fast Plus mode and enables default mode
\r
125 * @param id : Must always be I2C0
\r
127 * @sa Board_I2C_EnableFastPlus()
\r
129 STATIC INLINE void Board_I2C_DisableFastPlus(I2C_ID_T id)
\r
131 Chip_SCU_I2C0PinConfig(I2C0_STANDARD_FAST_MODE);
\r
135 * @brief Initializes board specific GPIO Interrupt
\r
138 void Board_GPIO_Int_Init(void);
\r
141 * @brief Initialize pin muxing for SSP interface
\r
142 * @param pSSP : Pointer to SSP interface to initialize
\r
145 void Board_SSP_Init(LPC_SSP_T *pSSP);
\r
148 * @brief Returns the MAC address assigned to this board
\r
149 * @param mcaddr : Pointer to 6-byte character array to populate with MAC address
\r
152 void Board_ENET_GetMacADDR(uint8_t *mcaddr);
\r
155 * @brief Initialize pin muxing for a UART
\r
156 * @param pUART : Pointer to UART register block for UART pins to init
\r
159 void Board_UART_Init(LPC_USART_T *pUART);
\r
162 * @brief Initialize pin muxing for SDMMC interface
\r
165 void Board_SDMMC_Init(void);
\r
168 * @brief Initialize button(s) interface on board
\r
171 void Board_Buttons_Init(void);
\r
174 * @brief Initialize joystick interface on board
\r
177 void Board_Joystick_Init(void);
\r
180 * @brief Returns joystick states on board
\r
181 * @return Returns a JOY_* value, ir JOY_PRESS or JOY_UP
\r
183 uint8_t Joystick_GetStatus(void);
\r
186 * @brief Returns button(s) state on board
\r
187 * @return Returns BUTTONS_BUTTON1 if button1 is pressed
\r
189 uint32_t Buttons_GetStatus (void);
\r
192 * @brief Initialize I2S interface for the board and UDA1380
\r
193 * @param pI2S : Pointer to I2S register interface used on this board
\r
194 * @param micIn : If 1 MIC will be used as input, if 0 LINE_IN will be used
\r
197 void Board_Audio_Init(LPC_I2S_T *pI2S, int micIn);
\r
201 * @param Stream : FIXME
\r
204 void Serial_CreateStream(void *Stream);
\r
214 #endif /* __BOARD_NGX_XPLORER_18304330_H_ */
\r