3 Replies Latest reply on Jul 6, 2013 7:14 PM by user_26192809

    Naming Pins for flexibility

    user_26192809

      I'm trying to find MORE information on the use of naming pins in PSoC1.  I've read (& reread) both GPIO Demystified posts as well as AN 2094 - Getting Started with GPIO.

         

      From what I've gathered, if I name a pin (say PB), then I can access the PORT by typing LED_1_Data_ADDR.  How do I access just the PIN then to determine if it's high or low? 

         

      Right now, if "PB" is at port 1, pin 7, I read that pin by using PRT1DR & 0x80.  What would I do if I want to use the name only? 

         

      AN 2094 says there's a macro for the pin mask, but doesn't give the command.  Where should I look for more information so I can figure this out?

         

      Thanks!