From 89d00747fd7efbc6cff6298cd45621d1789a2ac5 Mon Sep 17 00:00:00 2001 From: cfif Date: Wed, 4 Dec 2024 13:10:48 +0300 Subject: [PATCH] Init --- PwmLe910.c | 25 +++++++++++++++++++++++++ PwmLe910.h | 27 +++++++++++++++++++++++++++ modular.json | 22 ++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 PwmLe910.c create mode 100644 PwmLe910.h create mode 100644 modular.json diff --git a/PwmLe910.c b/PwmLe910.c new file mode 100644 index 0000000..b88e0dc --- /dev/null +++ b/PwmLe910.c @@ -0,0 +1,25 @@ +// +// Created by xemon on 30.12.22. +// +#include "PwmLe910.h" +#include "SystemDelayInterface.h" + +void PwmLe910_StartUp(tTelitPower *env) { + + GpioPinEnable(&env->charge.power); + GpioPinEnable(&env->charge.onOff); + + GpioPinEnable(&env->charge.ChargeC); + GpioPinEnable(&env->charge.power); + GpioPinEnable(&env->charge.onOff); +// GpioPinEnable(&env->inAnt); + +} + +void PwmLe910_ShutDown(tTelitPower *env) { + GpioPinDisable(&env->charge.onOff); + GpioPinDisable(&env->charge.power); + SystemDelayMs(1000); + GpioPinDisable(&env->discharge.chargeCapacitors); + GpioPinDisable(&env->discharge.chargeCapacitorsDNI); +} diff --git a/PwmLe910.h b/PwmLe910.h new file mode 100644 index 0000000..1b9b229 --- /dev/null +++ b/PwmLe910.h @@ -0,0 +1,27 @@ +// +// Created by xemon on 30.12.22. +// + +#ifndef UVEOS_ON_NATION_PWMLE910_H +#define UVEOS_ON_NATION_PWMLE910_H + +#include "GpioPin.h" + +typedef struct { + struct { + tGpioPin onOff; + tGpioPin power; + tGpioPin ChargeC; + } charge; + + struct { + tGpioPin chargeCapacitors; + tGpioPin chargeCapacitorsDNI; + } discharge; + tGpioPin ring; +} tTelitPower; + + +void PwmLe910_StartUp(tTelitPower *env); +void PwmLe910_ShutDown(tTelitPower *env); +#endif //UVEOS_ON_NATION_PWMLE910_H diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..e4b5b5a --- /dev/null +++ b/modular.json @@ -0,0 +1,22 @@ +{ + "dep": [ + { + "type": "git", + "provider": "NAVIGATOR_UVEOS_NATION_TELIT", + "repo": "GpioPinInterface" + }, + { + "type": "git", + "provider": "NAVIGATOR_UVEOS_NATION_TELIT", + "repo": "SystemDelayInterface" + } + ], + "cmake": { + "inc_dirs": [ + "./" + ], + "srcs": [ + "./**.c" + ] + } +} \ No newline at end of file