What are the second LED and Second button definition on SAMV71 Xplained ultra?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The following are the definitions for LED0 and SWITCH0

/* Using LED0 SAMV71-XPLAINED-ULTRA (PA23) */
#define EXAMPLE_LED_PORT (0)
#define EXAMPLE_LED_MASK ((1 << 23))

/* Using button SW0 on SAMV71-XPLAINED-ULTRA (PA9) */
#define EXAMPLE_BUTTON_PORT (0)
#define EXAMPLE_BUTTON_MASK ((1 << 9))

So now what are the definitions for LED1 and SWITCH1. How do I change the above lines to use LED1 and SWITCH1. LED0 is on pin PA23 and LED1 is on pin PC09 and SW1 is on pin PB12. Please let me know.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The _PORT define is 0 for PA, 1 for PB etc.
The _MASK should be obvious but (1<<9) for LED1 and (1<<12) for SW1.

/Lars

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I already tried this since it is PC09 but it does not work,that is why I posted the question:

#define EXAMPLE_LED_PORT (2)
#define EXAMPLE_LED_MASK ((1 << 9))

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That would be useful info in the original question.  Alas. I don't have a SAMV71 Xplained ultra, hope someone who has can answer.

/Lars