WXK
2024-12-16 78e84fcf264afd731cd66c807d9fcb690fe12126
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**************************************************************************//**
 * @file     sys.c
 * @version  V1.00
 * $Revision: 2 $
 * $Date: 16/03/24 19:02 $
 * @brief    Panchip series SYS driver source file
 *
 * @note
 * Copyright (C) 2016 Panchip Technology Corp. All rights reserved.
*****************************************************************************/
#include "PanSeries.h"
#include "pan_sys.h"
 
/** @addtogroup Panchip_Device_Driver Panchip Device Driver
  @{
*/
 
/** @addtogroup Panchip_SYS_Driver SYS Driver
  @{
*/
 
 
/** @addtogroup Panchip_SYS_EXPORTED_FUNCTIONS SYS Exported Functions
  @{
*/
 
#define __nop()     __asm("nop")
 
void SYS_delay_10nop(uint32_t u32NopCnt)
{
    while(u32NopCnt--)
    {
        __nop();
        __nop();
        __nop();
        __nop();
        __nop();
        __nop();
        __nop();
        __nop();
        __nop();
    }
}
 
/**
  * @brief  This function check register write-protection bit setting
  * @return 0: Write-protection function is disabled.
  *         1: Write-protection function is enabled.
  */
uint32_t SYS_IsRegLocked(void)
{
    return !(SYS->REGLCTL & SYS_REGLCTL_REGLCTL_Msk);
}
 
 
/*@}*/ /* end of group Panchip_SYS_EXPORTED_FUNCTIONS */
 
/*@}*/ /* end of group Panchip_SYS_Driver */
 
/*@}*/ /* end of group Panchip_Device_Driver */
 
/*** (C) COPYRIGHT 2016 Panchip Technology Corp. ***/