size, you can do this one liner:
let aligned_size = ((unasigned_size + alignment_quanta - 1) / (alignment_quanta)) * alignment_quanta;
before i was doing this with a `let mut` + `if` statement. this is not as obvious
but more compact, probably you'll start to see this idiom more and more in the code.
I think it's also computationally efficient, because as long as
the alignment_quanta is a power of 2, the compiler does something
like a shift right with the `/` operator (and it may also do something
like a shift left with the `*` operator as well).
there isn't an arg0 in the `ScalarMessage` return type but
that doesn't mean numbering starts at 1. So the first slot
should remain unused if you're not casting a return value
to `MessageId` (which is "just" a `usize` but "feels wrong")
a "small" memory target is created, which maps only a subset
of fonts to memory for targets that have extremely limited amounts
of on-chip storage.
the main thing I'm not happy about with this change is that the
origin offset of the font table is hard-coded into the template,
but also, I'm not quite sure if there's a better way to do this
that doesn't make things unnecessarily complicated. The origin
offset *is* target specific, and the templates already
reference targets specifically in the config lists...so if this
were to be made more generic, the path you'd end up on is something
like parsing link.x files out of various configurations which seems
like an extreme amount of work for a constant that rarely changes.
So, it's a footgun, but one where mending the foot is several times
less effort than putting a safety on the footgun.
A missing translation will cause a panic in the localization
macro. As a short term solution. The stub function in the
i18n_helper.py just fills anything missing with its English
placeholder. Note: After refactoring the python packing, I intend
to add an "auto machine translate" funciton as well.
far from complete, lots of warnings, but a good start.
most of the io setup and FB manipulation is done.
The main thing left is to puzzle through the UDMA block and
setup the SPIM accordingly.