11#include "fsl_common.h"
25#define FSL_SEMA4_DRIVER_VERSION (MAKE_VERSION(2, 0, 3))
29#define SEMA4_GATE_NUM_RESET_ALL (64U)
31#if defined(SEMA4_GATE_COUNT)
36#define SEMA4_GATEn(base, n) ((base)->GATE[(n)])
38#ifndef FSL_FEATURE_SEMA4_GATE_COUNT
39#define FSL_FEATURE_SEMA4_GATE_COUNT SEMA4_GATE_COUNT
47#define SEMA4_GATEn(base, n) (((volatile uint8_t *)(&((base)->Gate00)))[(n)])
55#if defined(__cplusplus)
119static inline void SEMA4_Unlock(
SEMA4_Type *base, uint8_t gateNum)
121 assert(gateNum < (uint8_t)FSL_FEATURE_SEMA4_GATE_COUNT);
137static inline int32_t SEMA4_GetLockProc(
SEMA4_Type *base, uint8_t gateNum)
139 assert(gateNum < (uint8_t)FSL_FEATURE_SEMA4_GATE_COUNT);
183static inline void SEMA4_EnableGateNotifyInterrupt(
SEMA4_Type *base, uint8_t procNum, uint32_t mask)
186 base->CPINE[procNum].CPINE |= (uint16_t)mask;
200static inline void SEMA4_DisableGateNotifyInterrupt(
SEMA4_Type *base, uint8_t procNum, uint32_t mask)
203 base->CPINE[procNum].CPINE &= (uint16_t)(~mask);
219static inline uint32_t SEMA4_GetGateNotifyStatus(
SEMA4_Type *base, uint8_t procNum)
252#if defined(__cplusplus)
__STATIC_FORCEINLINE uint32_t __REV(uint32_t value)
Reverse byte order (32 bit)
Definition: cmsis_gcc.h:309
__STATIC_FORCEINLINE uint32_t __RBIT(uint32_t value)
Reverse bit order of value.
Definition: cmsis_gcc.h:390
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
status_t SEMA4_TryLock(SEMA4_Type *base, uint8_t gateNum, uint8_t procNum)
Tries to lock the SEMA4 gate.
Definition: fsl_sema4.c:134
status_t SEMA4_ResetGateNotify(SEMA4_Type *base, uint8_t gateNum)
Resets the SEMA4 gate IRQ notification.
Definition: fsl_sema4.c:226
void SEMA4_Init(SEMA4_Type *base)
Initializes the SEMA4 module.
Definition: fsl_sema4.c:96
#define SEMA4_GATE_NUM_RESET_ALL
The number to reset all SEMA4 gates.
Definition: fsl_sema4.h:29
status_t SEMA4_ResetGate(SEMA4_Type *base, uint8_t gateNum)
Resets the SEMA4 gate to an unlocked status.
Definition: fsl_sema4.c:187
void SEMA4_Lock(SEMA4_Type *base, uint8_t gateNum, uint8_t procNum)
Locks the SEMA4 gate.
Definition: fsl_sema4.c:169
#define SEMA4_GATEn(base, n)
SEMA4 gate n register address.
Definition: fsl_sema4.h:47
void SEMA4_Deinit(SEMA4_Type *base)
De-initializes the SEMA4 module.
Definition: fsl_sema4.c:112
Definition: MIMXRT1166_cm4.h:72888