Hi,
I think i want to do something similar, like r_james14 i want to do something similar to the following,
Code:
int main()
{
switch()
{
case 0:
structFLEXCAN2_tag *RS232Port= PORT1;
break;
case 1:
structFLEXCAN2_tag *RS232Port= port2;
break;
}
SendRS232(RS232Port, 0x01, 0x02, 9600);
}
void SendRS232 (port, message part 1, message part 2, baudrate)
{
port -> RS232.baudrate;
port -> RS232.message.message part 1
port -> RS232.message.message part 2
}
but how do i initially code the switch statement at the beginning?
I have taken a few strucutres out of this to make it easier to explain what im doing.
PORT1 and PORT2 are prefefined structures