Blame |
Last modification |
View Log
| RSS feed
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include "main.h"
#include "menu.h"
#include "lcd.h"
#include "settings.h"
void toggle_display(void)
{
cli();
if (LCD_ORIENTATION == 0)
LCD_ORIENTATION = 4;
else LCD_ORIENTATION = 0;
eeprom_write_byte(&EEPromArray[EEPROM_ADR_ORIENTATION], LCD_ORIENTATION);
lcd_init();
sei();
}
void LCD_settings(void)
{
// uint8_t parameter;
char loop = 1;
while(loop)
{
lcd_cls();
lcd_printp(PSTR("Einstellungen:\r\n"),0);
lcd_printp(PSTR("\r\n"),0);
lcd_printp(PSTR("Orientierung\r\n"),0);
lcd_printp(PSTR("Linie\r\n"),0);
lcd_printp(PSTR("Rechteck\r\n"),0);
// lcd_printp(PSTR("\r\n"),0);
lcd_printp(PSTR("Exit\r\n"),0);
// parameter = menu_choose(1,5,0);
switch(menu_choose(2,5,15))
{
case 2:
toggle_display(); // LCD-Modus
break;
case 3:
lcd_cls();
lcd_line(10,20,100,50, 1);
while ((key != key_enter) && (key != key_esc));
break;
case 4:
lcd_cls();
lcd_rect (10,20,100,40, 1);
while ((key != key_enter) && (key != key_esc));
break;
case 5:
loop = 0;
break;
default:
loop = 0;
break;
}
}
}