/*
 * kbd.h
 *
 *  Created on: Mar 7, 2012
 *      Author: qwer1
 */

#ifndef KBD_H_
#define KBD_H_

#include "pt.h"
#include "ul_ptx.h"

//number of keys
#define KBD_KEYS 3

//key codes
#define KBD_CO_NONE  0
#define KBD_CO_DOWN  1
#define KBD_CO_UP    2
#define KBD_CO_SETUP 3

//key press periods
#define KBD_PR_SHORT 5
#define KBD_PR_LONG  120
#define KBD_PR_AUTO  5
#define KBD_PR_LONGLONG (2 * KBD_PR_LONG)

//setup
void setup_kbd(void);

//poll thread
PT_THREAD( pt_kbd( struct pt *pt, struct ptx *ptx ) );

#endif /* KBD_H_ */
