fremoclock  1_3A01
FREMO Clock - Software for UTG
UserInterfaceLcdProgram.c
Go to the documentation of this file.
1 
23 /*
24  Copyright (C) 2007 Bernd Wisotzki
25 
26  This library is free software; you can redistribute it and/or
27  modify it under the terms of the GNU Lesser General Public
28  License as published by the Free Software Foundation; either
29  version 2.1 of the License, or (at your option) any later version.
30 
31  This library is distributed in the hope that it will be useful,
32  but WITHOUT ANY WARRANTY; without even the implied warranty of
33  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34  Lesser General Public License for more details.
35 
36  You should have received a copy of the GNU Lesser General Public
37  License along with this library; if not, write to the Free Software
38  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 */
40 
41 /* -- System wide includes -------------------------------------------------- */
42 #include <stdint.h> // typedef uint8_t
43 #include <avr/pgmspace.h> // PSTR
44 
45 /* -- Special Includes e.g. Onboard or direct attached Equipment ------------ */
46 #include "ClockKernel.h" // typedef fclock_t, ClockGetTime()
47 #include "lcd.h" // lcd_goto(), lcd_puts_P()
48 #include "UserInterfaceLcd.h" // UserInterfaceLcdWriteTimeFactor(),
49  // UserInterfaceLcdWriteTime()
50 #include "UserInterfaceMenu.h" // typedef menuSet0_t
52 
53 /* -- Standard functions ---------------------------------------------------- */
54 
59 void UserInterfaceLcdProgramPulseWidth(uint8_t pulseWidth)
60 {
61  lcd_goto(0, 0);
63  lcd_puts_P(PSTR(" Sek PrPuB"));
64  lcd_goto(0, 1);
65  lcd_puts_P(PSTR("Up/Down Zurck"));
66 }
67 
73 {
74  lcd_goto(0, 0);
75  lcd_puts_P(PSTR(" "));
76  lcd_puts_P(PSTR(" PrSe0"));
77  lcd_goto(5, 1);
78  lcd_puts_P(PSTR(" "));
79  switch (subMenuSelection)
80  {
81  case MENU_SET0_BACK: lcd_puts_P(PSTR("Zurck")); break;
82  case MENU_SET0_SET0: lcd_puts_P(PSTR("PrSe0")); break;
83  }
84  lcd_goto(0, 1);
85  fclock_t clock = ClockGetTime();
87 }
void UserInterfaceLcdProgramSet0(menuSet0_t subMenuSelection)
Write on LCD "PrSe0" (set time to midnight).
Subroutines for UserInterfaceMenu.
A struct with hour and minute.
Definition: ClockKernel.h:69
void UserInterfaceLcdProgramPulseWidth(uint8_t pulseWidth)
Write on LCD "PrPub" (edit pulse width).
Subroutines for access to LCD for Program.
uint8_t minute
minute value 0..59
Definition: ClockKernel.h:71
void UserInterfaceLcdWriteTime(uint8_t uchour, uint8_t ucminute)
Write clock value to lcd.
void lcd_goto(uint8_t x, uint8_t y)
Go to the specified position.
Definition: lcd.c:210
void lcd_puts_P(const char *s)
Write a string from progmem of chars to the LCD.
Definition: lcd.c:192
Subroutines for UserInterfaceLcd.
uint8_t hour
hour value 0..23
Definition: ClockKernel.h:70
LCD interface header file.
"Zurck" | Zurueck
"PrSe0" | Aktuelle Zeit auf 00:00
menuSet0_t
Enum used for Menu setting time to midnight.
User function called by timer ISR.
void UserInterfaceLcdWriteTimeFactor(uint8_t ucfactor)
Write time factor to lcd.
fclock_t ClockGetTime(void)
Get actual time.
Definition: ClockKernel.c:317