Other Parts Discussed in Thread: MSP430F147
I have much code written for other compilers and I want to use the same code for the MSP430F5632. I want to use this style code DisplayRESET = 0; where DisplayRESET is a single pin. Here is the struct and #defines I have:
struct BitMapping
{
unsigned
Bit0:1,
Bit1:1,
Bit2:1,
Bit3:1,
Bit4:1,
Bit5:1,
Bit6:1,
Bit7:1;
}CHR;
#define Port1_2Base 0x200
#define Port2OUTCHAR ( * (char *)Port1_2Base + 0x03)
#define Port2OUT ( * (struct BitMapping *)Port1_2Base + 0x03)
#define Port5_6Base 0x240
#define Port5OUT ( * (struct BitMapping *)Port5_6Base + 0x02)
#define Port6IN ( * (struct BitMapping *)Port5_6Base + 0x01)
#define Port6OUT ( * (struct BitMapping *)Port5_6Base + 0x03)
#define Port7_8Base 0x260
#define Port7IN ( * (struct BitMapping *)Port7_8Base + 0x00)
#define Port7OUT ( * (struct BitMapping *)Port7_8Base + 0x02)
#define DisplayCD Port6OUT.Bit6
#define DisplayCE Port7OUT.Bit7
#define DisplayWR Port7OUT.Bit6
#define DisplayData Port2OUT.CHR
#define DisplayRD Port6OUT.Bit7
#define DisplayRESET Port5OUT.Bit6
When I compile, everywhere I use a display pin like:
DisplayCD = 0;
I get:
Description Resource Path Location Type
#42 expression must have arithmetic or pointer type DisplayRoutines.c /HRX MSP Ccode/MSP HRX CCODE line 89 C/C++ Problem
I have not found any examples of pins being used like this. It's all:
DisplayCD |= BIT6;
or
DisplayCD &=~BIT6;
What do I need to do to use:
DisplayCD = 0;