Furi: core refactoring and CMSIS removal part 2 (#1410)
* Furi: rename and move core * Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest * Furi: CMSIS_OS drop and refactoring. * Furi: refactoring, remove cmsis legacy * Furi: fix incorrect assert on queue deallocation, cleanup timer * Furi: improve delay api, get rid of floats * hal: dropped furi_hal_crc * Furi: move DWT based delay to cortex HAL * Furi: update core documentation Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
template <unsigned int N> struct STOP_EXTERNING_ME {};
|
||||
#endif
|
||||
|
||||
#include "furi_hal_cortex.h"
|
||||
#include "furi_hal_clock.h"
|
||||
#include "furi_hal_crypto.h"
|
||||
#include "furi_hal_console.h"
|
||||
@@ -21,7 +22,6 @@ template <unsigned int N> struct STOP_EXTERNING_ME {};
|
||||
#include "furi_hal_speaker.h"
|
||||
#include "furi_hal_gpio.h"
|
||||
#include "furi_hal_light.h"
|
||||
#include "furi_hal_delay.h"
|
||||
#include "furi_hal_power.h"
|
||||
#include "furi_hal_interrupt.h"
|
||||
#include "furi_hal_version.h"
|
||||
|
32
firmware/targets/furi_hal_include/furi_hal_cortex.h
Normal file
32
firmware/targets/furi_hal_include/furi_hal_cortex.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @file furi_hal_cortex.h
|
||||
* ARM Cortex HAL
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Early init stage for cortex
|
||||
*/
|
||||
void furi_hal_cortex_init_early();
|
||||
|
||||
/** Microseconds delay
|
||||
*
|
||||
* @param[in] microseconds The microseconds to wait
|
||||
*/
|
||||
void furi_hal_cortex_delay_us(uint32_t microseconds);
|
||||
|
||||
/** Get instructions per microsecond count
|
||||
*
|
||||
* @return instructions per microsecond count
|
||||
*/
|
||||
uint32_t furi_hal_cortex_instructions_per_microsecond();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* @file furi_hal_delay.h
|
||||
* Delay HAL API
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Init Delay subsystem */
|
||||
void furi_hal_delay_init();
|
||||
|
||||
/** Get instructions per microsecond count */
|
||||
uint32_t furi_hal_delay_instructions_per_microsecond();
|
||||
|
||||
/** Get current tick counter
|
||||
*
|
||||
* System uptime, may overflow.
|
||||
*
|
||||
* @return Current ticks in milliseconds
|
||||
*/
|
||||
uint32_t furi_hal_get_tick(void);
|
||||
|
||||
/** Convert milliseconds to ticks
|
||||
*
|
||||
* @param[in] milliseconds time in milliseconds
|
||||
* @return time in ticks
|
||||
*/
|
||||
uint32_t furi_hal_ms_to_ticks(float milliseconds);
|
||||
|
||||
/** Delay in milliseconds
|
||||
* @warning Cannot be used from ISR
|
||||
*
|
||||
* @param[in] milliseconds milliseconds to wait
|
||||
*/
|
||||
void furi_hal_delay_ms(float milliseconds);
|
||||
|
||||
/** Delay in microseconds
|
||||
*
|
||||
* @param[in] microseconds microseconds to wait
|
||||
*/
|
||||
void furi_hal_delay_us(float microseconds);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user