mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-01 00:39:12 +00:00
e3c7201a20
* 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>
70 lines
1.4 KiB
C
70 lines
1.4 KiB
C
/**
|
|
* @file event_flag.h
|
|
* Furi Event Flag
|
|
*/
|
|
#pragma once
|
|
|
|
#include "base.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void FuriEventFlag;
|
|
|
|
/** Allocate FuriEventFlag
|
|
*
|
|
* @return pointer to FuriEventFlag
|
|
*/
|
|
FuriEventFlag* furi_event_flag_alloc();
|
|
|
|
/** Deallocate FuriEventFlag
|
|
*
|
|
* @param instance pointer to FuriEventFlag
|
|
*/
|
|
void furi_event_flag_free(FuriEventFlag* instance);
|
|
|
|
/** Set flags
|
|
*
|
|
* @param instance pointer to FuriEventFlag
|
|
* @param[in] flags The flags
|
|
*
|
|
* @return Resulting flags or error (FuriStatus)
|
|
*/
|
|
uint32_t furi_event_flag_set(FuriEventFlag* instance, uint32_t flags);
|
|
|
|
/** Clear flags
|
|
*
|
|
* @param instance pointer to FuriEventFlag
|
|
* @param[in] flags The flags
|
|
*
|
|
* @return Resulting flags or error (FuriStatus)
|
|
*/
|
|
uint32_t furi_event_flag_clear(FuriEventFlag* instance, uint32_t flags);
|
|
|
|
/** Get flags
|
|
*
|
|
* @param instance pointer to FuriEventFlag
|
|
*
|
|
* @return Resulting flags
|
|
*/
|
|
uint32_t furi_event_flag_get(FuriEventFlag* instance);
|
|
|
|
/** Wait flags
|
|
*
|
|
* @param instance pointer to FuriEventFlag
|
|
* @param[in] flags The flags
|
|
* @param[in] options The option flags
|
|
* @param[in] timeout The timeout
|
|
*
|
|
* @return Resulting flags or error (FuriStatus)
|
|
*/
|
|
uint32_t furi_event_flag_wait(
|
|
FuriEventFlag* instance,
|
|
uint32_t flags,
|
|
uint32_t options,
|
|
uint32_t timeout);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|