stop run cmd

This commit is contained in:
wmano
2025-10-27 20:50:06 +08:00
parent 8b6f231b28
commit e7b859851b
16 changed files with 368 additions and 241 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ int chrg_eload_read_regs (rt_uint8_t addr, rt_uint16_t reg, rt_uint16_t len)
u16_to_u8v(reg, &buf[2]);
u16_to_u8v(len, &buf[4]);
crc = mb_crc16(buf, 6);
u16_to_u8v(crc, &buf[6]);
u16_to_u8v(swap_u16(crc), &buf[6]);
return chrg_south_send(buf, 8);
}
@@ -30,7 +30,7 @@ int chrg_eload_write_reg (rt_uint8_t addr, rt_uint16_t reg, rt_uint16_t value)
u16_to_u8v(reg, &buf[2]);
u16_to_u8v(value, &buf[4]);
crc = mb_crc16(buf, 6);
u16_to_u8v(crc, &buf[6]);
u16_to_u8v(swap_u16(crc), &buf[6]);
return chrg_south_send(buf, 8);
}