238 lines
7.1 KiB
C
238 lines
7.1 KiB
C
|
|
/* USER CODE BEGIN Header */
|
|||
|
|
/**
|
|||
|
|
******************************************************************************
|
|||
|
|
* @file : coulombmeter.h
|
|||
|
|
* @brief : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
* @version : 1.0
|
|||
|
|
* @changelog : version 1.0 <EFBFBD><EFBFBD>ʼ<EFBFBD>汾 2025.12.31
|
|||
|
|
******************************************************************************
|
|||
|
|
* @attention
|
|||
|
|
*
|
|||
|
|
* Copyright (c) 2025 Yuwell Software Danyang.Jiangsu.China
|
|||
|
|
* THIS SOFTWARE is licensed under the Mulan PSL v1.
|
|||
|
|
* can use this software according to the terms and conditions of the Mulan PSL v1.
|
|||
|
|
* You may obtain a copy of Mulan PSL v1 at:
|
|||
|
|
* http://license.coscl.org.cn/MulanPSL
|
|||
|
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
|||
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
|||
|
|
* PURPOSE.
|
|||
|
|
* See the Mulan PSL v1 for more details.
|
|||
|
|
*
|
|||
|
|
******************************************************************************
|
|||
|
|
*/
|
|||
|
|
/* USER CODE END Header */
|
|||
|
|
|
|||
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|||
|
|
#ifndef __COULOMBMETER_H
|
|||
|
|
#define __COULOMBMETER_H
|
|||
|
|
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
extern "C" {
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#include <stdint.h>
|
|||
|
|
#include "mf_config.h"
|
|||
|
|
#include "string.h"
|
|||
|
|
|
|||
|
|
|
|||
|
|
/************************** Ӳ<><D3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3> **************************/
|
|||
|
|
/* <20><>Ӳ<EFBFBD><D3B2>ʹ<EFBFBD>ý<EFBFBD><C3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
|
#define COULOMBMETER_USED_UART_NUM UART5
|
|||
|
|
#define COULOMBMETER_UART_TX_GPIO_PORT GPIOC
|
|||
|
|
#define COULOMBMETER_UART_TX_GPIO_PIN FL_GPIO_PIN_5
|
|||
|
|
#define COULOMBMETER_UART_RX_GPIO_PORT GPIOC
|
|||
|
|
#define COULOMBMETER_UART_RX_GPIO_PIN FL_GPIO_PIN_4
|
|||
|
|
|
|||
|
|
|
|||
|
|
#define COULOMBMETER_IRQn UART5_IRQn
|
|||
|
|
|
|||
|
|
|
|||
|
|
// CPU<50><55><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|||
|
|
#define CHECK_TRANS_DONE while(FL_UART_IsActiveFlag_TXShiftBuffEmpty(COULOMBMETER_USED_UART_NUM) != FL_SET){};
|
|||
|
|
#define COULOMBMETER_UART_TRANS_BYTE(x) FL_UART_WriteTXBuff(COULOMBMETER_USED_UART_NUM, x);CHECK_TRANS_DONE;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
/************************** оƬ<D0BE>ڲ<EFBFBD><DAB2>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD> **************************/
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>
|
|||
|
|
#define Addr_I_WAVE 0x01 // <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define Addr_V_WAVE 0x02 // <20><>ѹͨ<D1B9><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define Addr_I_RMS 0x03 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Чֵ
|
|||
|
|
#define Addr_V_RMS 0x04 // <20><>ѹ<EFBFBD><D1B9>Чֵ
|
|||
|
|
#define Addr_I_FAST_RMS 0x05 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Чֵ
|
|||
|
|
#define Addr_WATT 0x06 // <20>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define Addr_CF_CNT 0x07 // <20>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
#define Addr_FREQ 0x08 // <20><>ƵƵ<C6B5><C6B5>
|
|||
|
|
#define Addr_STATUS 0x09 // ״̬
|
|||
|
|
#define Addr_VERSION 0x0F // <20>汾
|
|||
|
|
|
|||
|
|
// <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4>
|
|||
|
|
#define Addr_I_CHOS 0x11 // <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>ֱ<EFBFBD><D6B1>ƫ<EFBFBD><C6AB>У<EFBFBD><D0A3>
|
|||
|
|
#define Addr_I_RMSOS 0x12 // <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>ЧֵС<D6B5>ź<EFBFBD>У<EFBFBD><D0A3>
|
|||
|
|
#define Addr_WA_CREEP 0x14 // <20>й<EFBFBD><D0B9><EFBFBD><EFBFBD>ʷ<EFBFBD>DZ<EFBFBD><C7B1>ֵ
|
|||
|
|
#define Addr_FAST_RMS_TH 0x15 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Чֵ<D0A7><D6B5>ֵ<EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
|
#define Addr_FAST_RMS_CYC 0x16 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Чֵˢ<D6B5><CBA2><EFBFBD><EFBFBD><EFBFBD>ڼĴ<DABC><C4B4><EFBFBD>
|
|||
|
|
#define Addr_FREQ_CYC 0x17 // <20>ߵ<EFBFBD>ѹƵ<D1B9><C6B5>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ڼĴ<DABC><C4B4><EFBFBD>
|
|||
|
|
#define Addr_MASK 0x18 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>üĴ<C3BC><C4B4><EFBFBD>
|
|||
|
|
#define Addr_MODE 0x19 // <20>û<EFBFBD>ģʽѡ<CABD><D1A1><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
|
|||
|
|
#define Addr_GAIN_CR 0x1A // <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƼĴ<C6BC><C4B4><EFBFBD>
|
|||
|
|
#define Addr_SOFT_RESET 0x1C // <20><><EFBFBD><EFBFBD>λ
|
|||
|
|
#define Addr_WRPROT 0x1D // <20>û<EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
//ע<><D7A2> BL0940<34>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽڹ̶<DAB9>Ϊ0x58+ICAddr<64><72>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>ֽڹ̶<DAB9>Ϊ0xA8+ICAddr<64><72>SOP10<31><30>װоƬ<D0BE><C6AC>IC_Addr<64><72>ַ<EFBFBD>̶<EFBFBD>Ϊ0
|
|||
|
|
// BL0942 TSSOP14<31><34>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ַѡ<D6B7><D1A1><EFBFBD>ܽţ<DCBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>A1~A2<41><32>ַѡ<D6B7><D1A1><EFBFBD>ܽŵĵ<C5B5>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽڣ<D6BD><DAA3><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>
|
|||
|
|
// 8F-5AW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>SOP-10<31><30>װоƬ <20><>ַΪICAddr = 0
|
|||
|
|
#define BL0942_ADDR_R 0x58
|
|||
|
|
#define BL0942_ADDR_W 0xA8
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>УоƬ<D0BE><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1%<25><><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD>1%<25><><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD>ͬһϵ<D2BB><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> EEPROM<4F><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ϵ<EFBFBD><CFB5>=3537*1<><31>ŷ*0.51K*1000/(1.218*1.218)/(390K*5+0.51K)=623.39 ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㿼<EFBFBD>ǣ<EFBFBD><C7A3>Ŵ<EFBFBD>10<31><30><EFBFBD><EFBFBD>*10=6234
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ϵ<EFBFBD><CFB5>=305978*1<><31>ŷ/1.218=251213<31><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㿼<EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С10<31><30><EFBFBD><EFBFBD>/10=25121
|
|||
|
|
// <20><>ѹת<D1B9><D7AA>ϵ<EFBFBD><CFB5>=73989*0.51K*1000/1.218/(390K*5+0.51K)=15883
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>=3600000*Power_K/1638.4/256=5350.6,<2C><>Ӧ<EFBFBD><D3A6>1<EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD>390K*5+0.51K<EFBFBD><EFBFBD><EFBFBD>з<EFBFBD>ѹ<EFBFBD><EFBFBD>ʵ<EFBFBD>ʲ<EFBFBD><EFBFBD>Է<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// BL0942<34><32><EFBFBD><EFBFBD><EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD>Ƭ<EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD>(̨<><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>MS121WF100NT4E )<29><>ʵ<EFBFBD>ʲ<EFBFBD><CAB2><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ŷƫС<C6AB><D0A1>Լ0.93<EFBFBD><EFBFBD>ŷ
|
|||
|
|
|
|||
|
|
#define Power_K 5798; //<2F><><EFBFBD><EFBFBD>ֵ*0.93
|
|||
|
|
#define Current_K 23362; //<2F><><EFBFBD><EFBFBD>ֵ*0.93
|
|||
|
|
#define Voltage_K 15883; //
|
|||
|
|
#define Energy_K 4976; //<2F><><EFBFBD><EFBFBD>ֵ*0.93
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¡1<C2A1><31>ŷ<EFBFBD><C5B7>Ƭ<EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD>裬ʵ<E8A3AC>ʱ<EFBFBD>1<EFBFBD><31>ŷƫ<C5B7><C6AB><EFBFBD><EFBFBD>Լ1.023<EFBFBD><EFBFBD>ŷ
|
|||
|
|
/*
|
|||
|
|
#define Power_K 6378; //<2F><><EFBFBD><EFBFBD>ֵ*1.023
|
|||
|
|
#define Current_K 25699; //<2F><><EFBFBD><EFBFBD>ֵ*1.023
|
|||
|
|
#define Voltage_K 15883; //
|
|||
|
|
#define Energy_K 5474; //<2F><><EFBFBD><EFBFBD>ֵ*1.023
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef union
|
|||
|
|
{
|
|||
|
|
uint8_t uByte[4];
|
|||
|
|
uint16_t uInt[2];
|
|||
|
|
uint32_t uLongs;
|
|||
|
|
}FourBytes_Type;
|
|||
|
|
|
|||
|
|
typedef union
|
|||
|
|
{
|
|||
|
|
uint8_t uByte[2];
|
|||
|
|
uint16_t uInt;
|
|||
|
|
}TwoByte_Type;
|
|||
|
|
|
|||
|
|
//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD>ʽ
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
uint8_t head;
|
|||
|
|
uint8_t I_RMS[3];
|
|||
|
|
uint8_t V_RMS[3];
|
|||
|
|
uint8_t I_FAST_RMS[3];
|
|||
|
|
uint8_t WATT[3];
|
|||
|
|
uint8_t CF_CNT[3];
|
|||
|
|
uint8_t FREQ[3];
|
|||
|
|
uint8_t STATUS[3];
|
|||
|
|
uint8_t CHKSUM;
|
|||
|
|
}AllFlame_StructDef;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef union
|
|||
|
|
{
|
|||
|
|
uint8_t B8[23];
|
|||
|
|
AllFlame_StructDef Flame;
|
|||
|
|
}AllFlame_TypeDef;
|
|||
|
|
|
|||
|
|
//BL0942/0940<34>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
uint16_t Energy_kwh; // ʵ<><CAB5><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>ǧ<EFBFBD><C7A7>Сʱ XXXXXX,1<>ȵ<EFBFBD>/LSB<53><42><EFBFBD><EFBFBD><EFBFBD><EFBFBD>65535<33>ȵ<EFBFBD>
|
|||
|
|
uint32_t Fir_CF_CNT; // <20><>һ<EFBFBD>ε<EFBFBD>CF_CNT<4E>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
uint32_t Mid_CF_CNT; // С<><D0A1>1<EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
uint16_t Power_Value; // unit: 0.1W XXXX.X<><58><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>0.1W
|
|||
|
|
|
|||
|
|
uint16_t Current_Value; // unit: 0.001A XX.XXX<58><58><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>0.001A
|
|||
|
|
uint16_t Voltage_Value; // unit:0.01V XXX.XX<58><58><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>0.01V
|
|||
|
|
uint16_t Freq; // unit:0.01Hz XX.XX<58><58><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>0.01Hz
|
|||
|
|
uint16_t F_Current_Value;
|
|||
|
|
}Elect_StructDef;
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef enum
|
|||
|
|
{
|
|||
|
|
BUS_COM_STATE_IDLE,
|
|||
|
|
BUS_COM_STATE_WAITE_CURRENT,
|
|||
|
|
BUS_COM_STATE_WAITE_VOLTAGE,
|
|||
|
|
BUS_CHECK_ERROR,
|
|||
|
|
BUS_COM_STATE_WAITE_CHECK
|
|||
|
|
|
|||
|
|
}Bus_Com_State;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef union
|
|||
|
|
{
|
|||
|
|
uint32_t raw_long;
|
|||
|
|
uint8_t raw_b8[4];
|
|||
|
|
|
|||
|
|
}Raw_Data;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
uint16_t bus_rms_current_mA; // <20><><EFBFBD>߹<EFBFBD><DFB9><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>Чֵ <20><>λΪmA
|
|||
|
|
uint16_t bus_rms_voltage_V; // <20><><EFBFBD>߹<EFBFBD><DFB9><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9>Чֵ <20><>λΪV
|
|||
|
|
|
|||
|
|
uint32_t voltage_raw;
|
|||
|
|
uint32_t current_raw;
|
|||
|
|
|
|||
|
|
Bus_Com_State bus_com_stm;
|
|||
|
|
|
|||
|
|
uint8_t current_index;
|
|||
|
|
|
|||
|
|
}EleC_V_data;
|
|||
|
|
|
|||
|
|
extern EleC_V_data elec_v_data;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
extern Elect_StructDef BL0942_Elect;
|
|||
|
|
extern uint16_t u16_TmrCnt; //<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|||
|
|
extern bool IsGetBL0942EData; //<2F><>ʱ<EFBFBD><CAB1>1<EFBFBD>룬<EFBFBD><EBA3AC>BL0942ͨ<32>Ż<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
extern bool flg_Comm; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>״̬
|
|||
|
|
|
|||
|
|
void Delay_MS(uint16_t Count);
|
|||
|
|
void Uart_Init(void);
|
|||
|
|
void Delay_100uS(uint16_t Count);
|
|||
|
|
void BL0942_Uart_Init(void);
|
|||
|
|
bool BL0942_Uart1_R(uint8_t ICAddr,uint8_t cmd);
|
|||
|
|
void BL0942_Uart1_W(uint8_t ICAddr,uint8_t cmd);
|
|||
|
|
void BL0942_Uart_ReadEData(void);
|
|||
|
|
void BL0942_Uart_ConfigInit(void);
|
|||
|
|
bool BL0942_Uart1_ReadAll(uint8_t ICAddr);
|
|||
|
|
void BL0942_Uart_ReadEDataAll(void);
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
/************************** <20>ⲿAPI<50><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> **************************/
|
|||
|
|
void User_Coulombmeter_Init(void);
|
|||
|
|
void UART5_IRQHandler(void);
|
|||
|
|
|
|||
|
|
void User_Coulombmeter_Data_refresh(void);
|
|||
|
|
|
|||
|
|
#ifdef __cplusplus
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#endif /* __COULOMBMETER_H */
|
|||
|
|
|
|||
|
|
/************************ (C) COPYRIGHT Yuwell *****END OF FILE****/
|