Change Note 2024-01-17

Module TextIO

  • Simplified Writer: no putChar procedure variable anymore, all output to be done using putString.
  • 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 char putChar 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 for TextIO.Writer.
  • Removed procedure GetChar, since it’s not needed anymore for TextIO.Reader.
  • Note: procedure GetString needs implementation.

Module Terminals

  • Terminals.Open does not directly use module UART (now UARTstr) anymore, but takes the putString and getString 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 simplified TextIO.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 and UARTkstr.