68 lines
1.6 KiB
C
Executable File
68 lines
1.6 KiB
C
Executable File
#ifndef EVSE_CONFIG_H
|
|
#define EVSE_CONFIG_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "esp_err.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "evse_events.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// ========================
|
|
// Limites Globais (Defines)
|
|
// ========================
|
|
|
|
#define MIN_CHARGING_CURRENT_LIMIT 6 // A
|
|
#define MAX_CHARGING_CURRENT_LIMIT 32 // A
|
|
|
|
#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 máxima de hardware (fixa)
|
|
uint8_t evse_get_max_charging_current(void);
|
|
|
|
// Corrente configurável (persistida) <= max hardware
|
|
uint16_t evse_get_charging_current(void);
|
|
esp_err_t evse_set_charging_current(uint16_t value);
|
|
|
|
// Corrente runtime (RAM) <= max hardware (load balancer pode alterar)
|
|
void evse_set_runtime_charging_current(uint16_t value);
|
|
uint16_t evse_get_runtime_charging_current(void);
|
|
|
|
// 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);
|
|
|
|
// 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
|