summaryrefslogtreecommitdiff
path: root/platform/drivers/inc/rdc.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/drivers/inc/rdc.h')
-rw-r--r--platform/drivers/inc/rdc.h43
1 files changed, 28 insertions, 15 deletions
diff --git a/platform/drivers/inc/rdc.h b/platform/drivers/inc/rdc.h
index 6259e78..872e39d 100644
--- a/platform/drivers/inc/rdc.h
+++ b/platform/drivers/inc/rdc.h
@@ -73,7 +73,9 @@ static inline uint32_t RDC_GetSelfDomainID(RDC_Type * base)
* @brief Check whether memory region controlled by RDC is accessible after low power recovery
*
* @param base RDC base pointer.
- * @return Memory region power status (true: on and accessible, false: off)
+ * @return Memory region power status.
+ * - true: on and accessible.
+ * - false: off.
*/
static inline bool RDC_IsMemPowered(RDC_Type * base)
{
@@ -84,7 +86,9 @@ static inline bool RDC_IsMemPowered(RDC_Type * base)
* @brief Check whether there's pending RDC memory region restoration interrupt
*
* @param base RDC base pointer.
- * @return RDC interrupt status (true: interrupt pending, false: no interrupt pending)
+ * @return RDC interrupt status
+ * - true: Interrupt pending.
+ * - false: No interrupt pending.
*/
static inline bool RDC_IsIntPending(RDC_Type * base)
{
@@ -105,7 +109,9 @@ static inline void RDC_ClearStatusFlag(RDC_Type * base)
* @brief Set RDC interrupt mode
*
* @param base RDC base pointer
- * @param enable RDC interrupt control (true: enable, false: disable)
+ * @param enable RDC interrupt control.
+ * - true: enable interrupt.
+ * - false: disable interrupt.
*/
static inline void RDC_SetIntCmd(RDC_Type * base, bool enable)
{
@@ -123,13 +129,14 @@ static inline void RDC_SetIntCmd(RDC_Type * base, bool enable)
* @brief Set RDC domain ID for RDC master
*
* @param base RDC base pointer
- * @param mda RDC master assignment (see _rdc_mda in rdc_defs_<device>.h)
+ * @param mda RDC master assignment (see @ref _rdc_mda in rdc_defs_<device>.h)
* @param domainId RDC domain ID (0-3)
* @param lock Whether to lock this setting? Once locked, no one can change the domain assignment until reset
*/
static inline void RDC_SetDomainID(RDC_Type * base, uint32_t mda, uint32_t domainId, bool lock)
{
assert (domainId <= RDC_MDA_DID_MASK);
+
base->MDA[mda] = RDC_MDA_DID(domainId) | (lock ? RDC_MDA_LCK_MASK : 0);
}
@@ -137,7 +144,7 @@ static inline void RDC_SetDomainID(RDC_Type * base, uint32_t mda, uint32_t domai
* @brief Get RDC domain ID for RDC master
*
* @param base RDC base pointer
- * @param mda RDC master assignment (see _rdc_mda in rdc_defs_<device>.h)
+ * @param mda RDC master assignment (see @ref _rdc_mda in rdc_defs_<device>.h)
* @return RDC domain ID (0-3)
*/
static inline uint32_t RDC_GetDomainID(RDC_Type * base, uint32_t mda)
@@ -149,7 +156,7 @@ static inline uint32_t RDC_GetDomainID(RDC_Type * base, uint32_t mda)
* @brief Set RDC peripheral access permission for RDC domains
*
* @param base RDC base pointer
- * @param pdap RDC peripheral assignment (see _rdc_pdap in rdc_defs_<device>.h)
+ * @param pdap RDC peripheral assignment (see @ref _rdc_pdap in rdc_defs_<device>.h)
* @param perm RDC access permission from RDC domain to peripheral (byte: D3R D3W D2R D2W D1R D1W D0R D0W)
* @param sreq Force acquiring SEMA42 to access this peripheral or not
* @param lock Whether to lock this setting or not. Once locked, no one can change the RDC setting until reset
@@ -163,7 +170,7 @@ static inline void RDC_SetPdapAccess(RDC_Type * base, uint32_t pdap, uint8_t per
* @brief Get RDC peripheral access permission for RDC domains
*
* @param base RDC base pointer
- * @param pdap RDC peripheral assignment (see _rdc_pdap in rdc_defs_<device>.h)
+ * @param pdap RDC peripheral assignment (see @ref _rdc_pdap in rdc_defs_<device>.h)
* @return RDC access permission from RDC domain to peripheral (byte: D3R D3W D2R D2W D1R D1W D0R D0W)
*/
static inline uint8_t RDC_GetPdapAccess(RDC_Type * base, uint32_t pdap)
@@ -175,8 +182,10 @@ static inline uint8_t RDC_GetPdapAccess(RDC_Type * base, uint32_t pdap)
* @brief Check whether RDC semaphore is required to access the peripheral
*
* @param base RDC base pointer
- * @param pdap RDC peripheral assignment (see _rdc_pdap in rdc_defs_<device>.h)
- * @return RDC semaphore required or not (true: required, false: not required)
+ * @param pdap RDC peripheral assignment (see @ref _rdc_pdap in rdc_defs_<device>.h)
+ * @return RDC semaphore required or not.
+ * - true: RDC semaphore is required.
+ * - false: RDC semaphore is not required.
*/
static inline bool RDC_IsPdapSemaphoreRequired(RDC_Type * base, uint32_t pdap)
{
@@ -187,7 +196,7 @@ static inline bool RDC_IsPdapSemaphoreRequired(RDC_Type * base, uint32_t pdap)
* @brief Set RDC memory region access permission for RDC domains
*
* @param base RDC base pointer
- * @param mr RDC memory region assignment (see _rdc_mr in rdc_defs_<device>.h)
+ * @param mr RDC memory region assignment (see @ref _rdc_mr in rdc_defs_<device>.h)
* @param startAddr memory region start address (inclusive)
* @param endAddr memory region end address (exclusive)
* @param perm RDC access permission from RDC domain to peripheral (byte: D3R D3W D2R D2W D1R D1W D0R D0W)
@@ -201,7 +210,7 @@ void RDC_SetMrAccess(RDC_Type * base, uint32_t mr, uint32_t startAddr, uint32_t
* @brief Get RDC memory region access permission for RDC domains
*
* @param base RDC base pointer
- * @param mr RDC memory region assignment (see _rdc_mr in rdc_defs_<device>.h)
+ * @param mr RDC memory region assignment (see @ref _rdc_mr in rdc_defs_<device>.h)
* @param startAddr pointer to get memory region start address (inclusive), NULL is allowed.
* @param endAddr pointer to get memory region end address (exclusive), NULL is allowed.
* @return RDC access permission from RDC domain to peripheral (byte: D3R D3W D2R D2W D1R D1W D0R D0W)
@@ -214,7 +223,9 @@ uint8_t RDC_GetMrAccess(RDC_Type * base, uint32_t mr, uint32_t *startAddr, uint3
*
* @param base RDC base pointer
* @param mr RDC memory region assignment (see _rdc_mr in rdc_defs_<device>.h)
- * @return Memory region enabled or not (true: enabled, false: not enabled)
+ * @return Memory region enabled or not.
+ * - true: Memory region is enabled.
+ * - false: Memory region is not enabled.
*/
static inline bool RDC_IsMrEnabled(RDC_Type * base, uint32_t mr)
{
@@ -225,10 +236,12 @@ static inline bool RDC_IsMrEnabled(RDC_Type * base, uint32_t mr)
* @brief Get memory violation status
*
* @param base RDC base pointer
- * @param mr RDC memory region assignment (see _rdc_mr in rdc_defs_<device>.h)
+ * @param mr RDC memory region assignment (see @ref _rdc_mr in rdc_defs_<device>.h)
* @param violationAddr Pointer to store violation address, NULL allowed
* @param violationDomain Pointer to store domain ID causing violation, NULL allowed
- * @return Memory violation occured or not (true: violation happened, false: no violation happened)
+ * @return Memory violation occurred or not.
+ * - true: violation happened.
+ * - false: No violation happened.
*/
bool RDC_GetViolationStatus(RDC_Type * base, uint32_t mr, uint32_t *violationAddr, uint32_t *violationDomain);
@@ -236,7 +249,7 @@ bool RDC_GetViolationStatus(RDC_Type * base, uint32_t mr, uint32_t *violationAdd
* @brief Clear RDC violation status
*
* @param base RDC base pointer
- * @param mr RDC memory region assignment (see _rdc_mr in rdc_defs_<device>.h)
+ * @param mr RDC memory region assignment (see @ref _rdc_mr in rdc_defs_<device>.h)
*/
static inline void RDC_ClearViolationStatus(RDC_Type * base, uint32_t mr)
{