if it breaks, I’m in the mountains
This commit is contained in:
27
Core/Inc/cp.h
Normal file
27
Core/Inc/cp.h
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user