[FL-936] CLI commands for vibro, led and display backlight support (#367)

* api-hal: add api-hal-vibro
* cli: add vibro cli command
* cli: add cli commands for led and disp backlight
This commit is contained in:
gornekich
2021-03-08 18:48:14 +03:00
committed by GitHub
parent 651c5b35ca
commit 73e5379520
5 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#include <api-hal-vibro.h>
#include <api-hal-gpio.h>
void api_hal_vibro_init() {
hal_gpio_init(&vibro_gpio, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
hal_gpio_write(&vibro_gpio, false);
}
void api_hal_vibro_on(bool value) {
hal_gpio_write(&vibro_gpio, value);
}