更新了一些代码

This commit is contained in:
2026-06-29 02:29:16 +08:00
parent 2d25f6bb06
commit ef3601f9e8
12 changed files with 354 additions and 110 deletions
+6
View File
@@ -150,6 +150,12 @@ void SystemInit() {
SPSTAT = 0xC0;
// 3. (可选) 使能SPI中断
// IE2 |= ESPI;
// ADC_Init()
ADCCFG = ADC_RESFMT; /* 右对齐, 12位结果 */
ADC_CONTR = ADC_POWER; /* 开启ADC电源 */
/* 选择通道11 (P3.3) */
ADC_CONTR = (ADC_CONTR & 0xF0) | 0x0B;
}
void PWMBInit() {
// 1. 使能访问扩展特殊功能寄存器 (XFR)