![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Go to the source code of this file.
Data Structures | |
struct | TSC2046_Init_Type |
#define | TSC_START (0x01 << 7) |
#define | TSC_CHANNEL_X (0x05 << 4) /* differential */ |
#define | TSC_CHANNEL_Y (0x01 << 4) /* differential */ |
#define | TSC_CHANNEL_Z1 (0x03 << 4) /* differential */ |
#define | TSC_CHANNEL_Z2 (0x04 << 4) /* differential */ |
#define | TSC_8BIT (0x01 << 3) |
#define | TSC_12BIT (0x00 << 3) |
#define | TSC_PD 0x00 |
#define | TSC_ADC_ON 0x01 |
#define | TSC_REF_ON 0x02 |
#define | TSC_CONVERSION_MODE TSC_8BIT |
#define | TSC_SER_MODE (0x01 << 2) /* Single-Ended Reference Mode */ |
#define | TSC_DFR_MODE (0x00 << 2) /* Differential Reference Mode */ |
#define | X_MEASURE (TSC_START | TSC_CHANNEL_X | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
#define | Y_MEASURE (TSC_START | TSC_CHANNEL_Y | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
#define | Z1_MEASURE (TSC_START | TSC_CHANNEL_Z1 | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
#define | Z2_MEASURE (TSC_START | TSC_CHANNEL_Z2 | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
#define | PWRDOWN (TSC_START | TSC_CHANNEL_Y | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_PD) |
#define | DC_CMD (Chip_GPIO_WritePortBit(0x07, 8, false)) |
#define | DC_DATA (Chip_GPIO_WritePortBit(0x07, 8, true)) |
#define | TSC2046_CONVERSION_BITS 12 |
#define | TSC2046_COORD_MAX (0xFFF) |
#define | TSC2046_DELTA_VARIANCE (0x50) |
#define | COORD_GET_NUM (10) |
#define | UDA1380_REG_EVALCLK_DEFAULT_VALUE (0xF << 8 | 0x3 << 4 | 1 << 1) |
#define | UDA1380_REG_I2S_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_PWRCTRL_DEFAULT_VALUE (1 << 15 | 1 << 13 | 1 << 10 | 1 << 8 | 1 << 6 | 1 << 4 | 0x0F) |
#define | UDA1380_REG_ANAMIX_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_HEADAMP_DEFAULT_VALUE ( 1 << 9 | 2) |
#define | UDA1380_REG_MSTRVOL_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_MIXVOL_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_MODEBBT_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_MSTRMUTE_DEFAULT_VALUE (2 << 8 | 2) |
#define | UDA1380_REG_MIXSDO_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_DECVOL_DEFAULT_VALUE 0xE4E4 /* Decrease Volume -28dB */ |
#define | UDA1380_REG_PGA_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_ADC_DEFAULT_VALUE 0x0001 /* Apply 0bB VGA Gain, enable DC Filter */ |
#define | UDA1380_REG_AGC_DEFAULT_VALUE 0x0000 |
#define | UDA1380_REG_L3_DEFAULT_VALUE 0x0000 |
enum | UDA1380_REG { UDA_EVALM_CLK = 0x00, UDA_BUS_CTRL, UDA_POWER_CTRL, UDA_ANALOG_CTRL, UDA_HPAMP_CTRL, UDA_MASTER_VOL_CTRL = 0x10, UDA_MIXER_VOL_CTRL, UDA_MODE_CTRL, UDA_MUTE_CTRL, UDA_MIXER_FILTER_CTRL, UDA_DEC_VOL_CTRL = 0x20, UDA_PGA_CTRL, UDA_ADC_CTRL, UDA_AGC_CTRL, UDA_TOTAL_REG, UDA_EVALM_CLK = 0x00, UDA_BUS_CTRL, UDA_POWER_CTRL, UDA_ANALOG_CTRL, UDA_HPAMP_CTRL, UDA_MASTER_VOL_CTRL = 0x10, UDA_MIXER_VOL_CTRL, UDA_MODE_CTRL, UDA_MUTE_CTRL, UDA_MIXER_FILTER_CTRL, UDA_DEC_VOL_CTRL = 0x20, UDA_PGA_CTRL, UDA_ADC_CTRL, UDA_AGC_CTRL, UDA_TOTAL_REG, UDA_EVALM_CLK = 0x00, UDA_BUS_CTRL, UDA_POWER_CTRL, UDA_ANALOG_CTRL, UDA_HPAMP_CTRL, UDA_MASTER_VOL_CTRL = 0x10, UDA_MIXER_VOL_CTRL, UDA_MODE_CTRL, UDA_MUTE_CTRL, UDA_MIXER_FILTER_CTRL, UDA_DEC_VOL_CTRL = 0x20, UDA_PGA_CTRL, UDA_ADC_CTRL, UDA_AGC_CTRL, UDA_TOTAL_REG } |
static const uint8_t | ledports [] = {4, 7, 7, 7} |
static const uint8_t | ledbits [] = {1, 5, 6, 8} |
static TSC2046_Init_Type | TSC_Config |
const LCD_Config_Type | EA320x240 |
static uint16_t | UDA_sys_regs_dat [] |
static uint16_t | UDA_interfil_regs_dat [] |
static uint16_t | UDA_decimator_regs_dat [] |
uint32_t | SystemCoreClock |
Current system clock rate, mainly used for sysTick. | |
static void | DelayMs (uint32_t ms) |
static void | lcdPinConfig (void) |
static void | writeToReg (uint16_t addr, uint16_t data) |
static void | ssd1289_init (void) |
static void | TSC2046_ReadWrite (uint8_t command, uint16_t *data) |
static Status | EvalCoord (uint8_t command, uint16_t *coord) |
static int16_t | TSCCalibrate (int16_t Coord, int16_t MinVal, int16_t MaxVal, int16_t TrueSize) |
static void | delay (uint32_t i) |
static void | UDA_Reg_write (UDA1380_REG reg, unsigned short value, I2C_M_SETUP_Type *I2C_Config) |
static uint16_t | UDA_Reg_read (UDA1380_REG reg) |
static Status | UDA1380_init (I2C_M_SETUP_Type *I2C_Config, Board_Audio_Input_Sel_Type audio_in_sel) |
void | Board_UART_Init (LPC_USART_Type *UARTx) |
Initialize pin muxing for a UART. | |
void | Board_Debug_Init (void) |
Initializes board UART for output, required for printf redirection. | |
void | Board_UARTPutChar (char ch) |
Sends a single character on the UART, required for printf redirection. | |
int | Board_UARTGetChar (void) |
Get a single character from the UART, required for scanf input. | |
void | Board_UARTPutSTR (char *str) |
Prints a string to the UART. | |
void | Board_LED_Init () |
Initializes board LED(s) | |
void | Board_LED_Set (uint8_t LEDNumber, bool On) |
Sets the state of a board LED to on or off. | |
bool | Board_LED_Test (uint8_t LEDNumber) |
Returns the current state of a board LED. | |
void | Board_Buttons_Init (void) |
Initialize button(s) interface on board. | |
uint32_t | Buttons_GetStatus (void) |
Returns button(s) state on board. | |
void | Board_Joystick_Init (void) |
Initialize joystick interface on board. | |
uint8_t | Joystick_GetStatus (void) |
Returns joystick states on board. | |
void | SystemCoreClockUpdate (void) |
Update system core clock rate, should be called if the system has a clock rate change. | |
void | Board_ENET_GetMacADDR (uint8_t *mcaddr) |
Returns the MAC address assigned to this board. | |
void | Board_Init (void) |
Set up and initialize all required blocks and functions related to the board hardware. | |
void | Board_ADC_Init (void) |
Sets up board specific ADC interface. | |
void | Board_I2C_Init (LPC_I2C_Type *I2Cx) |
Sets up board specific I2C interface. | |
void | Board_LCD_Init (void) |
Initialize the LCD interface. | |
void | Init_Touch_Controller (void) |
Initialize TSC2046 touchscreen controller. | |
bool | GetTouchPos (int16_t *pX, int16_t *pY) |
Get Touch coordinates. | |
void | Board_LCD_Set_Backlight (uint8_t Intensity) |
Turn on Board LCD Backlight. | |
void | Board_SDMMC_Init (void) |
Initialize pin muxing for SDMMC interface. | |
void | Board_SSP_Init (LPC_SSP_Type *SSPx) |
Initialize pin muxing for SSP interface. | |
void | Board_Audio_Init (LPC_I2S_Type *I2Sx, Board_Audio_Input_Sel_Type audio_in_sel) |
Initialize I2S interface for the board and UDA1380. | |
void | Serial_CreateStream (void *Stream) |
FIXME. | |
#define COORD_GET_NUM (10) |
Definition at line 99 of file board_hitex_eva_18504350.c.
#define DC_CMD (Chip_GPIO_WritePortBit(0x07, 8, false)) |
Definition at line 87 of file board_hitex_eva_18504350.c.
#define DC_DATA (Chip_GPIO_WritePortBit(0x07, 8, true)) |
Definition at line 88 of file board_hitex_eva_18504350.c.
#define PWRDOWN (TSC_START | TSC_CHANNEL_Y | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_PD) |
Definition at line 75 of file board_hitex_eva_18504350.c.
#define TSC2046_CONVERSION_BITS 12 |
Definition at line 90 of file board_hitex_eva_18504350.c.
#define TSC2046_COORD_MAX (0xFFF) |
Definition at line 93 of file board_hitex_eva_18504350.c.
#define TSC2046_DELTA_VARIANCE (0x50) |
Definition at line 94 of file board_hitex_eva_18504350.c.
#define TSC_12BIT (0x00 << 3) |
Definition at line 58 of file board_hitex_eva_18504350.c.
#define TSC_8BIT (0x01 << 3) |
Definition at line 57 of file board_hitex_eva_18504350.c.
#define TSC_ADC_ON 0x01 |
Definition at line 60 of file board_hitex_eva_18504350.c.
#define TSC_CHANNEL_X (0x05 << 4) /* differential */ |
Definition at line 53 of file board_hitex_eva_18504350.c.
#define TSC_CHANNEL_Y (0x01 << 4) /* differential */ |
Definition at line 54 of file board_hitex_eva_18504350.c.
#define TSC_CHANNEL_Z1 (0x03 << 4) /* differential */ |
Definition at line 55 of file board_hitex_eva_18504350.c.
#define TSC_CHANNEL_Z2 (0x04 << 4) /* differential */ |
Definition at line 56 of file board_hitex_eva_18504350.c.
#define TSC_CONVERSION_MODE TSC_8BIT |
Definition at line 65 of file board_hitex_eva_18504350.c.
#define TSC_DFR_MODE (0x00 << 2) /* Differential Reference Mode */ |
Definition at line 69 of file board_hitex_eva_18504350.c.
#define TSC_PD 0x00 |
Definition at line 59 of file board_hitex_eva_18504350.c.
#define TSC_REF_ON 0x02 |
Definition at line 61 of file board_hitex_eva_18504350.c.
#define TSC_SER_MODE (0x01 << 2) /* Single-Ended Reference Mode */ |
Definition at line 68 of file board_hitex_eva_18504350.c.
#define TSC_START (0x01 << 7) |
Definition at line 52 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_ADC_DEFAULT_VALUE 0x0001 /* Apply 0bB VGA Gain, enable DC Filter */ |
Definition at line 163 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_AGC_DEFAULT_VALUE 0x0000 |
Definition at line 164 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_ANAMIX_DEFAULT_VALUE 0x0000 |
Definition at line 152 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_DECVOL_DEFAULT_VALUE 0xE4E4 /* Decrease Volume -28dB */ |
Definition at line 161 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_EVALCLK_DEFAULT_VALUE (0xF << 8 | 0x3 << 4 | 1 << 1) |
Definition at line 148 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_HEADAMP_DEFAULT_VALUE ( 1 << 9 | 2) |
Definition at line 153 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_I2S_DEFAULT_VALUE 0x0000 |
Definition at line 149 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_L3_DEFAULT_VALUE 0x0000 |
Definition at line 166 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_MIXSDO_DEFAULT_VALUE 0x0000 |
Definition at line 159 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_MIXVOL_DEFAULT_VALUE 0x0000 |
Definition at line 156 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_MODEBBT_DEFAULT_VALUE 0x0000 |
Definition at line 157 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_MSTRMUTE_DEFAULT_VALUE (2 << 8 | 2) |
Definition at line 158 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_MSTRVOL_DEFAULT_VALUE 0x0000 |
Definition at line 155 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_PGA_DEFAULT_VALUE 0x0000 |
Definition at line 162 of file board_hitex_eva_18504350.c.
#define UDA1380_REG_PWRCTRL_DEFAULT_VALUE (1 << 15 | 1 << 13 | 1 << 10 | 1 << 8 | 1 << 6 | 1 << 4 | 0x0F) |
Definition at line 151 of file board_hitex_eva_18504350.c.
#define X_MEASURE (TSC_START | TSC_CHANNEL_X | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
Definition at line 71 of file board_hitex_eva_18504350.c.
#define Y_MEASURE (TSC_START | TSC_CHANNEL_Y | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
Definition at line 72 of file board_hitex_eva_18504350.c.
#define Z1_MEASURE (TSC_START | TSC_CHANNEL_Z1 | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
Definition at line 73 of file board_hitex_eva_18504350.c.
#define Z2_MEASURE (TSC_START | TSC_CHANNEL_Z2 | TSC_CONVERSION_MODE | TSC_DFR_MODE | TSC_ADC_ON) |
Definition at line 74 of file board_hitex_eva_18504350.c.
enum UDA1380_REG |
Definition at line 130 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 394 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 202 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 344 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 209 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 260 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 317 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 372 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 416 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 409 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 399 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 233 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 49 of file board_hitex_eva_18504350.c.
|
static |
Local variables
Definition at line 102 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 186 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 178 of file board_hitex_eva_18504350.c.
|
static |
Definition at line 169 of file board_hitex_eva_18504350.c.