Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

keys.c File Reference

Keypad management routines. More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <inttypes.h>
#include "main/keys.h"

Go to the source code of this file.

Defines

#define KEY_PRESS   5
#define KEY_REPEAT   96
#define KEY_DELAY   12

Functions

void keys_sense_keys (void)
 Scans through all keys and, if a keypress is detected, stores the key-code in the keyboard buffer.

uint8_t keys_key_pressed (void)
uint8_t keys_get_key (void)
void keys_set_leds (uint8_t mask)
void keys_set_repeat_mask (uint8_t mask)


Detailed Description

Keypad management routines.

Definition in file keys.c.


Function Documentation

uint8_t keys_get_key void   ) 
 

Get next key-code.

Definition at line 105 of file keys.c.

uint8_t keys_key_pressed void   ) 
 

Check if key was pressed.

Definition at line 97 of file keys.c.

Referenced by INTERRUPT().

void keys_sense_keys void   ) 
 

Scans through all keys and, if a keypress is detected, stores the key-code in the keyboard buffer.

Also drives key-leds. Called every millisecond.

Definition at line 45 of file keys.c.

Referenced by INTERRUPT().

void keys_set_leds uint8_t  mask  ) 
 

Set brightness of all LED's. Use LED_* constants.

Definition at line 118 of file keys.c.

Referenced by Switch::Activate(), and main().

void keys_set_repeat_mask uint8_t  mask  ) 
 

Set the repeat-mask for all keys.

Definition at line 126 of file keys.c.

Referenced by Switch::Activate().


Generated on Thu Oct 16 13:13:41 2003 for OpenHomeMainPanel by doxygen 1.3.3