key.c File Reference

This file provides joystick operations. More...

#include "key.h"
#include "uart.h"
#include "main.h"
#include "adc.h"

Go to the source code of this file.

Functions

void key_init (void)
 This will intialize the joystick and the ADC for button readings.
void key_deinit (void)
 This will disable the ADC used for button readings.
uint8_t is_button (void)
 This will poll run key_task() to determine if a button has been pressed.
uint8_t get_button (void)
 This function will wait for a user to press a button.
key_state_t key_task (void)
 This will check the joystick state to return the current button status.
key_state_t key_state_get (void)
 This function will start the ADC conversion and read the current converstion value to determine the button position.

Detailed Description

This file provides joystick operations.

Combined with ADC functions.

Author:
Mike Vidales mavida404@gmail.com

Definition in file key.c.


Generated on Mon Apr 11 14:23:50 2011 for Contiki 2.5 by  doxygen 1.6.1