Skip to content
Snippets Groups Projects
Commit 3c58ee87 authored by Sandeep Mistry's avatar Sandeep Mistry
Browse files

Correct NUM_DIGITAL_PINS to include analog pins

parent 2b71432a
No related branches found
No related tags found
No related merge requests found
......@@ -54,10 +54,10 @@ extern "C"
// Number of pins defined in PinDescription array
#define PINS_COUNT (26u)
#define NUM_DIGITAL_PINS (14u)
#define NUM_DIGITAL_PINS (20u)
#define NUM_ANALOG_INPUTS (6u)
#define NUM_ANALOG_OUTPUTS (1u)
#define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
#define analogInputToDigitalPin(p) ((p < 6u) ? (p) + 14u : -1)
#define digitalPinToPort(P) ( &(PORT->Group[g_APinDescription[P].ulPort]) )
#define digitalPinToBitMask(P) ( 1 << g_APinDescription[P].ulPin )
......
......@@ -37,10 +37,10 @@
// Number of pins defined in PinDescription array
#define PINS_COUNT (26u)
#define NUM_DIGITAL_PINS (15u)
#define NUM_DIGITAL_PINS (22u)
#define NUM_ANALOG_INPUTS (7u)
#define NUM_ANALOG_OUTPUTS (1u)
#define analogInputToDigitalPin(p) ((p < NUM_ANALOG_INPUTS) ? (p) + NUM_DIGITAL_PINS : -1)
#define analogInputToDigitalPin(p) ((p < 7u) ? (p) + 15u : -1)
// Low-level pin register query macros
// -----------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment