GONEC_ARTERY_PowerManagement/PowerManagement.h

65 lines
1.2 KiB
C

//
// Created by cfif on 27.09.22.
//
#ifndef POWERMANAGEMENT_H
#define POWERMANAGEMENT_H
#include "SerialPorts.h"
#include "stdint.h"
#include "GpioPin.h"
#include "SpiPorts.h"
typedef struct {
tGpioPin pwrkey;
tGpioPin reset;
tGpioPin pwr_en;
tGpioPin dtr_sleep;
} tSIM800FPower;
typedef struct {
tGpioPin onOff;
tGpioPin reset;
tGpioPin pwr_en;
} tPRO04Power;
typedef struct {
tGpioPin gpio1;
tGpioPin gpio4;
tGpioPin gonec_pwr_amp;
// tGpioPin gonec_is_prm;
tGpioPin gonec_boot;
tGpioPin gonec_reset;
tGpioPin tx_pwr_en;
tGpioPin tx_pwr_5;
tGpioPin tx_pwr_good;
tGpioPin discretOut1_pd3;
tGpioPin discretOut1_pd0;
tGpioPin discretIn1_pg3;
tGpioPin discretIn1_pg2;
} tPower;
typedef struct {
tSIM800FPower *SIM800FPower;
tPRO04Power *PRO04Power;
tPower *Power;
} tPowerManagement;
void Pwm_Init(
tPowerManagement *env,
tPower *Power,
tSIM800FPower *SIM800FPower,
tPRO04Power *PRO04Power
);
void Pwm_Power(tPowerManagement *env);
void Pwm_SIM800FStartup(tPowerManagement *env);
void Pwm_PRO04Startup(tPowerManagement *env);
#endif //POWERMANAGEMENT_H