Initial commit: CCU621_M firmware project with BLE debug link support.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
#ifndef _PUBLIC_DATA_H_
|
||||
#define _PUBLIC_DATA_H_
|
||||
|
||||
#include "main.h"
|
||||
#include "sys_drv_init.h"
|
||||
#include "publicdata/sharedatastruct.h"
|
||||
#include "publicdata/public_define.h"
|
||||
|
||||
extern const U8_T Device_Model[] ;
|
||||
|
||||
extern const U8_T Software_Version[] ; //软件版本号,用于FOTA升级
|
||||
extern const U8_T Hardware_Version[] ; //
|
||||
extern const U8_T Mcu_model[] ;
|
||||
|
||||
extern const U8_T Parameter_Version[] ; //参数版本号
|
||||
|
||||
extern SHARE_DATA_T g_t_share_data; // 全局共享数据结构
|
||||
//extern const osMutexAttr_t os_Mutex_attributes;
|
||||
|
||||
extern const char *success;
|
||||
extern const char *failure;
|
||||
|
||||
extern U16_T u16_crc_checksum(U8_T *p, U16_T u16_len);
|
||||
extern U16_T u16_modbus_crc16(U8_T *pucFrame, U16_T usLen);
|
||||
extern U8_T u8_calculate_bcc(U8_T *pu8_data, U16_T u16_len) ; //BCC异或校验
|
||||
|
||||
/* 欧标CAN转PLC 运行时使能:按枪号查 u8_gun_type,0=欧标使能返回1,1=国标不使能返回0 */
|
||||
extern U8_T u8_can_plc_enabled(U8_T gun_no);
|
||||
|
||||
extern uint64_t u64_get_current_millis(void);
|
||||
extern uint64_t u64_safe_millis_since(uint64_t last_millis);
|
||||
extern uint32_t get_current_seconds(void) ; //获取当前秒数
|
||||
extern uint32_t u32_safe_seconds_since(uint32_t last_sec); //计算时间差值
|
||||
|
||||
extern uint8_t dec_to_bcd(uint8_t dec) ;
|
||||
extern uint8_t bcd_to_dec(uint8_t bcd) ;
|
||||
extern int bcd_to_ascii(const U8_T *bcd_data, U8_T bcd_len, char *ascii_str, U8_T ascii_buf_len);
|
||||
|
||||
/* Base64编码解码函数 */
|
||||
extern int base64_encode(const uint8_t *input, uint32_t input_len,
|
||||
char *output, uint32_t output_size);
|
||||
extern int base64_decode(const char *input, uint8_t *output, uint32_t output_size);
|
||||
|
||||
extern void v_flash_save_cfg_data(void);
|
||||
|
||||
extern void v_public_cfg_data_init(void);
|
||||
extern void v_sys_reboot(void);
|
||||
extern void v_public_param_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user