2022-01-05 16:10:18 +00:00
|
|
|
#include <furi_hal.h>
|
2021-10-17 20:34:36 +00:00
|
|
|
#include <stm32wbxx_ll_utils.h>
|
2021-09-10 02:19:02 +00:00
|
|
|
|
|
|
|
void furi_hal_init() {
|
|
|
|
furi_hal_i2c_init();
|
|
|
|
furi_hal_light_init();
|
|
|
|
furi_hal_spi_init();
|
2021-10-21 12:24:34 +00:00
|
|
|
furi_hal_version_init();
|
2021-10-17 20:34:36 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 15:23:40 +00:00
|
|
|
void furi_hal_delay_ms(float milliseconds) {
|
2021-10-17 20:34:36 +00:00
|
|
|
LL_mDelay((uint32_t)milliseconds);
|
|
|
|
}
|
|
|
|
|
2022-03-30 15:23:40 +00:00
|
|
|
void furi_hal_delay_us(float microseconds) {
|
2021-10-17 20:34:36 +00:00
|
|
|
microseconds = microseconds / 1000;
|
|
|
|
if(microseconds < 1) {
|
|
|
|
microseconds = 1;
|
|
|
|
}
|
|
|
|
LL_mDelay((uint32_t)microseconds);
|
|
|
|
}
|