Re: error: 'PORT_CHANNEL_A' undeclared here (not in a function)
2018/11/05 12:30:29
(permalink)
Hi,
I digged into this issue. The processor declaration files stored in:
C:\microchip\harmony\v2_06\framework\peripheral\ports\processor,
file: ports_p32mx270f256b.h contains this declaration:
typedef enum {
PORT_CHANNEL_A = 0x00,
PORT_CHANNEL_B = 0x01
} PORTS_CHANNEL;
Unfortunately the file ports_p32mx695f512h.h contains this declaration:
typedef enum {
PORT_CHANNEL_B = 0x01,
PORT_CHANNEL_C = 0x02,
PORT_CHANNEL_D = 0x03,
PORT_CHANNEL_E = 0x04,
PORT_CHANNEL_F = 0x05,
PORT_CHANNEL_G = 0x06
} PORTS_CHANNEL;
So the declaration "PORT_CHANNEL_A = 0x00," is missing for the p32mx695f512h cpu.
To initialize the first i2c device, we need "PORT_CHANNEL_A = 0x00" declared.
Any ideas why this declaration is missing?