734820c137
* Targets: add F6 * F6: Update linker script for use with internal storage * F6: synchronize with F5, add all changes arriving in V9 board, update cube project. Github workflow: add multi-target build, add F6 to build targets. * CI: fix full assembly * CI: better artifact naming scheme * CI: fix artifacts wildcard * F6: Swap C10 - A15, vibro and sdcard detect pins
25 lines
591 B
C
25 lines
591 B
C
#include <api-hal-ibutton.h>
|
|
#include <api-hal-resources.h>
|
|
|
|
void api_hal_ibutton_start() {
|
|
api_hal_ibutton_pin_high();
|
|
hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioSpeedLow, GpioPullNo);
|
|
}
|
|
|
|
void api_hal_ibutton_stop() {
|
|
api_hal_ibutton_pin_high();
|
|
hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioSpeedLow, GpioPullNo);
|
|
}
|
|
|
|
void api_hal_ibutton_pin_low() {
|
|
hal_gpio_write(&ibutton_gpio, false);
|
|
}
|
|
|
|
void api_hal_ibutton_pin_high() {
|
|
hal_gpio_write(&ibutton_gpio, true);
|
|
}
|
|
|
|
bool api_hal_ibutton_pin_get_level() {
|
|
return hal_gpio_read(&ibutton_gpio);
|
|
}
|