feat: update USART1 baud rate and implement IM1281B communication
This commit is contained in:
19
Core/Inc/IM1281B.h
Normal file
19
Core/Inc/IM1281B.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// Created by Timothy Yin on 2025/3/29.
|
||||
//
|
||||
#ifndef IM1281B_H
|
||||
#define IM1281B_H
|
||||
#include "usart.h"
|
||||
|
||||
extern uint8_t IM_TxBuf[8];
|
||||
extern uint8_t IM_RxBuf[40];
|
||||
extern unsigned char IM_ReadFlag, IM_RecvDone, IM_RecvLen;
|
||||
extern uint32_t IM_Volt, IM_Curr, IM_Power, IM_Energy, IM_PF, IM_CO2;
|
||||
|
||||
unsigned int Calc_CRC(unsigned char crc_buf, unsigned int crc);
|
||||
unsigned int Check_CRC(const unsigned char *buf, unsigned char len);
|
||||
|
||||
void IM_Read(void);
|
||||
void IM_Analyze(void);
|
||||
|
||||
#endif //IM1281B_H
|
Reference in New Issue
Block a user