Moved firmware to subfoler firmware
This commit is contained in:
35
firmware/Core/Inc/driverHWPowerState.h
Normal file
35
firmware/Core/Inc/driverHWPowerState.h
Normal 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
|
||||
Reference in New Issue
Block a user