我试图在我的主板 MSP432 上定义一些指向端口寄存器的指针,但是,在下面的代码中,当我尝试声明我的指针时,我不断收到以下错误:
"../main.c", line 11: error #41: expected an identifier "../main.c", line 11: error #80: expected a type specifier
我尝试了几种不同的替代方法,但不断收到相同的错误并且不知道如何修复它。任何帮助将不胜感激!
#include "msp.h"
#include <stdint.h>
void main()
{
unsigned int count = 0;
unsigned int i = 0;
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD;
uint8_t * P1IN = (uint8_t *)0x40004C00;
uint8_t * P1SEL0 = (uint8_t *)0x40004C0A;
uint8_t * P1SEL1 = (uint8_t *)0x40004C0C;
uint8_t * P1OUT = (uint8_t *)0x40004C02;
uint8_t * PDIR = (uint8_t *)0x40004C04;
.....