Module TextIO
- Simplified
Writer
: noputChar
procedure variable anymore, all output to be done usingputString
. - Output via strings in lieu of repeatedly using single character output allows to make better use of buffers, such as the UART’s FIFO, and is friendlier for DMA.
Texts.Write
was the only procedure anyway that used single the charputChar
procedure.
Module UART
- Renamed to UARTstr: uses the UART for string output, via device module
UARTd
. - Removed procedure
PutChar
, since it’s not needed anymore forTextIO.Writer
. - Removed procedure
GetChar
, since it’s not needed anymore forTextIO.Reader
. - Note: procedure
GetString
needs implementation.
Module Terminals
Terminals.Open
does not directly use moduleUART
(nowUARTstr
) anymore, but takes theputString
andgetString
as parameters.- This allows to “plug” other procedures from other modules, such as the new ones for the kernel, which avoid busy waiting (see
UARTkstr
below).
Module Texts
- Adjusted
Texts.Write
to simplifiedTextIO.Writer
.
Module Main
- Implemented changes to module
Terminals
.
Module Kernel (v1)
- Added procedure
Kernel.AwaitDeviceSet
. - Extended scheduler for
Kernel.AwaitDeviceSet
. - Threads can enquire their last scheduler trigger: period, delay, or device.
- See new example
NoBusyWaiting
.
Module UARTkstr (for Kernel v1)
- New module.
- Equivalent to
UARTstr
, but without busy-waiting. - The thread gets suspended until the transmit buffer is empty again.
Example program NoBusyWaiting
- New example program.
- Demo the new
Kernel.AwaitDeviceSet
andUARTkstr
.