Skip to content

Commit

Permalink
Make it possible to define LED_BUILTIN in the build process
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Aug 28, 2023
1 parent 6d11866 commit 48779c7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
12 changes: 7 additions & 5 deletions avr/variants/bobuino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATm
#endif

// Builtin LED
#define LED_BUILTIN (13)
#if !defined(LED_BUILTIN)
#define LED_BUILTIN (13)
#endif
static const uint8_t LED = LED_BUILTIN;

// Analog pins
Expand Down Expand Up @@ -98,7 +100,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
static const uint8_t MOSI1 = PIN_SPI_MOSI1;
static const uint8_t MISO1 = PIN_SPI_MISO1;
static const uint8_t SCK1 = PIN_SPI_SCK1;
#endif
#endif

// i2c
#define PIN_WIRE_SDA (23)
Expand Down Expand Up @@ -577,7 +579,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM00 UPM0
#define UPM01 UPM1
#define UMSEL00 UMSEL0
#define UMSEL01 UMSEL1
#define UMSEL01 UMSEL1
#define MPCM1 MPCM
#define U2X1 U2X
#define UPE1 UPE
Expand All @@ -601,7 +603,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM10 UPM0
#define UPM11 UPM1
#define UMSEL10 UMSEL0
#define UMSEL11 UMSEL1
#define UMSEL11 UMSEL1
#define MPCM2 MPCM
#define U2X2 U2X
#define UPE2 UPE
Expand All @@ -626,7 +628,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM21 UPM1
#define UMSEL20 UMSEL0
#define UMSEL21 UMSEL1

// i2c
#define TWI_vect TWI0_vect
#define TWI_vect_num TWI0_vect_num
Expand Down
12 changes: 7 additions & 5 deletions avr/variants/sanguino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATm
#endif

// Builtin LED
#define LED_BUILTIN (0)
#if !defined(LED_BUILTIN)
#define LED_BUILTIN (0)
#endif
static const uint8_t LED = LED_BUILTIN;

// Analog pins
Expand Down Expand Up @@ -99,7 +101,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
static const uint8_t MISO1 = PIN_SPI_MISO1;
static const uint8_t SCK1 = PIN_SPI_SCK1;
#endif

// i2c
#define PIN_WIRE_SDA (17)
#define PIN_WIRE_SCL (16)
Expand Down Expand Up @@ -525,7 +527,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM00 UPM0
#define UPM01 UPM1
#define UMSEL00 UMSEL0
#define UMSEL01 UMSEL1
#define UMSEL01 UMSEL1
#define MPCM1 MPCM
#define U2X1 U2X
#define UPE1 UPE
Expand All @@ -549,7 +551,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM10 UPM0
#define UPM11 UPM1
#define UMSEL10 UMSEL0
#define UMSEL11 UMSEL1
#define UMSEL11 UMSEL1
#define MPCM2 MPCM
#define U2X2 U2X
#define UPE2 UPE
Expand All @@ -574,7 +576,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM21 UPM1
#define UMSEL20 UMSEL0
#define UMSEL21 UMSEL1

// i2c
#define TWI_vect TWI0_vect
#define TWI_vect_num TWI0_vect_num
Expand Down
12 changes: 7 additions & 5 deletions avr/variants/standard/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATm
#endif

// Builtin LED
#define LED_BUILTIN (0)
#if !defined(LED_BUILTIN)
#define LED_BUILTIN (0)
#endif
static const uint8_t LED = LED_BUILTIN;

// Analog pins
Expand Down Expand Up @@ -85,7 +87,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_SPI_SS0 PIN_SPI_SS
#define PIN_SPI_MOSI0 PIN_SPI_MOSI
#define PIN_SPI_MISO0 PIN_SPI_MISO
#define PIN_SPI_SCK0 PIN_SPI_SCK
#define PIN_SPI_SCK0 PIN_SPI_SCK
#define PIN_SPI_SS1 (14)
#define PIN_SPI_MOSI1 (35)
#define PIN_SPI_MISO1 (34)
Expand Down Expand Up @@ -524,7 +526,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM00 UPM0
#define UPM01 UPM1
#define UMSEL00 UMSEL0
#define UMSEL01 UMSEL1
#define UMSEL01 UMSEL1
#define MPCM1 MPCM
#define U2X1 U2X
#define UPE1 UPE
Expand All @@ -548,7 +550,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM10 UPM0
#define UPM11 UPM1
#define UMSEL10 UMSEL0
#define UMSEL11 UMSEL1
#define UMSEL11 UMSEL1
#define MPCM2 MPCM
#define U2X2 U2X
#define UPE2 UPE
Expand All @@ -573,7 +575,7 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
#define UPM21 UPM1
#define UMSEL20 UMSEL0
#define UMSEL21 UMSEL1

// i2c
#define TWI_vect TWI0_vect
#define TWI_vect_num TWI0_vect_num
Expand Down

0 comments on commit 48779c7

Please sign in to comment.