Initial commit
This commit is contained in:
19
include/fifo.h
Normal file
19
include/fifo.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef FIFO_h
|
||||
#define FIFO_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define FIFO_SIZE 64
|
||||
|
||||
struct FIFO {
|
||||
int head;
|
||||
int tail;
|
||||
int size;
|
||||
uint8_t buffer[FIFO_SIZE];
|
||||
};
|
||||
|
||||
void FIFO_push(volatile struct FIFO* fifo, uint8_t value);
|
||||
uint8_t FIFO_pop(volatile struct FIFO* fifo);
|
||||
int FIFO_size(volatile struct FIFO* fifo);
|
||||
|
||||
#endif
|
||||
15
include/keyboard.h
Normal file
15
include/keyboard.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef KEYBOARD_h
|
||||
#define KEYBOARD_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define KEYBOARD_CLK 2
|
||||
#define KEYBOARD_DATA 7
|
||||
|
||||
void send_keyboard_cmd(uint8_t value);
|
||||
void queue_keyboard_cmd(uint8_t value);
|
||||
void send_keyboard_cmd_queue();
|
||||
|
||||
void keyboard_interrupt(void (*callback)(uint8_t));
|
||||
|
||||
#endif
|
||||
9
include/scancode.h
Normal file
9
include/scancode.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef SCANCODE_H
|
||||
#define SCANCODE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void setup_scancode();
|
||||
// uint8_t convert_scancode(uint8_t shift, uint8_t code);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user