diff options
| author | Pablo MartÃnez <58857054+elpekenin@users.noreply.github.com> | 2025-05-22 15:31:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-22 23:31:15 +1000 |
| commit | 955809bd5aee8b1444595b450eeeef1f42799995 (patch) | |
| tree | 08da1f696605925286f681a2b738fa5f35cd0386 /drivers/lcd | |
| parent | fa24b0fcce2c5f3330f2d798c3caf91a130babdb (diff) | |
Add `compiler_support.h` (#25274)
Diffstat (limited to 'drivers/lcd')
| -rw-r--r-- | drivers/lcd/st7565.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c index cf71c5e5a3..f24bb78048 100644 --- a/drivers/lcd/st7565.c +++ b/drivers/lcd/st7565.c | |||
| @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 19 | 19 | ||
| 20 | #include <string.h> | 20 | #include <string.h> |
| 21 | 21 | ||
| 22 | #include "compiler_support.h" | ||
| 22 | #include "keyboard.h" | 23 | #include "keyboard.h" |
| 23 | #include "progmem.h" | 24 | #include "progmem.h" |
| 24 | #include "timer.h" | 25 | #include "timer.h" |
| @@ -265,7 +266,7 @@ void st7565_write_char(const char data, bool invert) { | |||
| 265 | static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH]; | 266 | static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH]; |
| 266 | memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH); | 267 | memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH); |
| 267 | 268 | ||
| 268 | _Static_assert(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_FONT_END references outside array"); | 269 | STATIC_ASSERT(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_FONT_END references outside array"); |
| 269 | 270 | ||
| 270 | // set the reder buffer data | 271 | // set the reder buffer data |
| 271 | uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index | 272 | uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index |
