RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Sema4

Driver version

void SEMA4_Init (SEMA4_Type *base)
 Initializes the SEMA4 module.
 
void SEMA4_Deinit (SEMA4_Type *base)
 De-initializes the SEMA4 module.
 
status_t SEMA4_TryLock (SEMA4_Type *base, uint8_t gateNum, uint8_t procNum)
 Tries to lock the SEMA4 gate.
 
void SEMA4_Lock (SEMA4_Type *base, uint8_t gateNum, uint8_t procNum)
 Locks the SEMA4 gate.
 
status_t SEMA4_ResetGate (SEMA4_Type *base, uint8_t gateNum)
 Resets the SEMA4 gate to an unlocked status.
 
status_t SEMA4_ResetGateNotify (SEMA4_Type *base, uint8_t gateNum)
 Resets the SEMA4 gate IRQ notification.
 
#define FSL_SEMA4_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 SEMA4 driver version.
 
#define SEMA4_GATE_NUM_RESET_ALL   (64U)
 The number to reset all SEMA4 gates.
 
#define SEMA4_GATEn(base, n)   (((volatile uint8_t *)(&((base)->Gate00)))[(n)])
 SEMA4 gate n register address.
 

Detailed Description

Function Documentation

◆ SEMA4_Deinit()

void SEMA4_Deinit ( SEMA4_Type base)

De-initializes the SEMA4 module.

This function de-initializes the SEMA4 module. It only disables the clock.

Parameters
baseSEMA4 peripheral base address.

brief De-initializes the SEMA4 module.

This function de-initializes the SEMA4 module. It only disables the clock.

param base SEMA4 peripheral base address.

◆ SEMA4_Init()

void SEMA4_Init ( SEMA4_Type base)

Initializes the SEMA4 module.

This function initializes the SEMA4 module. It only enables the clock but does not reset the gates because the module might be used by other processors at the same time. To reset the gates, call either SEMA4_ResetGate or SEMA4_ResetAllGates function.

Parameters
baseSEMA4 peripheral base address.

brief Initializes the SEMA4 module.

This function initializes the SEMA4 module. It only enables the clock but does not reset the gates because the module might be used by other processors at the same time. To reset the gates, call either SEMA4_ResetGate or SEMA4_ResetAllGates function.

param base SEMA4 peripheral base address.

◆ SEMA4_Lock()

void SEMA4_Lock ( SEMA4_Type base,
uint8_t  gateNum,
uint8_t  procNum 
)

Locks the SEMA4 gate.

This function locks the specific SEMA4 gate. If the gate has been locked by other processors, this function waits until it is unlocked and then lock it.

Parameters
baseSEMA4 peripheral base address.
gateNumGate number to lock.
procNumCurrent processor number.

brief Locks the SEMA4 gate.

This function locks the specific SEMA4 gate. If the gate has been locked by other processors, this function waits until it is unlocked and then lock it.

param base SEMA4 peripheral base address. param gateNum Gate number to lock. param procNum Current processor number.

◆ SEMA4_ResetGate()

status_t SEMA4_ResetGate ( SEMA4_Type base,
uint8_t  gateNum 
)

Resets the SEMA4 gate to an unlocked status.

This function resets a SEMA4 gate to an unlocked status.

Parameters
baseSEMA4 peripheral base address.
gateNumGate number.
Return values
kStatus_SuccessSEMA4 gate is reset successfully.
kStatus_FailSome other reset process is ongoing.

brief Resets the SEMA4 gate to an unlocked status.

This function resets a SEMA4 gate to an unlocked status.

param base SEMA4 peripheral base address. param gateNum Gate number.

retval kStatus_Success SEMA4 gate is reset successfully. retval kStatus_Fail Some other reset process is ongoing.

◆ SEMA4_ResetGateNotify()

status_t SEMA4_ResetGateNotify ( SEMA4_Type base,
uint8_t  gateNum 
)

Resets the SEMA4 gate IRQ notification.

This function resets a SEMA4 gate IRQ notification.

Parameters
baseSEMA4 peripheral base address.
gateNumGate number.
Return values
kStatus_SuccessReset successfully.
kStatus_FailSome other reset process is ongoing.

brief Resets the SEMA4 gate IRQ notification.

This function resets a SEMA4 gate IRQ notification.

param base SEMA4 peripheral base address. param gateNum Gate number.

retval kStatus_Success Reset successfully. retval kStatus_Fail Some other reset process is ongoing.

◆ SEMA4_TryLock()

status_t SEMA4_TryLock ( SEMA4_Type base,
uint8_t  gateNum,
uint8_t  procNum 
)

Tries to lock the SEMA4 gate.

This function tries to lock the specific SEMA4 gate. If the gate has been locked by another processor, this function returns an error code.

Parameters
baseSEMA4 peripheral base address.
gateNumGate number to lock.
procNumCurrent processor number.
Return values
kStatus_SuccessLock the sema4 gate successfully.
kStatus_FailSema4 gate has been locked by another processor.

brief Tries to lock the SEMA4 gate.

This function tries to lock the specific SEMA4 gate. If the gate has been locked by another processor, this function returns an error code.

param base SEMA4 peripheral base address. param gateNum Gate number to lock. param procNum Current processor number.

retval kStatus_Success Lock the sema4 gate successfully. retval kStatus_Fail Sema4 gate has been locked by another processor.