Microchip® Advanced Software Framework

xmega_a3bu_xplained_classb_oven/drv/keyboard.c File Reference

Keyboard driver.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include <board.h>
#include <gpio.h>
#include "touch.h"
#include "keyboard.h"

Functions

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

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.

References cdc_getkey(), check_touch_key_pressed(), gpio_pin_is_high, gpio_pin_is_low, key, key_state, KEYBOARD_BACK, KEYBOARD_BACK_MASK, KEYBOARD_DOWN, KEYBOARD_DOWN_MASK, KEYBOARD_ENTER, KEYBOARD_ENTER_MASK, KEYBOARD_NO_EVENT, KEYBOARD_NO_KEY, KEYBOARD_PRESS, KEYBOARD_RELEASE, KEYBOARD_UP, KEYBOARD_UP_MASK, keyboard_event::keycode, touch_key_is_pressed(), and keyboard_event::type.