Alignment and Packing

Here’s a topic relevant to both the new books I’m writing. Consider the following small program: char foo[] = {1, 2, 3, 4, 5, 6, 7, 8}; void setup() { Serial.begin(9600); while (!Serial); Serial.println(*(uint32_t *)&foo[0], HEX); Serial.println(*(uint32_t *)&foo[1], HEX); Serial.println(*(uint32_t *)&foo[2], HEX); Serial.println(*(uint32_t *)&foo[3], HEX); } void loop() { } If you run this on …

Checking In!

Just so you know I’m still around. I spent last month (and maybe this month) goofing off, which I feel entitled to do at my age. But I have been thinking, at least, about writing, and have been adding to and rearranging by book outlines. Financial sense tells me that the book about the SAMD21 …