1 Reply Latest reply on Oct 22, 2015 10:06 AM by BoTa_264741

    Move/name a digital input at complie time

      Is there a way to change a pin's function name at compile time?


      I'm using PSoC creator 3.3 and a CY8C3866AXI-206.


      I had a PCB with a digital input on P2[6] but the next release of the PCB requires that pin be moved to P2[2]. Other than the pin move the source code remains the same. For example; let say the input is just a switch. In the source I name the pin as "SW1" and read its value with "SW1_read()" .. which, originally, read from P2[6]. Is there a way to modify that assignment at compile time ??  Some how do something like...


      #ifdef  HW1_0


         SW1 = P2[6]




         SW1 = P2[2]