Skip to content

Commit

Permalink
fixup! add E3 SB6432 LCD key driver
Browse files Browse the repository at this point in the history
  • Loading branch information
sephalon committed May 4, 2020
1 parent 4d135b6 commit 78daa65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csrc/u8x8_d_e3keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ uint8_t u8x8_d_e3keys_sb6432(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
* Green: 0 D_6 D_5 D_4 D_3 D_2 D_1 D_0
* Blue: 0 D_6 D_5 D_4 D_3 D_2 D_1 D_0
*/
color_bytes[0] = color >> 16 & 0x7f; /* red */
color_bytes[1] = color >> 8 & 0x7f; /* green */
color_bytes[0] = (color >> 16) & 0x7f; /* red */
color_bytes[1] = (color >> 8) & 0x7f; /* green */
color_bytes[2] = color & 0x7f; /* blue */

u8x8_cad_StartTransfer(u8x8);
Expand Down Expand Up @@ -178,7 +178,7 @@ uint8_t u8x8_d_e3keys_sb6432(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
addr_bytes[1] = (addr >> 4) & 0x0f;
addr_bytes[2] = addr & 0x0f;
data_bytes[0] = tile->tile_ptr[c * 8 + j] & 0x0f;
data_bytes[1] = (tile->tile_ptr[c * 8 + j] & 0xf0) >> 4;
data_bytes[1] = (tile->tile_ptr[c * 8 + j] >> 4) & 0x0f;

u8x8_cad_SendCmd(u8x8, E3KEYS_AT_CMD_SET_DISPLAY_ADDR_WRITE_DATA);
u8x8_cad_SendData(u8x8, 3, addr_bytes);
Expand Down

0 comments on commit 78daa65

Please sign in to comment.