LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
board_ngx_xplorer_18304330.h
Go to the documentation of this file.
1
/*
2
* @brief NGX Xplorer 1830/4330 board file
3
*
4
* @note
5
* Copyright(C) NXP Semiconductors, 2012
6
* All rights reserved.
7
*
8
* @par
9
* Software that is described herein is for illustrative purposes only
10
* which provides customers with programming information regarding the
11
* LPC products. This software is supplied "AS IS" without any warranties of
12
* any kind, and NXP Semiconductors and its licensor disclaim any and
13
* all warranties, express or implied, including all implied warranties of
14
* merchantability, fitness for a particular purpose and non-infringement of
15
* intellectual property rights. NXP Semiconductors assumes no responsibility
16
* or liability for the use of the software, conveys no license or rights under any
17
* patent, copyright, mask work right, or any other intellectual property rights in
18
* or to any products. NXP Semiconductors reserves the right to make changes
19
* in the software without notification. NXP Semiconductors also makes no
20
* representation or warranty that such application will be suitable for the
21
* specified use without further testing or modification.
22
*
23
* @par
24
* Permission to use, copy, modify, and distribute this software and its
25
* documentation is hereby granted, under NXP Semiconductors' and its
26
* licensor's relevant copyrights in the software, without fee, provided that it
27
* is used in conjunction with NXP Semiconductors microcontrollers. This
28
* copyright, permission, and disclaimer notice must appear in all copies of
29
* this code.
30
*/
31
32
#ifndef __BOARD_NGX_XPLORER_18304330_H_
33
#define __BOARD_NGX_XPLORER_18304330_H_
34
35
#include "
chip.h
"
36
#include "
board_api.h
"
37
#include "
lpc_phy.h
"
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
77
#define BOARD_NGX_XPLORER_18304330
78
79
#define I2CDEV_UDA1380_ADDR (0x34 >> 1)
80
81
#define UDA1380_REG_EVALCLK_DEFAULT_VALUE (0xF << 8 | 0x3 << 4 | 1 << 1)
82
#define UDA1380_REG_I2S_DEFAULT_VALUE 0x0000
83
84
#define UDA1380_REG_PWRCTRL_DEFAULT_VALUE (1 << 15 | 1 << 13 | 1 << 10 | 1 << 8 | 1 << 6 | 1 << 4 | 0x0F)
85
#define UDA1380_REG_ANAMIX_DEFAULT_VALUE 0x0000
86
#define UDA1380_REG_HEADAMP_DEFAULT_VALUE ( 1 << 9 | 2)
87
88
#define UDA1380_REG_MSTRVOL_DEFAULT_VALUE 0x0000
89
#define UDA1380_REG_MIXVOL_DEFAULT_VALUE 0x0000
90
#define UDA1380_REG_MODEBBT_DEFAULT_VALUE 0x0000
91
#define UDA1380_REG_MSTRMUTE_DEFAULT_VALUE (2 << 8 | 2)
92
#define UDA1380_REG_MIXSDO_DEFAULT_VALUE 0x0000
93
94
#define UDA1380_REG_DECVOL_DEFAULT_VALUE 0xE4E4
/* Decrease Volume -28dB */
95
#define UDA1380_REG_PGA_DEFAULT_VALUE 0x0000
96
#define UDA1380_REG_ADC_DEFAULT_VALUE 0x0001
/* Apply 0bB VGA Gain, enable DC Filter */
97
#define UDA1380_REG_AGC_DEFAULT_VALUE 0x0000
98
#define UDA1380_REG_L3_DEFAULT_VALUE 0x0000
99
100
/* For USBLIB examples */
101
#define LEDS_LED1 0x01
102
#define LEDS_LED2 0x02
103
#define LEDS_LED3 0x04
104
#define LEDS_LED4 0x08
105
#define LEDS_NO_LEDS 0x00
106
#define BUTTONS_BUTTON1 0x01
107
#define JOY_UP 0x01
108
#define JOY_DOWN 0x02
109
#define JOY_LEFT 0x04
110
#define JOY_RIGHT 0x08
111
#define JOY_PRESS 0x10
112
#define NO_BUTTON_PRESSED 0x00
113
114
#define BUTTONS_BUTTON1_GPIO_PORT_NUM 0
115
#define BUTTONS_BUTTON1_GPIO_BIT_NUM 7
116
#define LED1_GPIO_PORT_NUM 1
117
#define LED1_GPIO_BIT_NUM 11
118
#define LED2_GPIO_PORT_NUM 1
119
#define LED2_GPIO_BIT_NUM 12
120
121
typedef
enum
{
122
MCB_18XX_AUDIO_MIC_SELECT
= 1 << 2 | 1 << 3,
123
MCB_18XX_AUDIO_LINE_IN_SELECT
= 0x00,
124
}
Board_Audio_Input_Sel_Type
;
125
126
/* UDA1380 Register Address */
127
typedef
enum
{
128
UDA_EVALM_CLK
= 0x00,
129
UDA_BUS_CTRL
,
130
UDA_POWER_CTRL
,
131
UDA_ANALOG_CTRL
,
132
UDA_HPAMP_CTRL
,
133
UDA_MASTER_VOL_CTRL
= 0x10,
134
UDA_MIXER_VOL_CTRL
,
135
UDA_MODE_CTRL
,
136
UDA_MUTE_CTRL
,
137
UDA_MIXER_FILTER_CTRL
,
138
UDA_DEC_VOL_CTRL
= 0x20,
139
UDA_PGA_CTRL
,
140
UDA_ADC_CTRL
,
141
UDA_AGC_CTRL
,
142
UDA_TOTAL_REG
143
}
UDA1380_REG
;
144
150
void
Board_I2C_Init
(
LPC_I2C_Type
*I2Cx);
151
156
void
Board_GPIO_Int_Init
(
void
);
157
163
void
Board_SSP_Init
(
LPC_SSP_Type
*SSPx);
164
170
void
Board_ENET_GetMacADDR
(uint8_t *mcaddr);
171
177
void
Board_UART_Init
(
LPC_USART_Type
*UARTx);
178
183
void
Board_SDMMC_Init
(
void
);
184
189
void
Board_Buttons_Init
(
void
);
190
195
void
Board_Joystick_Init
(
void
);
196
201
uint8_t
Joystick_GetStatus
(
void
);
202
207
uint32_t
Buttons_GetStatus
(
void
);
208
215
void
Board_Audio_Init
(
LPC_I2S_Type
*I2Sx,
Board_Audio_Input_Sel_Type
audio_in_sel);
216
222
void
Serial_CreateStream
(
void
*Stream);
223
228
#ifdef __cplusplus
229
}
230
#endif
231
232
#endif
/* __BOARD_NGX_XPLORER_18304330_H_ */
software
lpc_core
lpc_board
boards_18xx_43xx
ngx_xplorer_18304330
board_ngx_xplorer_18304330.h
Generated on Fri Nov 16 2012 13:36:40 for LPCOpen Platform by
1.8.2