Commit 2a84f0aa authored by Martin Vítek's avatar Martin Vítek
Browse files

Add wellcome()

parent 7befa503
......@@ -12,6 +12,12 @@ static void uart_tx(const unsigned char data);
static uint8_t uart_rx();
static void uart_string(const char *text);
static void wellcome();
const HD44780_config lcd_config = {PORTD, PIN2_bm, PIN3_bm, PIN4_bm, PIN5_bm, PIN6_bm, PIN7_bm};
HD44780 lcd(lcd_config);
int main()
{
gpio led(PORTD, PIN0_bm);
......@@ -21,22 +27,14 @@ int main()
backlight.set_direction(OUTPUT);
backlight.on();
clock_ini();
uart_ini();
uart_string("\n\rSafe Soldering Station v1.0\n\r");
PORTC.DIRSET = PIN4_bm | PIN5_bm | PIN6_bm | PIN7_bm;
PORTC.OUTCLR = PIN4_bm | PIN5_bm | PIN6_bm | PIN7_bm;
const HD44780_config lcd_config = {PORTD, PIN2_bm, PIN3_bm, PIN4_bm, PIN5_bm, PIN6_bm, PIN7_bm};
HD44780 lcd(lcd_config);
clock_ini();
uart_ini();
lcd.init();
lcd.gotoxy_new(0,0);
lcd.write_text("Safe Soldering");
lcd.gotoxy_new(1,4);
lcd.write_text("Station v1.0");
wellcome();
for(;;)
{
......@@ -112,3 +110,20 @@ static void uart_string(const char *text)
text++;
}
}
static void wellcome()
{
uart_string("\n\rSafe Soldering Station v1.0\n\r");
lcd.gotoxy_new(0,0);
lcd.write_text("Safe Soldering");
lcd.gotoxy_new(1,4);
lcd.write_text("Station v1.0");
_delay_ms(750);
lcd.clear();
lcd.gotoxy_new(0,0);
lcd.write_text("by OK1KVK.cz");
lcd.gotoxy_new(1,12);
lcd.write_text("2016");
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment