You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ChangeLog.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,14 @@ These items are in addition to what was listed under changes already in release.
13
13
14
14
## 1.6.0
15
15
These are typically planned for release in a future version (usually the next one) as noted.
16
-
* Add support for not-yet-announced S class DA-series parts, which are identical but for having the new EB-series lockdown thingie. There are no changes needed.
17
16
* Support for the PTC peripheral on DA parts
18
-
* Correct bug with EA-series parts having the SYSCFG0 fuse burned incorrectly. This would brick any EA-series part programmed. Luckily as uploading doesn't work right, few people have managed to do this.
17
+
* Correct bug with EA-series parts having the SYSCFG0 fuse set during normal uploads, which is inappropriate, because if the UPDIPINCFG bit is not 1, the chip can only be reprogrammed with an exotic HV programmer.
18
+
* Corrected a bug with EA-series parts incorrectly calculating the UPDIPINCFG bit as 0 in all cases. In combination with the above, unlucky users who were able to get an upload to attempt would promptly brick the chip, since nobody has HV programmers. Sorry bout that \o/ I'm not even certain there is a programming problem, or if I'd just attempted to program every chip I had mounted on a board....
19
+
* Correct bug with EA-series parts failing to correctly configure clock speed.
20
+
* Add support for EB-series to tools menus, permitting compile tests.
21
+
* Brutal restructuring of Arduino.h.
22
+
* keywords.txt for DxCore contained numerous deficiencies of varying severities. It was rebuilt de novo. Slightly less disorganized this time.
#error "Your custom variant says it provides a _digitalPinToCanon (SPECIAL_PIN_NUMBERS defined) but you don't provide one. \n Define NONCANONICAL_PIN_NUMBERS instead to use a possibly slower handler for the general case"
558
+
#endif
559
+
#endif
560
+
// this stuff used to be in the variants.
561
+
#if !defined(NUM_DIGITAL_PINS)
562
+
/* Despite the name, this actually is a number 1 higher than the highest valid number for a digital pin
563
+
* that is, it's the first integer which does not refer to a pin, and the number of digital pins if there
564
+
* were no gaps in the numbering. Almost every pin mapping has gaps.
565
+
* Tests like if (pin >= NUM_DIGITAL_PIN) return; are ubiquitous.
566
+
* So we need to make our NUM_DIGITAL_PINS work like that.
567
+
*/
568
+
#if defined(PIN_PG7) // if there's a PORTG, that's the last pin. Add 1 to get the first non-pin
569
+
#defineNUM_DIGITAL_PINS (PIN_PG7 + 1)
570
+
#elif defined(PIN_PF7) // if the UPDI pin, PF7 is defined (ie, UPDI can be prorgrammed as GPIO)
571
+
#defineNUM_DIGITAL_PINS (PIN_PF7 + 1)
572
+
#elif defined(PIN_PF6) // otherwise it should be the reset pin, PG6.
573
+
#defineNUM_DIGITAL_PINS (PIN_PF6 + 1)
574
+
#else
575
+
#error "The variant file is incorrect, as it indicates no PG7, PF7 or PF6. All supported and announced parts have one or more of those pins."
576
+
#endif
577
+
#endif
578
+
#if !defined(NUM_RESERVED_PINS)
579
+
#defineNUM_RESERVED_PINS (0)
580
+
#endif
581
+
#if !defined(NUM_INTERNALLY_USED_PINS)
582
+
#if ((CLOCK_SOURCE&0x03) ==1)
583
+
#defineNUM_INTERNALLY_USED_PINS (2) // External crystal takes PA0 and PA1
584
+
#elif ((CLOCK_SOURCE&0x03) ==2)
585
+
#defineNUM_INTERNALLY_USED_PINS (1) // External clock takes out PA0
586
+
#else
587
+
#defineNUM_INTERNALLY_USED_PINS (0)
588
+
#endif
589
+
#endif
590
+
#if !defined(NUM_I2C_PINS)
591
+
#defineNUM_I2C_PINS (2) // per I2C port in use - this number is nonsensical without qualification is is only for compatibility.
592
+
#endif
593
+
#if !defined(NUM_SPI_PINS)
594
+
#defineNUM_SPI_PINS (3) // per SPI port in use - this number is nonsensical without qualification is is only for compatibility.
// CLKCTRL_SELHF_EXTCLOCK_gc or CLKCTRL_SELHF_EXTCLK_gc? Microchip can't seem to decide, and we can't test for it with the preprocessor because it's a bloody enumerated type.
2180
2180
// 0x02 is the numeric value of that constant. I can't even provide compatibility defines, because I don't have any way to tell which one it is for a given version of the headers.
Copy file name to clipboardExpand all lines: megaavr/extras/Ref_LTO.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ inline __attribute__((always_inline)) void check_valid_digital_pin(pin_size_t pi
56
56
if (pin >= NUM_TOTAL_PINS && pin != NOT_A_PIN) { // Exception made for NOT_A_PIN - code exists which relies on being able to pass this and have nothing happen.
57
57
badArg("Digital pin is constant, but not a valid pin");
58
58
}
59
-
#if (CLOCK_SOURCE == 2)
59
+
#if (((CLOCK_SOURCE & 0x03) == 2))
60
60
#if defined(MEGATINYCORE)
61
61
if (pin == PIN_PA3) {
62
62
badArg("Constant digital pin PIN_PA3 is used for the external osc, and is not available for other uses.");
@@ -66,7 +66,7 @@ inline __attribute__((always_inline)) void check_valid_digital_pin(pin_size_t pi
66
66
badArg("Constant digital pin PIN_PA0 is used for the external osc, and is not available for other uses.");
67
67
}
68
68
#endif
69
-
#elif CLOCK_SOURCE == 1
69
+
#elif ((CLOCK_SOURCE & 0x03) == 1)
70
70
if (pin < 2) {
71
71
badArg("Pin PA0 and PA1 cannot be used for digital I/O because those are used for external crystal clock.");
0 commit comments