break: before freertos

This commit is contained in:
2025-04-02 02:21:48 +08:00
parent 05668ca262
commit d43730ce15
60 changed files with 48968 additions and 1485 deletions

View File

@ -132,3 +132,32 @@ void IM_Analyze(void)
}
}
}
void IM_WipeEnergy(void)
{
uint8_t buf[11] = {0};
buf[0] = IM1281B_ID; //模块的 ID 号,默认 ID 为 0x01
buf[1] = 0x10;
buf[2] = 0x00;
buf[3] = 0x4B;
buf[4] = 0x00;
buf[5] = 0x02;
buf[6] = 0x04;
buf[7] = 0x00;
buf[8] = 0x00;
buf[9] = 0x00;
buf[10] = 0x00;
union crc_data
{
unsigned int word16;
unsigned char byte[2];
} new_crc;
new_crc.word16 = Check_CRC(buf, 6);
buf[6] = new_crc.byte[1]; //CRC 效验低字节在前
buf[7] = new_crc.byte[0];
for (unsigned int i = 0; i < 8; i++)
{
HAL_UART_Transmit(&huart1, &buf[i], 1, HAL_MAX_DELAY);
}
}