forked from WartyMN/F256-FileManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyboard.h
91 lines (60 loc) · 2.52 KB
/
keyboard.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//! @file keyboard.h
/*
* keyboard.h
*
* Created on: Aug 23, 2022
* Author: micahbly
*/
// adapted for (Lich King) Foenix F256 Jr starting November 30, 2022
// adapted for f/manager Foenix F256 starting March 10, 2024
#ifndef KEYBOARD_H_
#define KEYBOARD_H_
/* about this class
*
*
*
*** things this class needs to be able to do
* get a char code back from the keyboard when requested
* interpret MCP scan codes, use modifiers to map scan codes to "char codes" defined here
*
*** things objects of this class have
*
*
*/
/*****************************************************************************/
/* Includes */
/*****************************************************************************/
// C includes
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
/*****************************************************************************/
/* Macro Definitions */
/*****************************************************************************/
/*****************************************************************************/
/* Enumerations */
/*****************************************************************************/
/*****************************************************************************/
/* Structs */
/*****************************************************************************/
typedef struct KeyRepeater
{
uint8_t key; // Key-code to repeat
uint8_t cookie;
} KeyRepeater;
/*****************************************************************************/
/* Global Variables */
/*****************************************************************************/
/*****************************************************************************/
/* Public Function Prototypes */
/*****************************************************************************/
// **** USER INPUT UTILITIES *****
// Check to see if keystroke events pending - does not wait for a key
uint8_t Keyboard_GetKeyIfPressed(void);
// Wait for one character from the keyboard and return it
char Keyboard_GetChar(void);
// main event processor
void Keyboard_ProcessEvents(void);
// initiate the minute hand timer
void Keyboard_InitiateMinuteHand(void);
#endif /* KEYBOARD_H_ */