Switches notifier to use a typedef for the callback, and prepends HAL_ to InterruptHandlerFunction (#216)

This commit is contained in:
Thad House
2016-09-05 07:31:51 -07:00
committed by Peter Johnson
parent 028efff50d
commit 59ec54887d
6 changed files with 16 additions and 13 deletions

View File

@@ -15,8 +15,8 @@
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*InterruptHandlerFunction)(uint32_t interruptAssertedMask,
void* param);
typedef void (*HAL_InterruptHandlerFunction)(uint32_t interruptAssertedMask,
void* param);
HAL_InterruptHandle HAL_InitializeInterrupts(HAL_Bool watcher, int32_t* status);
void HAL_CleanInterrupts(HAL_InterruptHandle interruptHandle, int32_t* status);
@@ -36,8 +36,8 @@ void HAL_RequestInterrupts(HAL_InterruptHandle interruptHandle,
HAL_AnalogTriggerType analogTriggerType,
int32_t* status);
void HAL_AttachInterruptHandler(HAL_InterruptHandle interruptHandle,
InterruptHandlerFunction handler, void* param,
int32_t* status);
HAL_InterruptHandlerFunction handler,
void* param, int32_t* status);
void HAL_SetInterruptUpSourceEdge(HAL_InterruptHandle interruptHandle,
HAL_Bool risingEdge, HAL_Bool fallingEdge,
int32_t* status);

View File

@@ -14,7 +14,10 @@
#ifdef __cplusplus
extern "C" {
#endif
HAL_NotifierHandle HAL_InitializeNotifier(void (*process)(uint64_t, HAL_NotifierHandle),
typedef void (*HAL_NotifierProcessFunction)(uint64_t currentTime,
HAL_NotifierHandle handle);
HAL_NotifierHandle HAL_InitializeNotifier(HAL_NotifierProcessFunction process,
void* param, int32_t* status);
void HAL_CleanNotifier(HAL_NotifierHandle notifierHandle, int32_t* status);
void* HAL_GetNotifierParam(HAL_NotifierHandle notifierHandle, int32_t* status);