79 lines
2.0 KiB
C
Executable File
79 lines
2.0 KiB
C
Executable File
#ifndef EVSE_CONFIG_H
|
|
#define EVSE_CONFIG_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// ========================
|
|
// Limites Globais (Defines)
|
|
// ========================
|
|
|
|
// Corrente máxima de carregamento (configurável pelo usuário)
|
|
#define MIN_CHARGING_CURRENT_LIMIT 6 // A
|
|
#define MAX_CHARGING_CURRENT_LIMIT 16 // A
|
|
|
|
// Corrente máxima da rede elétrica (grid)
|
|
#define MIN_GRID_CURRENT_LIMIT 6 // A
|
|
#define MAX_GRID_CURRENT_LIMIT 100 // A
|
|
|
|
// Corrente via cabo (proximity) — se configurável
|
|
#define MIN_CABLE_CURRENT_LIMIT 6 // A
|
|
#define MAX_CABLE_CURRENT_LIMIT 63 // A
|
|
|
|
// ========================
|
|
// Funções de Configuração
|
|
// ========================
|
|
|
|
// Inicialização
|
|
esp_err_t evse_config_init(void);
|
|
void evse_check_defaults(void);
|
|
|
|
// Corrente de carregamento
|
|
uint8_t evse_get_max_charging_current(void);
|
|
esp_err_t evse_set_max_charging_current(uint8_t value);
|
|
|
|
uint16_t evse_get_charging_current(void);
|
|
esp_err_t evse_set_charging_current(uint16_t value);
|
|
|
|
uint16_t evse_get_default_charging_current(void);
|
|
esp_err_t evse_set_default_charging_current(uint16_t value);
|
|
|
|
// Corrente da rede elétrica
|
|
uint8_t grid_get_max_current(void);
|
|
esp_err_t grid_set_max_current(uint8_t value);
|
|
|
|
// Configuração de socket outlet
|
|
bool evse_get_socket_outlet(void);
|
|
esp_err_t evse_set_socket_outlet(bool socket_outlet);
|
|
|
|
// RCM
|
|
bool evse_is_rcm(void);
|
|
esp_err_t evse_set_rcm(bool rcm);
|
|
|
|
// Temperatura
|
|
uint8_t evse_get_temp_threshold(void);
|
|
esp_err_t evse_set_temp_threshold(uint8_t threshold);
|
|
|
|
// Autenticação
|
|
bool evse_is_require_auth(void);
|
|
void evse_set_require_auth(bool require);
|
|
|
|
// Disponibilidade
|
|
bool evse_config_is_available(void);
|
|
void evse_config_set_available(bool available);
|
|
|
|
// Ativação/desativação do EVSE
|
|
bool evse_config_is_enabled(void);
|
|
void evse_config_set_enabled(bool enabled);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // EVSE_CONFIG_H
|