2023-02-08 21:28:14 +00:00
|
|
|
#ifndef ARCH_SERIAL_H_
|
|
|
|
|
#define ARCH_SERIAL_H_
|
|
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-02-08 21:28:14 +00:00
|
|
|
#define SERIAL_PORT_A 0x3F8
|
|
|
|
|
#define SERIAL_PORT_B 0x2F8
|
|
|
|
|
#define SERIAL_PORT_C 0x3E8
|
|
|
|
|
#define SERIAL_PORT_D 0x2E8
|
|
|
|
|
|
|
|
|
|
extern void serial_putchar(int port, char ch);
|
|
|
|
|
|
|
|
|
|
extern void serial_wait(int device);
|
|
|
|
|
extern void serial_send_byte(int device, char out);
|
|
|
|
|
extern char serial_recv_byte(int device);
|
|
|
|
|
|
|
|
|
|
extern int serial_rcvd(int device);
|
|
|
|
|
|
2023-12-30 09:09:18 +00:00
|
|
|
extern void early_serialcon_init(int baud);
|
2023-05-06 21:33:36 +01:00
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-02-08 21:28:14 +00:00
|
|
|
#endif
|