Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

main.c File Reference


Detailed Description

Atmel Corporation

Revision
1.3
Date
Monday, October 10, 2005 13:23:34 UTC

Definition in file main.c.

#include <inavr.h>
#include <iotiny24.h>
#include "main.h"
#include "USI_TWI_Master.h"
#include "LCD.h"
#include "KPD.h"

Include dependency graph for main.c:

Go to the source code of this file.

Functions

void Beep (unsigned int tone)
void CheckAccess (void)
void ClearInputBuffer (void)
void Delay (unsigned int ms)
void DelayBar (unsigned char sec)
void Initialise (void)
void main (void)
void OpenLock (void)
__interrupt void WDT_ISR (void)

Variables

__eeprom unsigned char CODE_ACCESS [CODE_ACCESS_LENGTH+1] = {"1234 "}
unsigned char KeyBuffer [CODE_MAX_LENGTH]
__flash unsigned char STRING_CLOSE [] = {" LOCK CLOSED "}
__flash unsigned char STRING_OPEN [] = {" LOCK OPEN "}
__flash unsigned char STRING_WELCOME [] = {"Tiny24 CODE LOCK"}


Function Documentation

void Beep unsigned int  tone  ) 
 

Definition at line 197 of file main.c.

Referenced by main(), and OpenLock().

void CheckAccess void   ) 
 

Definition at line 137 of file main.c.

References CODE_ACCESS, CODE_ACCESS_LENGTH, Delay(), KeyBuffer, KPD_Init(), LCD_PutXY(), OpenLock(), and STRING_CLOSE.

Referenced by main().

void ClearInputBuffer void   ) 
 

Definition at line 129 of file main.c.

References CODE_MAX_LENGTH, and KeyBuffer.

Referenced by main(), and WDT_ISR().

void Delay unsigned int  ms  ) 
 

Definition at line 216 of file main.c.

Referenced by CheckAccess(), DelayBar(), and main().

void DelayBar unsigned char  sec  ) 
 

Definition at line 172 of file main.c.

References Delay(), LCD_PutXY(), and LCD_PutXY_Raw().

Referenced by OpenLock().

void Initialise void   ) 
 

Definition at line 113 of file main.c.

References KPD_Init(), LCD_Init(), LOCK_PIN, and USI_TWI_Master_Initialise().

Referenced by main().

void main void   ) 
 

Definition at line 77 of file main.c.

References Beep(), CheckAccess(), ClearInputBuffer(), CODE_MAX_LENGTH, Delay(), Initialise(), KeyBuffer, KPD_GetKey(), KPD_KeyPressed, LCD_ClearDisplay(), LCD_PutXY(), and STRING_WELCOME.

void OpenLock void   ) 
 

Definition at line 154 of file main.c.

References Beep(), DelayBar(), LCD_PutXY(), LOCK_PIN, and STRING_OPEN.

Referenced by CheckAccess().

__interrupt void WDT_ISR void   ) 
 

Definition at line 230 of file main.c.

References ClearInputBuffer(), and LCD_ClearLine().


Variable Documentation

__eeprom unsigned char CODE_ACCESS[CODE_ACCESS_LENGTH+1] = {"1234 "}
 

Definition at line 72 of file main.c.

Referenced by CheckAccess().

unsigned char KeyBuffer[CODE_MAX_LENGTH]
 

Definition at line 74 of file main.c.

Referenced by CheckAccess(), ClearInputBuffer(), and main().

__flash unsigned char STRING_CLOSE[] = {" LOCK CLOSED "}
 

Definition at line 70 of file main.c.

Referenced by CheckAccess().

__flash unsigned char STRING_OPEN[] = {" LOCK OPEN "}
 

Definition at line 69 of file main.c.

Referenced by OpenLock().

__flash unsigned char STRING_WELCOME[] = {"Tiny24 CODE LOCK"}
 

Definition at line 68 of file main.c.

Referenced by main().


Generated on Mon Oct 10 15:25:10 2005 for AVR245: Code Lock with 4x4 Keypad and I2C(TM) LCD by  doxygen 1.4.4