latest version
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#ifndef INC_CHARGER_GBT_H_
|
||||
#define INC_CHARGER_GBT_H_
|
||||
|
||||
#include "main.h"
|
||||
#include "connector.h"
|
||||
|
||||
@@ -23,6 +24,13 @@
|
||||
#define GBT_CST_CURRENT_MISMATCH 0x0000F0F1 // Неправильный ток
|
||||
#define GBT_CST_ABNORMALVOLTAGEERROR 0x0000F0F4 // Ненормальное напряжение
|
||||
|
||||
typedef enum {
|
||||
GBT_STOP_EVSE = 0,
|
||||
GBT_STOP_EV = 1,
|
||||
GBT_STOP_OCPP = 2,
|
||||
|
||||
}GBT_StopSource_t;
|
||||
|
||||
|
||||
typedef enum{
|
||||
GBT_CC_UNKNOWN,
|
||||
@@ -33,6 +41,16 @@ typedef enum{
|
||||
|
||||
}gbtCcState_t;
|
||||
|
||||
typedef enum __attribute__((packed)){
|
||||
CONN_NO_ERROR = 0,
|
||||
CONN_ERR_INSULATION = 1,
|
||||
CONN_ERR_EMERGENCY = 2,
|
||||
CONN_ERR_DOOR_OPEN = 3,
|
||||
CONN_ERR_LOCK = 4,
|
||||
CONN_ERR_CONN_TEMP = 5,
|
||||
|
||||
}CONN_Error_t;
|
||||
|
||||
typedef enum{
|
||||
GBT_DISABLED = 0x10,
|
||||
// GBT_S0_UNCONNECTED = 0x10, //СС1 12V/6V СС2 12V
|
||||
@@ -54,12 +72,6 @@ typedef enum{
|
||||
|
||||
}gbtState_t;
|
||||
|
||||
typedef enum __attribute__((packed)){
|
||||
GBT_ERR_OKAY = 0,
|
||||
GBT_ERR_INSULATION = 1,
|
||||
|
||||
}GBT_Error_t;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct {
|
||||
@@ -165,6 +177,7 @@ typedef struct {
|
||||
uint8_t chargingElapsedTimeSec; //
|
||||
|
||||
CONN_State_t connectorState;
|
||||
CONN_Error_t outputError; // 0 if okay
|
||||
|
||||
|
||||
}GBT_EDCAN_Output_t;
|
||||
@@ -175,7 +188,7 @@ typedef struct {
|
||||
uint16_t measuredCurrent; // 0.1A/bit
|
||||
|
||||
CONN_Control_t chargeControl;
|
||||
GBT_Error_t chargingError; // 0 if okay
|
||||
CONN_Error_t chargingError; // 0 if okay
|
||||
|
||||
}GBT_EDCAN_Input_t;
|
||||
|
||||
@@ -223,10 +236,15 @@ extern uint8_t GBT_BRO;
|
||||
|
||||
extern uint8_t GBT_Charger_Enable;
|
||||
|
||||
extern GBT_StopSource_t GBT_StopSource;
|
||||
|
||||
void GBT_Init();
|
||||
void GBT_Start();
|
||||
void GBT_Reset();
|
||||
void GBT_Stop(uint32_t causecode);
|
||||
//void GBT_Stop(uint32_t causecode);
|
||||
void GBT_StopEV(uint32_t causecode);
|
||||
void GBT_StopEVSE(uint32_t causecode);
|
||||
void GBT_StopOCPP(uint32_t causecode);
|
||||
void GBT_ForceStop();
|
||||
void GBT_ChargerTask();
|
||||
void GBT_Error(uint32_t errorcode);
|
||||
|
||||
Reference in New Issue
Block a user