Home

Functions

dwengoClock.h File Reference

Clock functionality. More...

#include "dwengoBoard.h"
#include "dwengoInterrupt.h"
#include "dwengoLCD.h"

Functions

char getHours (void)
 Get the clocks hours.
char getMins (void)
 Get the clocks minutes.
char getSecs (void)
 Get the clocks seconds.
void setClock (char h, char m, char s)
 Set the clock.
void setClockPosition (char l, char p)
 Set the clock position.
void hideClock (void)
 Hide the clock.
void showClock (void)
 Show the clock.
void clockISR (void)
void initClock (void)
 Initialize the clock.

Detailed Description

Clock functionality.

Functionality for keeping time and showing time on the LCD.


Function Documentation

char getHours ( void  )

Get the clocks hours.

Returns the number of hours on the clock.

char getMins ( void  )

Get the clocks minutes.

Returns the number of minutes on the clock.

char getSecs ( void  )

Get the clocks seconds.

Returns the number of seconds on the clock.

void hideClock ( void  )

Hide the clock.

Hides the clock.

void initClock ( void  )

Initialize the clock.

This routine initializes the clock functionality. It configures timer0 and dispatches the clock interrupt service routine using the Dwengo interrupt library. The clockISR is called every second to update the time. If the clock is visible, the routine also will print the updated time on the LCD in the position set by the setClockPosition().

void setClock ( char  h,
char  m,
char  s 
)

Set the clock.

Sets the clock's hours, minutes and seconds.

Parameters:
hThe new value for the clocks hours.
mThe new value for the clocks minutes.
sThe new value for the clocks seconds.
void setClockPosition ( char  l,
char  p 
)

Set the clock position.

Sets the position at which the clock is shown on the LCD.

Parameters:
lThe line number (0 or 1).
pThe horizontal position (0 to 15).
void showClock ( void  )

Show the clock.

Shows the clock.

 All Data Structures Files Functions Variables Defines

Generated on Wed Dec 25 2013 23:03:08 for Dwengo library by doxygen 1.7.3