Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your task for this assignment is to write a simple synchronous serial driver for

ID: 440314 • Letter: Y

Question

Your task for this assignment is to write a simple synchronous serial driver for the embedded operating system, so that you can see what you are doing in all subsequent assignments. The UART control and status registers are memory-mapped, starting with base address 0xB8000300. The file system/kprintf.c has the skeleton code for four I/O-related functions: kputc(), (puts a single character to the serial port,) kgetc(), (gets a single character from the serial port,) kungetc(), (puts "back" a single character, ala K&R;'s getch() and ungetch() functions,) and kcheckc() (checks whether a character is available.) Each function contains a "TODO" comment where you should add code. The actual kprintf() is already complete, and will begin working as soon as you complete the kputc() function it relies upon. first todo part: // TODO: Check UART line status. // When the transmitter is empty, send character c. Where to start?

Explanation / Answer

The driver is "serial" because it sends characters one at a time down an RS-232 serial port interface, like the one found on most modern PC's. The driver is a "driver" because it provides the software interface necessary for the operating system to talk to a hardware I/O device. This platform's serial...