Atmel Software Framework

xmega/applications/xmega_a3bu_xplained_classb_oven/drv/keyboard.h File Reference

Keyboard driver.

Copyright (C) 2011-2015 Atmel Corporation. All rights reserved.

#include <stdint.h>

Data Structures

struct  keyboard_event
 Container for keycode and related event. More...
 

Macros

Keyboard definitions
#define KEYBOARD_NO_KEY   0
 
#define KEYBOARD_UP   38
 
#define KEYBOARD_UP_MASK   2
 
#define KEYBOARD_DOWN   40
 
#define KEYBOARD_DOWN_MASK   4
 
#define KEYBOARD_ENTER   13
 
#define KEYBOARD_ENTER_MASK   1
 
#define KEYBOARD_BACK   8
 
#define KEYBOARD_BACK_MASK   8
 

Typedefs

typedef uint8_t keycode_t
 Type to contain keycode. More...
 

Enumerations

enum  keyboard_event_type {
  KEYBOARD_NO_EVENT,
  KEYBOARD_PRESS,
  KEYBOARD_RELEASE,
  KEYBOARD_NO_EVENT,
  KEYBOARD_PRESS,
  KEYBOARD_RELEASE
}
 Keyboard event types. More...
 

Functions

void keyboard_get_key_state (struct keyboard_event *key)
 Check the status of the keyboard. More...
 

#define KEYBOARD_BACK_MASK   8

Referenced by keyboard_get_key_state().

#define KEYBOARD_DOWN   40
#define KEYBOARD_DOWN_MASK   4

Referenced by keyboard_get_key_state().

#define KEYBOARD_ENTER   13

Referenced by keyboard_get_key_state().

#define KEYBOARD_ENTER_MASK   1

Referenced by keyboard_get_key_state().

#define KEYBOARD_NO_KEY   0
#define KEYBOARD_UP   38
#define KEYBOARD_UP_MASK   2

Referenced by keyboard_get_key_state().

typedef uint8_t keycode_t

Type to contain keycode.

Keyboard event types.

Enumerator
KEYBOARD_NO_EVENT 
KEYBOARD_PRESS 
KEYBOARD_RELEASE 
KEYBOARD_NO_EVENT 
KEYBOARD_PRESS 
KEYBOARD_RELEASE 

void keyboard_get_key_state ( struct keyboard_event keybuffer)

Check the status of the keyboard.

This function checks what keys have been pressed or released, updating their status and saving the current key change (if any) in the specified buffer.

Parameters
keybufferPointer to keyboard_event struct to store status.
keybuffera keyboard_event struct to store keyboard status