![]() |
ARMEBS4
revision-26.06.2015
|
PS2 keyboard functions. More...
#include "heivs/keyboard.h"
#include "stm32/stm32f4xx_usart.h"
#include "stm32/stm32f4xx_misc.h"
#include "stm32/stm32f4xx_rcc.h"
Go to the source code of this file.
Data Structures | |
struct | PS2Keymap_t |
Structure of the keyboard map. More... | |
Functions | |
static void | irq_handler (void) |
Interrupt service method when a key is pressed. More... | |
static char | get_iso8859_code (uint8_t s) |
Transform the keycode to ascii value. More... | |
uint8_t | KeyboardRead (void) |
reads the keyboard More... | |
Variables | |
static void(* | interruptHandler )(void) |
Inits the PS2 keyboard communication. More... | |
static const PS2Keymap_t | Keymap_Ascom |
This is the keycode table correspondance. | |
PS2 keyboard functions.
Definition in file keyboard.c.
|
static |
Interrupt service method when a key is pressed.
It fills a table with the received characters
Definition at line 35 of file keyboard.c.
References interruptHandler, and USART2_IRQn.
|
static |
Transform the keycode to ascii value.
s | the keycode returned by the keyboard |
It returns 0 if key released or if any special key pressed (shift)
Definition at line 199 of file keyboard.c.
References PS2Keymap_t::altgr, Keymap_Ascom, PS2Keymap_t::noshift, and PS2Keymap_t::shift.
Referenced by KeyboardRead().
|
static |
Inits the PS2 keyboard communication.
interruptHandler | Interrupt function to call on interrupt, NULL for polling |
prio | Priority of interrupt (0[max] - 15[min]) if used |
Definition at line 29 of file keyboard.c.
Referenced by irq_handler(), and KeyboardRead().