Espresso 0.0.2a
This commit is contained in:
@ -62,6 +62,8 @@ struct pci_header_type_0 {
|
||||
uint8_t max_latency;
|
||||
} __attribute__((packed));
|
||||
|
||||
void pci_init(void);
|
||||
|
||||
uint32_t pci_config_read(uint8_t bus, uint8_t device, uint8_t function, uint8_t offset);
|
||||
void pci_config_write(uint8_t bus, uint8_t device, uint8_t function, uint8_t offset, uint32_t value);
|
||||
void pci_enumerate(void);
|
||||
|
||||
@ -2,16 +2,26 @@
|
||||
#define _PS2_KEYBOARD_H
|
||||
|
||||
#include <types.h>
|
||||
#include <drivers/irq.h>
|
||||
|
||||
typedef enum {
|
||||
KEY_NONE = 0,
|
||||
KEY_ARROW_UP = 0xAA0,
|
||||
KEY_ARROW_UP = 0xFC,
|
||||
KEY_ARROW_DOWN,
|
||||
KEY_ARROW_LEFT,
|
||||
KEY_ARROW_RIGHT,
|
||||
/* Note: add more special keys here */
|
||||
} special_key;
|
||||
|
||||
typedef enum {
|
||||
KEY_UP = 0x1E,
|
||||
KEY_DOWN = 0x1F,
|
||||
KEY_RIGHT = 0x1C,
|
||||
KEY_LEFT = 0x1D,
|
||||
} lower_key;
|
||||
|
||||
typedef void (*ps2_hook_t)(char);
|
||||
|
||||
void keyboard_init(void);
|
||||
void keyboard_handler(void);
|
||||
|
||||
@ -19,4 +29,9 @@ char get_char(void);
|
||||
uint16_t get_key(void);
|
||||
char* get_string(void);
|
||||
|
||||
char* kbd_gets(void);
|
||||
|
||||
bool setup_hook(ps2_hook_t func);
|
||||
bool remove_hook(ps2_hook_t func);
|
||||
|
||||
#endif
|
||||
|
||||
14
include/drivers/serio.h
Normal file
14
include/drivers/serio.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef _SERIAL_IO_H
|
||||
#define _SERIAL_IO_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
int serial_init(void);
|
||||
|
||||
void serial_write(char a);
|
||||
void serial_puts(const char* s);
|
||||
char serial_read(void);
|
||||
|
||||
bool use_serial(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user