This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LAUNCHXL2-570LC43: Definition for pin not working

Part Number: LAUNCHXL2-570LC43

Tool/software: TI C/C++ Compiler

I prefer using defined names instead of having to go back and forth to find port and pin numbers.

I want to monitor a 3.3V logic input from a 5V voltage monitor.  

In my code I have tried

#define 5Vgood      hetPORT1, 1

and then 

while(gioGetBit(5Vgood)==0); //to wait for the voltage to be "good"

I get this error for the definition:

../source/HL_sys_main.c", line 101: error #41: expected an identifier

and the following errors for the usage in the while statement:

../source/HL_sys_main.c", line 180: error #19: extra text after expected end of number
"../source/HL_sys_main.c", line 180: warning #169-D: argument of type "int" is incompatible with parameter of type "gioPORT_t *"
"../source/HL_sys_main.c", line 180: warning #154-D: conversion of nonzero integer to pointer
"../source/HL_sys_main.c", line 180: error #167: too few arguments in function call
"../source/HL_sys_main.c", line 259: warning #112-D: statement is unreachable

It works when I use the convention below, but then I always have to update all occurences in the code if something changes.

while(gioGetBit(hetPORT1,1)==0);//wait for 5V good

Is this simply because the HETPORT doesn't mesh with the gioPORT_t type?

Using this type of definition works fine for PortA and B as follows:

#define ldFault     gioPORTA, 0

Any ideas how to use a define to simplify things?

Thanks in advance