📄 sysclock_init.c
字号:
#include <hw_types.h>
#include <hw_memmap.h>
#include <hw_sysctl.h>
#include <hw_gpio.h>
#include <sysctl.h>
#include <gpio.h>
#include "hw_ints.h"
#include <interrupt.h>
#include "sysclock_init.h"
unsigned int TheSysClock;
void sysclock_init(void)
{
SysCtlLDOSet(SYSCTL_LDO_2_75V);
SysCtlClockSet(SYSCTL_USE_PLL |
SYSCTL_OSC_MAIN |
SYSCTL_XTAL_6MHZ |
SYSCTL_SYSDIV_10);
TheSysClock = SysCtlClockGet(); // 获取当前的系统时钟频率
}
void cpu_interrupt(void)
{
IntMasterEnable(); /* 使能处理器中断 */
}
void cpu_disinterrupt(void)
{
IntMasterDisable();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -