Skip to content

OIL 41, chapters Memory and Time, hardware and interrupts - #133

Merged
theAndreas merged 2 commits into
mainfrom
oil-41-memory-hardware
Nov 17, 2026
Merged

theAndreas merged 2 commits into
mainfrom
oil-41-memory-hardware

Conversation

@theAndreas

Copy link
Copy Markdown
Owner

Nothing changes for a sketch. The reference now says what a Matrix takes of the Uno's RAM: 43 bytes with bit banging and 39 with SPI, besides its buffer of eight bytes per module, so 75 and 71 for a chain of four. Every example has the same flash and RAM as on main.

The review of the two chapters of the coding style on memory and on time, hardware and interrupts, in OIL item 41, their rules that review checks. The library holds them: it does not block, takes its pins as parameters, names its registers, has no interrupt routine, leaves the bitwise operators to one class, has neither exceptions nor RTTI, and what it writes itself lies in a folder of its own with its tests. Changed:

  • H-7, no double: the simulator's --for read its seconds through strtod(), the last double in the repository; it reads them with integers now, the same values as before, which new tests at the edges pin: a millisecond, a fraction without its whole seconds, a fraction past the third digit, and the most milliseconds there are.
  • M-4: three texts in the host code's headers whose address is taken were copied into every file that included them; they are declared there now and defined once.
  • M-6: the cost of a Matrix in RAM, measured with avr-gcc for the Uno, stands in its block.

Checked:

  • make check passes: lint, clang-tidy, every host and AVR test, coverage at 100 % of lines, branches and conditions.
  • Not run on hardware; the library's code does not change.

The simulator's --for reads its seconds with integers, where strtod()
went through the last double of the repository (H-7); tests at the edges
pin what it takes, as before. The three texts whose address the host
code takes are declared extern in their header and defined once (M-4).
The block of Matrix says what RAM it takes on the Uno: 43 bytes with bit
banging, 39 with SPI, besides its buffer (M-6).

The library holds the chapters' other rules. Its sizes do not change.
@theAndreas
theAndreas merged commit 3087cef into main Nov 17, 2026
12 checks passed
@theAndreas
theAndreas deleted the oil-41-memory-hardware branch November 17, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants