HAL to LL migration: GPIO, HSEM, AES (#1069)
* gpio, hsem, crypto: switch from HAL to LL/registers * Moved GPIO initialization to furi_hal * More HAL removed * All HAL modules disabled * HAL is finally removed * hal_gpio -> furi_hal_gpio, main.h removed * Bootloader build fix * RTOS config moved to freertos-glue * delay -> furi_hal_delay Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
#include "timer.h"
|
||||
#include <furi_hal_delay.h>
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
@@ -64,7 +65,7 @@ static uint32_t timerStopwatchTick;
|
||||
|
||||
/*******************************************************************************/
|
||||
uint32_t timerCalculateTimer(uint16_t time) {
|
||||
return (HAL_GetTick() + time);
|
||||
return (furi_hal_get_tick() + time);
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
@@ -72,7 +73,7 @@ bool timerIsExpired(uint32_t timer) {
|
||||
uint32_t uDiff;
|
||||
int32_t sDiff;
|
||||
|
||||
uDiff = (timer - HAL_GetTick()); /* Calculate the diff between the timers */
|
||||
uDiff = (timer - furi_hal_get_tick()); /* Calculate the diff between the timers */
|
||||
sDiff = uDiff; /* Convert the diff to a signed var */
|
||||
|
||||
/* Check if the given timer has expired already */
|
||||
@@ -95,10 +96,10 @@ void timerDelay(uint16_t tOut) {
|
||||
|
||||
/*******************************************************************************/
|
||||
void timerStopwatchStart(void) {
|
||||
timerStopwatchTick = HAL_GetTick();
|
||||
timerStopwatchTick = furi_hal_get_tick();
|
||||
}
|
||||
|
||||
/*******************************************************************************/
|
||||
uint32_t timerStopwatchMeasure(void) {
|
||||
return (uint32_t)(HAL_GetTick() - timerStopwatchTick);
|
||||
return (uint32_t)(furi_hal_get_tick() - timerStopwatchTick);
|
||||
}
|
||||
|
Reference in New Issue
Block a user