Do not optimise the contents of a function Remove the in and out code for a function The compiler does not generate prologue and epilogue sequences for functions with: Avoiding Padding You can used the packed variable attribute. For example in the following code, type c_t will have a size of 3 bytes and there […]
All posts by
Power of
To the power of Note that in math notation ^ is used, but it can’t be used in C because it’s used as a bitwise operator. [Mathematics] xy = pow(x, y) [In programming]
Unique value from DateTime
Simple 32bit value from 8bit RTC values example
printf a buffer
Output Buffer Output null terminated buffer
error: macro expands to multiple statements
An example of what will cause it: Ideally you’d call a function instead, but there is a recommended workaround:
Do periodically from system clock
DateTime Issues
mktime() causes crashing, memory leak??? We’ve found on the ESP32 that using this would cause inexplicable runtime crashing : Changing the definition to this sovled it:
Working with paths
Dynamic filename path
Working with Files
Does a file exist fopen() Write text file Read text file Get file length Delete file printf the contents of a text file