latest version
This commit is contained in:
@@ -52,17 +52,6 @@
|
||||
#define EDCAN_REG_BSM 0x380
|
||||
|
||||
|
||||
#define EDCAN_REG_OUTPUT 0x500
|
||||
|
||||
GBT_EDCAN_Output_t GBT_EDCAN_Output;
|
||||
|
||||
|
||||
#define EDCAN_REG_INPUT 0x580
|
||||
|
||||
GBT_EDCAN_Input_t GBT_EDCAN_Input;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Handler for incoming Read packet
|
||||
* Another device reply value of its registers
|
||||
@@ -154,10 +143,6 @@ void EDCAN_WriteUserRegister(uint16_t addr, uint8_t value){
|
||||
((uint8_t*)&GBT_ChargerInfo)[addr - EDCAN_REG_CHARGER_INFO] = value;
|
||||
break;
|
||||
|
||||
//0x580
|
||||
case EDCAN_REG_INPUT ... (EDCAN_REG_INPUT+sizeof(GBT_EDCAN_Input_t)):
|
||||
((uint8_t*)&GBT_EDCAN_Input)[addr - EDCAN_REG_INPUT] = value;
|
||||
|
||||
//TODO
|
||||
//GBT_EDCAN_Input.measuredCurrent;
|
||||
break;
|
||||
@@ -223,15 +208,6 @@ uint8_t EDCAN_GetUserRegisterValue(uint16_t addr){
|
||||
return ((uint8_t*)&GBT_BatteryStatus)[addr - EDCAN_REG_BSM];
|
||||
|
||||
|
||||
//0x500
|
||||
case EDCAN_REG_OUTPUT ... (EDCAN_REG_OUTPUT+sizeof(GBT_EDCAN_Output_t)):
|
||||
return ((uint8_t*)&GBT_EDCAN_Output)[addr - EDCAN_REG_OUTPUT];
|
||||
|
||||
//0x580
|
||||
case EDCAN_REG_INPUT ... (EDCAN_REG_INPUT+sizeof(GBT_EDCAN_Input_t)):
|
||||
return ((uint8_t*)&GBT_EDCAN_Input)[addr - EDCAN_REG_INPUT];
|
||||
|
||||
|
||||
default:
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user