mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Remove old systick.c
This commit is contained in:
parent
d031ea87f1
commit
78a6d54c89
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the OpenMV project.
|
|
||||||
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
|
|
||||||
* This work is licensed under the MIT license, see the file LICENSE for details.
|
|
||||||
*
|
|
||||||
* Systick driver.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#include <stm32f4xx_hal.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "systick.h"
|
|
||||||
int systick_init()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void systick_sleep(volatile uint32_t ms)
|
|
||||||
{
|
|
||||||
volatile uint32_t curr_ticks = HAL_GetTick();
|
|
||||||
while ((HAL_GetTick() - curr_ticks) < ms) {
|
|
||||||
__WFI();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t systick_current_millis()
|
|
||||||
{
|
|
||||||
return HAL_GetTick();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool sys_tick_has_passed(uint32_t stc, uint32_t delay_ms)
|
|
||||||
{
|
|
||||||
systick_sleep(delay_ms);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user