PAN1080 Peripheral API
Modules | Macros | Functions
System Interface

System Interface. More...

Collaboration diagram for System Interface:

Modules

 Module reset control resister
 Module reset control resister constant definitions.
 
 Brown out detector threshold voltage selection
 rown out detector threshold voltage selection constant definitions
 
 Io function define
 Io function define constant definitions.
 
 Bod and lvr glitch time control
 Bod and lvr glitch time control constant definitions.
 

Macros

#define SYS_SET_MFP(Port, Bit, Func)    (SYS->Port##_MFP = (SYS->Port##_MFP & ~SYS_MFP_##Port##Bit##_Msk) | SYS_MFP_##Port##Bit##_##Func)
 Set pin function. More...
 
#define SYS_ENABLE_BOD_RST()   (SYS->BODCTL |= SYS_BODCTL_BODRSTEN_Msk)
 Enable Brown-out detector reset function. More...
 

Functions

__STATIC_INLINE void SYS_UnlockReg (void)
 Disable register write-protection function. More...
 
__STATIC_INLINE void SYS_LockReg (void)
 Enable register write-protection function. More...
 
uint32_t SYS_IsRegLocked (void)
 This function check register write-protection bit setting. More...
 
void SYS_DisableBOD (void)
 This function disable BOD function. More...
 
void SYS_delay_10nop (uint32_t u32NopCnt)
 Set delay time. More...
 

Detailed Description

System Interface.

Macro Definition Documentation

◆ SYS_ENABLE_BOD_RST

#define SYS_ENABLE_BOD_RST ( )    (SYS->BODCTL |= SYS_BODCTL_BODRSTEN_Msk)

Enable Brown-out detector reset function.

Returns
None

This macro enable Brown-out detect reset function. The register write-protection function should be disabled before using this macro.

◆ SYS_SET_MFP

#define SYS_SET_MFP (   Port,
  Bit,
  Func 
)     (SYS->Port##_MFP = (SYS->Port##_MFP & ~SYS_MFP_##Port##Bit##_Msk) | SYS_MFP_##Port##Bit##_##Func)

Set pin function.

Parameters
[in]PortGPIO port number.
[in]BitThe single or multiple pins of specified gpio port.
[in]Funcpin function
Returns
None

Function Documentation

◆ SYS_delay_10nop()

void SYS_delay_10nop ( uint32_t  u32NopCnt)

Set delay time.

Parameters
[in]u32NopCntnop count.
Returns
None

◆ SYS_DisableBOD()

void SYS_DisableBOD ( void  )

This function disable BOD function.

Returns
None

◆ SYS_IsRegLocked()

uint32_t SYS_IsRegLocked ( void  )

This function check register write-protection bit setting.

Return values
0Write-protection function is disabled.
1Write-protection function is enabled.

◆ SYS_LockReg()

__STATIC_INLINE void SYS_LockReg ( void  )

Enable register write-protection function.

Returns
None

This function is used to enable register write-protection function. To lock the protected register to forbid write access.

◆ SYS_UnlockReg()

__STATIC_INLINE void SYS_UnlockReg ( void  )

Disable register write-protection function.

Returns
None

This function disable register write-protection function. To unlock the protected register to allow write access.