[kernel] Let endpoints get interrupt notifications
- Add a tag field to all endpoint messages, which doubles as a notification field - Add a endpoint_bind_irq syscall to enable an endpoint to listen for interrupt notifications. This mechanism needs to change. - Add a temporary copy of the serial port code to nulldrv, and let it take responsibility for COM2
This commit is contained in:
26
src/drivers/nulldrv/serial.h
Normal file
26
src/drivers/nulldrv/serial.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
/// \file serial.h
|
||||
/// Declarations related to serial ports.
|
||||
#include <stdint.h>
|
||||
|
||||
#define serial_port nulldrv_serial_port
|
||||
|
||||
class serial_port
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
/// \arg port The IO address of the serial port
|
||||
serial_port(uint16_t port);
|
||||
|
||||
serial_port();
|
||||
|
||||
void write(char c);
|
||||
char read();
|
||||
|
||||
private:
|
||||
uint16_t m_port;
|
||||
|
||||
bool read_ready();
|
||||
bool write_ready();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user