peripherals/c/lcd.c
/*******************************************************************************
* Function Name: lcd_config_gpio
********************************************************************************
* Summary: Configures the GPIO pins used to implement the 8080 interface on the
*          LCD display
*
* Parameters 
*
* Return:
*  Nothing
*******************************************************************************/
Function Name: lcd_config_gpio
Summary: Configures the GPIO pins used to implement the 8080 interface on the
LCD display

Parameters

Nothing
Function Name : lcd_config_gpio Summary : Configures the GPIO pins used to implement the 8080 interface on the LCD display Parameters Nothing
void lcd_config_gpio(void)
{
  gpio_enable_port(LCD_CSX_GPIO_BASE);
  gpio_config_digital_enable( LCD_CSX_GPIO_BASE, LCD_CSX_PIN);
  gpio_config_enable_output( LCD_CSX_GPIO_BASE, LCD_CSX_PIN);
  gpio_config_enable_pullup( LCD_CSX_GPIO_BASE, LCD_CSX_PIN);
  LCD_CSX =  LINE_HIGH;
  gpio_enable_port(LCD_DCX_INSTR_GPIO_BASE);
  gpio_config_digital_enable( LCD_DCX_INSTR_GPIO_BASE, LCD_DCX_INSTR_PIN);
  gpio_config_enable_output( LCD_DCX_INSTR_GPIO_BASE, LCD_DCX_INSTR_PIN);
  gpio_config_enable_pullup( LCD_DCX_INSTR_GPIO_BASE, LCD_DCX_INSTR_PIN);
  LCD_DCX = LCD_DCX_DATA_PACKET;
  gpio_enable_port(LCD_WRX_GPIO_BASE);
  gpio_config_digital_enable( LCD_WRX_GPIO_BASE, LCD_WRX_PIN);
  gpio_config_enable_output( LCD_WRX_GPIO_BASE, LCD_WRX_PIN);
  gpio_config_enable_pullup( LCD_WRX_GPIO_BASE, LCD_WRX_PIN);
 LCD_WRX = LINE_HIGH;
  gpio_enable_port(LCD_DATA_GPIO_BASE);
  gpio_config_digital_enable( LCD_DATA_GPIO_BASE, LCD_DATA_PINS);
  gpio_config_enable_output( LCD_DATA_GPIO_BASE, LCD_DATA_PINS);
  gpio_config_enable_pullup( LCD_DATA_GPIO_BASE, LCD_DATA_PINS);
  LCD_DATA = 0x00;
}
void lcd_config_gpio ( void ) { gpio_enable_port ( LCD_CSX_GPIO_BASE ) ; gpio_config_digital_enable ( LCD_CSX_GPIO_BASE , LCD_CSX_PIN ) ; gpio_config_enable_output ( LCD_CSX_GPIO_BASE , LCD_CSX_PIN ) ; gpio_config_enable_pullup ( LCD_CSX_GPIO_BASE , LCD_CSX_PIN ) ; LCD_CSX = LINE_HIGH ; gpio_enable_port ( LCD_DCX_INSTR_GPIO_BASE ) ; gpio_config_digital_enable ( LCD_DCX_INSTR_GPIO_BASE , LCD_DCX_INSTR_PIN ) ; gpio_config_enable_output ( LCD_DCX_INSTR_GPIO_BASE , LCD_DCX_INSTR_PIN ) ; gpio_config_enable_pullup ( LCD_DCX_INSTR_GPIO_BASE , LCD_DCX_INSTR_PIN ) ; LCD_DCX = LCD_DCX_DATA_PACKET ; gpio_enable_port ( LCD_WRX_GPIO_BASE ) ; gpio_config_digital_enable ( LCD_WRX_GPIO_BASE , LCD_WRX_PIN ) ; gpio_config_enable_output ( LCD_WRX_GPIO_BASE , LCD_WRX_PIN ) ; gpio_config_enable_pullup ( LCD_WRX_GPIO_BASE , LCD_WRX_PIN ) ; LCD_WRX = LINE_HIGH ; gpio_enable_port ( LCD_DATA_GPIO_BASE ) ; gpio_config_digital_enable ( LCD_DATA_GPIO_BASE , LCD_DATA_PINS ) ; gpio_config_enable_output ( LCD_DATA_GPIO_BASE , LCD_DATA_PINS ) ; gpio_config_enable_pullup ( LCD_DATA_GPIO_BASE , LCD_DATA_PINS ) ; LCD_DATA = 0x00 ; }
Function Name: lcd_config_gpio
Summary: Configures the GPIO pins used to implement the 8080 interface on the
LCD display
Function Name : lcd_config_gpio Summary : Configures the GPIO pins used to implement the 8080 interface on the LCD display
// Configure Chip Select // Configure Data/Instruction Select // Configure Write Signal // Configure the Data pins