forked from achamaikin/CCSModuleSW30Web
global refactoring
This commit is contained in:
49
Core/Inc/connector.h
Normal file
49
Core/Inc/connector.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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_Error = 2,
|
||||
CONN_Available = 3,
|
||||
CONN_Occupied_waiting = 4,// to charge
|
||||
CONN_Occupied_charging = 5,
|
||||
CONN_Occupied_complete = 6,//, waiting to disconnect
|
||||
|
||||
} 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_ */
|
||||
Reference in New Issue
Block a user