Taiga Develop 2 周之前
父节点
当前提交
fd82172a2f
共有 1 个文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      sources/hd44780_shift_register.c

+ 2 - 2
sources/hd44780_shift_register.c

@@ -13,8 +13,8 @@ static chlcd_error_t __chlcd_hd44780_shift_register_set_byte(
     self->last_state = content; 
     
     for (uint8_t count = 0; count < 8; ++count) {
-        bool current = (content & 0b10000000) != 0x00;
-        content = content << 1;
+        bool current = (content & 0b1) != 0x00;
+        content = content >> 1;
 
         __R(chlcd_pin_write(self->register_data, current));
         __R(chlcd_pin_write(self->register_clock, true));