7 ms·
Nim's maintainer agrees with you I believe, and the API is as you suggest (volatileLoad and volatileStore): https://nim-lang.org/docs/volatile.html https://nim-
by auxym 2y ago
Nim's maintainer agrees with you I believe, and the API is as you suggest (volatileLoad and volatileStore): https://nim-lang.org/docs/volatile.html https://nim-lang.org/docs/volatile.html
However, under the hood, Nim compiles to C. So these are macros that typecast to volatile, does the read (or write), then casts back to non-volatile.
(Small plug for my nim project that is somewhat related to OP: https://github.com/EmbeddedNim/svd2nim https://github.com/EmbeddedNim/svd2nim)