API HAL I2C: add timeout support. Update I2C API usage by drivers. (#374)
* API HAL I2C: add timeout support. Update I2C API usage by drivers. * F4: Add missing API HAL Vibro implementation.
This commit is contained in:
11
firmware/targets/f4/api-hal/api-hal-vibro.c
Normal file
11
firmware/targets/f4/api-hal/api-hal-vibro.c
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user