⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pwtoff.c

📁 640J3的Flash的驱动和测试程序
💻 C
字号:
/*
changed by Stone
*/

#include "io.h"
#include "type.h"

/* Muti-control register */
#define   COMP_MODE_CTRL_0   0xfffe100c
#define   FUNC_MUX_CTRL_6    0xfffe101c 

/* PWT regusters */
#define   REG_PWT_FRC    0xfffb6000    //PWT frequency control
#define   REG_PWT_VRC    0xfffb6004    //PWT volume control
#define   REG_PWT_GCR    0xfffb6008    //PWT general control



void PWTOff(void)
{
    UINT32 tempval;
    
    //Init PWT
    /*COMP_MODE_CTRL_0 must be set to 0xEAEF if using configure register*/
    Set32(0x0000EAEF, COMP_MODE_CTRL_0);   //0xfffe100c
    /* FUNC_MUX_CTRL_6[2:0]=010---->select PWT */
    tempval = Get32(FUNC_MUX_CTRL_6);    
    tempval &= 0xfffffffa;
    tempval |= 0x00000002;
    Set32(tempval, FUNC_MUX_CTRL_6);  //0xfffe101c
    
    //Disable PWT
    SetIo8(0x00, REG_PWT_VRC);
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -