question about the ili9341 stm32f4 spi driver #27
-
in the tm_stm32f4_ili9341.c file the function putc in the for loop that draws the font data there is a if statement that shifts b by j and compares that with 0x8000 why is that value there why is it 0x8000 and not something else
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Fonts are described as a fixed size array, for instance variable If we draw from left to right, we want to check always bits from left to right. This is done by shifting our |
Beta Was this translation helpful? Give feedback.
Fonts are described as a fixed size array, for instance variable
TM_Font7x10
has 10uint16_t
array values per character.Each character line is described as bitfield where font is "active" and where we should draw background.
If we draw from left to right, we want to check always bits from left to right. This is done by shifting our
uint16_t
value byj
and then check MSB bit. Mask for MSB bit is0x8000
.