声明指针错误消息:“期望标识符”

时间:2017-09-06 08:00:50

标签: c pointers compiler-errors embedded msp432

我试图在我的主板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;

.....

0 个答案:

没有答案