From 66901857cd869b67c398b4ef5a976ce0d3bbcf08 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Fri, 29 Nov 2019 13:07:24 -0800 Subject: [PATCH] renamed serial_read_buffer to serial_read_byte to make its intention clear --- ports.h | 2 +- ports.s | 4 ++-- serial.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports.h b/ports.h index a05d324..a26b301 100644 --- a/ports.h +++ b/ports.h @@ -5,5 +5,5 @@ void serialport_write_byte(const u16, const u16); -u8 serial_read_buffer(const u16); +u8 serial_read_byte(const u16); #endif /* INCLUDE_IO_H */ diff --git a/ports.s b/ports.s index 4c73b20..5e99e3d 100644 --- a/ports.s +++ b/ports.s @@ -2,7 +2,7 @@ ; written in asm global serialport_write_byte -global serial_read_buffer +global serial_read_byte ; write a byte ;serialport_write_byte @@ -14,7 +14,7 @@ serialport_write_byte: ; Read byte from serial port ;serialport_read_byte -serial_read_buffer: +serial_read_byte: mov dx, [esp + 4] ; grab the address of the targeted port in al, dx ; read byte from the port ret diff --git a/serial.c b/serial.c index 26185e5..bb3ba3c 100644 --- a/serial.c +++ b/serial.c @@ -35,7 +35,7 @@ void serial_configure_line(const u16 line, const u8 payload) { u8 serial_fifo_empty(const u16 com_port) { // we get back 0x20 if it is empty - return serial_read_buffer(SERIAL_LINE_STATUS_PORT(com_port)) & + return serial_read_byte(SERIAL_LINE_STATUS_PORT(com_port)) & SERIAL_FIFO_EMPTY_CODE; } @@ -86,4 +86,4 @@ void serial_pic_ack(u32 interrupt) { else { serialport_write_byte(PIC2_PORT, PIC_ACK); } -} \ No newline at end of file +}