if it breaks, I’m in the mountains

This commit is contained in:
2026-03-24 04:38:40 +03:00
parent 8574ffadc9
commit 14b4f0595f
64 changed files with 38499 additions and 39958 deletions

27
Core/Inc/cp.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef __CP_H
#define __CP_H
#include "main.h"
#include <stdint.h>
#define DUTY_INVERT 0
typedef enum {
EV_STATE_A_IDLE = 0,
EV_STATE_B_CONN_PREP = 1,
EV_STATE_C_CONN_ACTIVE = 2,
EV_STATE_D_CONN_ACT_VENT = 3,
EV_STATE_E_NO_POWER = 4,
EV_STATE_F_ERROR = 5,
EV_STATE_ACQUIRING = 6,
} CP_State_t;
void CP_Init(void);
void CP_SetDuty(uint8_t percentage);
uint8_t CP_GetDuty(void);
int32_t CP_GetVoltage(void);
CP_State_t CP_GetState(void);
void CP_Loop(void);
#endif