Api hw gpio pwm (#199)

* initial gpio layer

* move temlplate.c to template.c.example in preparing to applications.mk rework

* separate arduino layer

* separate flipper_hal.x

* prepare to switch applications on v2 core gpio api

* swithch applications to v2 gpio api

* gpio api for local target

* better gpio_disable handling

* remove pwm functions from local target

* inline gpio funcs

* common function to init all api's

* fix local example blink

* move delay us to hal api folder

* move pwm_set/pwm_stop to hal api folder

* update applications to use hal pwm api

* remove gpio mode case warning

* add speaker demo to build

Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
coreglitch
2020-10-26 13:16:54 +06:00
committed by GitHub
parent c8cc3c7dc8
commit f5b342abbe
41 changed files with 464 additions and 341 deletions
+6 -4
View File
@@ -136,9 +136,11 @@
//******************************** class **************************************//
class CC1101 {
private:
GpioPin ss_pin;
GpioPin gdo0_pin;
GpioPin gdo2_pin;
GpioPin* ss_pin;
GpioPin miso_pin;
GpioPin* miso_pin_record;
GpioPin* gdo0_pin;
GpioPin* gdo2_pin;
private:
void SpiMode(byte config);
@@ -150,7 +152,7 @@ private:
void RegConfigSettings(void);
public:
CC1101(GpioPin ss_pin);
CC1101(GpioPin* ss_pin);
void SpiWriteReg(byte addr, byte value);
void SpiInit(void);