Moved firmware to subfoler firmware

This commit is contained in:
Yury Shuvakin
2023-03-29 19:11:33 +03:00
parent fb819e50a1
commit 4561bcc255
231 changed files with 46 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
#ifndef __DRIVERHWPOWERSTATE_H
#define __DRIVERHWPOWERSTATE_H
#include "generalDefines.h"
#include "stm32f1xx_hal.h"
#include "stdbool.h"
#define NoOfPowersSTATs 3
typedef struct {
GPIO_TypeDef* Port;
uint32_t ClkRegister;
uint32_t Pin;
uint32_t Mode;
uint32_t Pull;
} PowerStatePortStruct;
extern const PowerStatePortStruct driverHWPorts[NoOfPowersSTATs];
typedef enum {
P_STAT_POWER_ENABLE = 0,
P_STAT_BUTTON_INPUT,
P_STAT_CHARGE_DETECT
} PowerStateIDTypedef;
typedef enum {
P_STAT_RESET = 0,
P_STAT_SET
} PowerStateStateTypedef;
void driverHWPowerStateInit(void);
void driverHWPowerStateSetOutput(PowerStateIDTypedef inputPort, PowerStateStateTypedef newState);
bool driverHWPowerStateReadInput(PowerStateIDTypedef inputPort);
#endif