Exemple #1
0
/*** Function    : lcdBegin
**   Parameters  : None
**   Return      : None
**   Description : It will initiate the lcd
**/
void lcdBegin(void)
{
	lcd_port_init();
    #if LCD_MODE == 1
	lcd_command(LCD_8BIT_2_LINE_5_x_7);
	_lcd_delay;
    #elif LCD_MODE == 2
	lcdReset();
	lcd_command(LCD_4BIT_2_LINE_5_x_7);
    #endif
	lcd_command(LCD_DISPLAY_ON_CURSOR_OFF);
	lcd_command(LCD_CLEAR_ALSO_DDRAM);
	lcd_command(LCD_ADDRESS_ROW1);
}
Exemple #2
0
void user_init(void) {
	gpio_init();
	stdout_init();
	easygpio_pinMode(LCD_Light, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(LCD_SCE, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(LCD_clk, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(LCD_Data, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(LCD_D_C, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(LCD_RST, EASYGPIO_NOPULL, EASYGPIO_OUTPUT);
	easygpio_pinMode(SWITCH, EASYGPIO_PULLUP, EASYGPIO_INPUT);
	easygpio_outputDisable(SWITCH);
	lcdReset();
	lightOn();
	wifi_station_set_auto_connect(false);
	wifi_station_set_reconnect_policy(true);

	system_init_done_cb(&initDone_cb);
}