50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
|
|
/*
|
|||
|
|
* rw_logging.h
|
|||
|
|
*
|
|||
|
|
* Created on: Jul 29, 2025
|
|||
|
|
* Author: cc
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef MCU_DRIVER_INC_RW_LOGGING_H_
|
|||
|
|
#define MCU_DRIVER_INC_RW_LOGGING_H_
|
|||
|
|
|
|||
|
|
#include "ch564.h"
|
|||
|
|
#include <stdint.h>
|
|||
|
|
|
|||
|
|
#define APPFlag_UartUpgrade_Reset 0xBBC1 //APP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ
|
|||
|
|
|
|||
|
|
//<2F><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>
|
|||
|
|
#define LOG_Data_Hand 0xA5 //LOG<4F><47><EFBFBD><EFBFBD>ͷ
|
|||
|
|
#define Log_Data_End 0x5A //LOG<4F><47><EFBFBD><EFBFBD>β
|
|||
|
|
#define Log_Data_Len_MAX 512 //<2F><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD>512Byte
|
|||
|
|
|
|||
|
|
/*<2A><>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD>ʽ*/
|
|||
|
|
typedef enum{
|
|||
|
|
S_Log_Hand,
|
|||
|
|
S_Log_SN, //<2F><>־ÿ<D6BE><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>
|
|||
|
|
S_Log_Len,
|
|||
|
|
S_Log_Len_8,
|
|||
|
|
S_Log_Check,
|
|||
|
|
S_Log_Date_H, //<2F>꣺5bit <20>£<EFBFBD>5bit <20>գ<EFBFBD>5bit
|
|||
|
|
S_Log_Date_L,
|
|||
|
|
S_Log_Type,
|
|||
|
|
S_Log_Time8B, //Сʱʱ<CAB1><CAB1><EFBFBD><EFBFBD>
|
|||
|
|
S_Log_Time16B,
|
|||
|
|
S_Log_Time24B,
|
|||
|
|
S_Log_Time32B,
|
|||
|
|
S_Log_Data,
|
|||
|
|
}Sram_Log_Data_Format;
|
|||
|
|
|
|||
|
|
|
|||
|
|
uint8_t Log_write_sram(uint8_t data_type,uint8_t *buff,uint16_t len);
|
|||
|
|
void Retain_Flash_Register_Data(void);
|
|||
|
|
void Read_Flash_Register_Data(void);
|
|||
|
|
void LOG_Save_Global_Parameters(void);
|
|||
|
|
uint8_t SRAM_PowerOn_Restore_ParaInfo(void);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /* MCU_DRIVER_INC_RW_LOGGING_H_ */
|