File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 2626#include <avr/pgmspace.h>
2727#include "timers.h"
2828
29- #define NUM_DIGITAL_PINS 20
29+ #define NUM_DIGITAL_PINS 20 // (14 on digital headers + 6 on analog headers)
3030#define NUM_ANALOG_INPUTS 6
31- #define NUM_TESTPOINT_PINS 9
32- #define NUM_OCCUPIED_PINS 6 // (TOSC1/2, VREF, RESET, DEBUG USART Rx/Tx)
33- #define NUM_TOTAL_FREE_PINS (NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS + NUM_TESTPOINT_PINS)
34- #define NUM_TOTAL_PINS (NUM_DIGITAL_PINS + NUM_ANALOG_INPUTS + NUM_TESTPOINT_PINS + NUM_OCCUPIED_PINS)
35- #define ANALOG_INPUT_OFFSET 14
31+ #define NUM_RESERVED_PINS 6 // (TOSC1/2, VREF, RESET, DEBUG USART Rx/Tx)
32+ #define NUM_INTERNALLY_USED_PINS 10 // (2 x Chip select + 2 x UART + 4 x IO + LED_BUILTIN + 1 unused pin)
33+ #define NUM_I2C_PINS 2 // (SDA / SCL)
34+ #define NUM_SPI_PINS 3 // (MISO / MOSI / SCK)
35+ #define NUM_TOTAL_FREE_PINS (NUM_DIGITAL_PINS)
36+ #define NUM_TOTAL_PINS (NUM_DIGITAL_PINS + NUM_RESERVED_PINS + NUM_INTERNALLY_USED_PINS + NUM_I2C_PINS + NUM_SPI_PINS)
37+ #define ANALOG_INPUT_OFFSET 14
3638#define digitalPinToAnalogInput (p ) ((p < NUM_ANALOG_INPUTS) ? (p) : (p) - ANALOG_INPUT_OFFSET)
3739
38- #define EXTERNAL_NUM_INTERRUPTS 48
40+ #define EXTERNAL_NUM_INTERRUPTS 48
3941
4042#define digitalPinHasPWM (p ) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10)
4143
You can’t perform that action at this time.
0 commit comments