meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| programming:c:start [2020/09/28 11:15] – niziak | programming:c:start [2024/05/24 08:53] (current) – niziak | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== printf format check ====== | ====== printf format check ====== | ||
| - | <code c>extern int my_printf (void *my_object, const char *my_format, ...) __attribute__ ((format (printf, 2, 3)));</ | + | <code c> |
| + | extern int my_printf (void *my_object, const char *my_format, ...) __attribute__ ((format (printf, 2, 3))); | ||
| + | </ | ||
| ====== volatile ====== | ====== volatile ====== | ||
| * **volatile uint8_t *foo;** - tells the compiler the memory being pointed to is volatile | * **volatile uint8_t *foo;** - tells the compiler the memory being pointed to is volatile | ||
| - | * **uint8_t volatile * p_ledreg = 0x10000000; | + | * **uint8_t volatile * p_ledreg = 0x10000000; |
| * **uint8_t * volatile foo;** - mark the pointer itself as volatile | * **uint8_t * volatile foo;** - mark the pointer itself as volatile | ||
| ====== compile time asserts ====== | ====== compile time asserts ====== | ||
| + | |||
| + | aka STATIC_ASSERT | ||
| * Can be used in local block without compiler warning: | * Can be used in local block without compiler warning: | ||