RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Rdc_sema42

Driver version

void RDC_SEMA42_Init (RDC_SEMAPHORE_Type *base)
 Initializes the RDC_SEMA42 module.
 
void RDC_SEMA42_Deinit (RDC_SEMAPHORE_Type *base)
 De-initializes the RDC_SEMA42 module.
 
status_t RDC_SEMA42_TryLock (RDC_SEMAPHORE_Type *base, uint8_t gateNum, uint8_t masterIndex, uint8_t domainId)
 Tries to lock the RDC_SEMA42 gate.
 
void RDC_SEMA42_Lock (RDC_SEMAPHORE_Type *base, uint8_t gateNum, uint8_t masterIndex, uint8_t domainId)
 Locks the RDC_SEMA42 gate.
 
int32_t RDC_SEMA42_GetLockDomainID (RDC_SEMAPHORE_Type *base, uint8_t gateNum)
 Gets which domain has currently locked the gate.
 
status_t RDC_SEMA42_ResetGate (RDC_SEMAPHORE_Type *base, uint8_t gateNum)
 Resets the RDC_SEMA42 gate to an unlocked status.
 
#define FSL_RDC_SEMA42_DRIVER_VERSION   (MAKE_VERSION(2, 0, 4))
 RDC_SEMA42 driver version.
 
#define RDC_SEMA42_GATE_NUM_RESET_ALL   (64U)
 The number to reset all RDC_SEMA42 gates.
 
#define RDC_SEMA42_GATEn(base, n)   (((volatile uint8_t *)(&((base)->GATE0)))[(n)])
 RDC_SEMA42 gate n register address.
 
#define RDC_SEMA42_GATE_COUNT   (64U)
 RDC_SEMA42 gate count.
 
#define RDC_SEMAPHORE_GATE_GTFSM_MASK   RDC_SEMAPHORE_GATE0_GTFSM_MASK
 

Detailed Description

Function Documentation

◆ RDC_SEMA42_Deinit()

void RDC_SEMA42_Deinit ( RDC_SEMAPHORE_Type base)

De-initializes the RDC_SEMA42 module.

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

Parameters
baseRDC_SEMA42 peripheral base address.

brief De-initializes the RDC_SEMA42 module.

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

param base RDC_SEMA42 peripheral base address.

◆ RDC_SEMA42_GetLockDomainID()

int32_t RDC_SEMA42_GetLockDomainID ( RDC_SEMAPHORE_Type base,
uint8_t  gateNum 
)

Gets which domain has currently locked the gate.

Parameters
baseRDC_SEMA42 peripheral base address.
gateNumGate number.
Returns
Return -1 if the gate is not locked by any domain, otherwise return the domain ID.

brief Gets which domain has currently locked the gate.

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

return Return -1 if the gate is not locked by any domain, otherwise return the domain ID.

◆ RDC_SEMA42_Init()

void RDC_SEMA42_Init ( RDC_SEMAPHORE_Type base)

Initializes the RDC_SEMA42 module.

This function initializes the RDC_SEMA42 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 RDC_SEMA42_ResetGate or RDC_SEMA42_ResetAllGates function.

Parameters
baseRDC_SEMA42 peripheral base address.

brief Initializes the RDC_SEMA42 module.

This function initializes the RDC_SEMA42 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 RDC_SEMA42_ResetGate or RDC_SEMA42_ResetAllGates function.

param base RDC_SEMA42 peripheral base address.

◆ RDC_SEMA42_Lock()

void RDC_SEMA42_Lock ( RDC_SEMAPHORE_Type base,
uint8_t  gateNum,
uint8_t  masterIndex,
uint8_t  domainId 
)

Locks the RDC_SEMA42 gate.

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

Parameters
baseRDC_SEMA42 peripheral base address.
gateNumGate number to lock.
masterIndexCurrent processor master index.
domainIdCurrent processor domain ID.

brief Locks the RDC_SEMA42 gate.

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

param base RDC_SEMA42 peripheral base address. param gateNum Gate number to lock. param masterIndex Current processor master index. param domainId Current processor domain ID.

◆ RDC_SEMA42_ResetGate()

status_t RDC_SEMA42_ResetGate ( RDC_SEMAPHORE_Type base,
uint8_t  gateNum 
)

Resets the RDC_SEMA42 gate to an unlocked status.

This function resets a RDC_SEMA42 gate to an unlocked status.

Parameters
baseRDC_SEMA42 peripheral base address.
gateNumGate number.
Return values
kStatus_SuccessRDC_SEMA42 gate is reset successfully.
kStatus_FailedSome other reset process is ongoing.

brief Resets the RDC_SEMA42 gate to an unlocked status.

This function resets a RDC_SEMA42 gate to an unlocked status.

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

retval kStatus_Success RDC_SEMA42 gate is reset successfully. retval kStatus_Failed Some other reset process is ongoing.

◆ RDC_SEMA42_TryLock()

status_t RDC_SEMA42_TryLock ( RDC_SEMAPHORE_Type base,
uint8_t  gateNum,
uint8_t  masterIndex,
uint8_t  domainId 
)

Tries to lock the RDC_SEMA42 gate.

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

Parameters
baseRDC_SEMA42 peripheral base address.
gateNumGate number to lock.
masterIndexCurrent processor master index.
domainIdCurrent processor domain ID.
Return values
kStatus_SuccessLock the sema42 gate successfully.
kStatus_FailedSema42 gate has been locked by another processor.

brief Tries to lock the RDC_SEMA42 gate.

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

param base RDC_SEMA42 peripheral base address. param gateNum Gate number to lock. param masterIndex Current processor master index. param domainId Current processor domain ID.

retval kStatus_Success Lock the sema42 gate successfully. retval kStatus_Failed Sema42 gate has been locked by another processor.