52 lines
964 B
C
Executable File
52 lines
964 B
C
Executable File
/*
|
|
* connector.h
|
|
*
|
|
* Created on: Jul 31, 2024
|
|
* Author: colorbass
|
|
*/
|
|
|
|
#ifndef INC_CONNECTOR_H_
|
|
#define INC_CONNECTOR_H_
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
// Статус
|
|
// статус подключения к автомобилю
|
|
|
|
typedef enum __attribute__((packed)) {
|
|
CONN_Initializing = 1,
|
|
CONN_Faulted = 2,
|
|
CONN_Available = 3,
|
|
CONN_Preparing = 4,// to charge
|
|
CONN_Charging = 5,
|
|
CONN_Finishing = 6,//, waiting to disconnect
|
|
CONN_Suspended_EV = 7,
|
|
CONN_Suspended_EVSE = 8,
|
|
//Reserved
|
|
} CONN_State_t;
|
|
|
|
// Управление
|
|
// Разрешение на зарядку
|
|
|
|
typedef enum __attribute__((packed)) {
|
|
CHARGING_NOT_ALLOWED = 1,
|
|
CHARGING_ALLOWED = 2,
|
|
FORCE_UNLOCK = 3,
|
|
|
|
} CONN_Control_t;
|
|
#include "charger_gbt.h"
|
|
|
|
|
|
extern CONN_State_t connectorState;
|
|
|
|
void CONN_Init();
|
|
void CONN_Task();
|
|
void CONN_SetState(CONN_State_t state);
|
|
uint8_t CONN_CC_GetStateRaw();
|
|
uint8_t CONN_CC_GetState();
|
|
float CONN_CC_GetAdc();
|
|
|
|
#endif /* INC_CONNECTOR_H_ */
|