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
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,6 @@ These items are in addition to what was listed under changes already in release.
9
9
10
10
#### Planned 2.7.0
11
11
* Migrate to avrdude 7.2
12
-
13
-
#### Planned 2.6.10/x
14
12
* Add support `_getCurrentMillisTimer()` and `getCurrentMillisMode()`, required for sleepTime.
15
13
16
14
@@ -26,6 +24,9 @@ Changes listed here are checked in to GitHub ("master" branch unless specificall
26
24
27
25
### Planned 2.6.11
28
26
* Correct numerous issues with the microchip board defs. Clearly nobody is using them - since 2 of them didn't compile, and none of the optiboot ones would ever be able to successfully be programmed over the bootloader because selfprogramming wasn't enabled (BOOTEND = 0).
27
+
* Major Bugfix: Correct issue #1164 thanks to John Vasileff. This would cause Serial.flush to hang in one-wire mode.
28
+
* Major Bugfix: Correct buffered PWM on all parts.
Copy file name to clipboardExpand all lines: megaavr/cores/megatinycore/core_devices.h
+101-3Lines changed: 101 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -282,6 +282,59 @@
282
282
#define__AVR_TINY_2__
283
283
#endif
284
284
285
+
286
+
/* These are constant for all tinies, and make the variant stuff look a lot nicer */
287
+
#if defined(TCA0) && defined(PORTMUX_TCA00_bm)
288
+
#if defined(_TCA_ALT_WO0)
289
+
#define_TCA_WO0 PIN_PB0
290
+
#else
291
+
#define_TCA_WO0 PIN_PB3
292
+
#endif
293
+
#if defined(_TCA_ALT_WO1)
294
+
#define_TCA_WO1 PIN_PB1
295
+
#else
296
+
#define_TCA_WO1 PIN_PB4
297
+
#endif
298
+
299
+
#if defined(_TCA_ALT_WO2)
300
+
#define_TCA_WO2 PIN_PB2
301
+
#else
302
+
#define_TCA_WO2 PIN_PB5
303
+
#endif
304
+
#if defined(_TCA_USE_WO3)
305
+
#if defined(_TCA_ALT_WO3)
306
+
#define_TCA_WO3 PIN_PA3
307
+
#else
308
+
#define_TCA_WO3 PIN_PC3
309
+
#endif
310
+
#endif
311
+
#if defined(_TCA_USE_WO4)
312
+
#if defined(_TCA_ALT_WO4)
313
+
#define_TCA_WO4 PIN_PC4
314
+
#else
315
+
#define_TCA_WO4 PIN_PA4
316
+
#endif
317
+
#endif
318
+
#if defined(_TCA_USE_WO5)
319
+
#if defined(_TCA_ALT_WO5)
320
+
#define_TCA_WO5 PIN_PA5
321
+
#else
322
+
#define_TCA_WO5 PIN_PC5
323
+
#endif
324
+
#endif
325
+
#endif
326
+
#if defined(USE_TIMERD_PWM)
327
+
#if defined(USE_TCD_WOAB)
328
+
#define_TCD_WOAC PIN_PA4
329
+
#define_TCD_WOBD PIN_PA5
330
+
#else
331
+
#define_TCD_WOAC PIN_PC0
332
+
#define_TCD_WOBD PIN_PC1
333
+
#endif
334
+
#endif
335
+
336
+
337
+
285
338
/* FOLLOWING THIS, SHARED WITH DxCoRE DIRECTLY */
286
339
#if defined(AC2)
287
340
#define_AVR_AC_COUNT (3)
@@ -316,6 +369,7 @@
316
369
#define_AVR_EVSYS_COUNT (3)
317
370
#define_AVR_EVSYS_ASYNC (2)
318
371
#define_AVR_EVSYS_SYNC (1)
372
+
/* Otherwise, we just count down till we find one, since there's no plausible reason for them to number the channels any other way. */
319
373
#elif defined(EVSYS_CHANNEL15)
320
374
#define_AVR_EVSYS_COUNT (16)
321
375
#elif defined(EVSYS_CHANNEL14)
@@ -360,7 +414,8 @@
360
414
* generators allows them to add both options for all ports and both RTC options to all generator channels
361
415
* Too bad they released so many parts with the other versions :-/ */
362
416
363
-
#if defined(PORTA_EVGENCTRL) // Ex-series, with EVGENCTRL registers on RTC and PORT.
417
+
#if defined(PORTA_EVGENCTRL)||defined(PORTA_EVGENCTRLA) // Starting with EA, they have EVGENCTRL registers onthe PORTS and RTC, so all channels are equal.
418
+
// Starting with EB, and retroactively changing EA, they renamed them to EVGENCTRLA. Elsewhere we define the other if either one of the two is defined, as we always do when they change spellings.
364
419
#define_AVR_EVSYS_VERSION (3)
365
420
#elif defined(EVSYS_STROBE) // mega0 - basically Dx, but different name for strobe.
366
421
#define_AVR_EVSYS_VERSION (1)
@@ -446,7 +501,7 @@
446
501
#endif
447
502
448
503
#if defined(TCE0)
449
-
#define_AVR_TCE_COUNT (1) // first appears on the EB-series, 16-bit. Some sort of 8-channeled monster who is always with the one they call WEX. I haven't heard from TCA0 after they showed up and started doing
504
+
#define_AVR_TCE_COUNT (1) // first appears on the EB-series, 16-bit.
450
505
#else// PWM on the same pins. I have a bad feeling that TCA0 is either tied up in the basement, or dead in a wooded area. With the TCE's skill at motor control, they could easily have
451
506
#define_AVR_TCE_COUNT (0) // used power-tools to dismember bury the body.... Anyway, whether these guys are as useful in the silicon as they look on paper will depend a lot on the whether those
452
507
#endif// 8-channels are independent, and whether they need to split like TCA did to handle 8 WO's if so. And, of course on how flexible their clocking options are.
@@ -718,6 +773,10 @@ setPrescalerValue(oldpsc);
718
773
719
774
#endif
720
775
776
+
777
+
778
+
779
+
721
780
/* Microchip has shown a tendency to rename registers bitfields and similar between product lines, even when the behavior is identical.
722
781
* This is a major hindrance to writing highly portable code which I assume is what most people wish to do. It certainly beats having
723
782
* to run code through find replace making trivial changes, forcing a fork where you would rather not have one.
@@ -753,6 +812,8 @@ has once worked for the same thing as meaning that thing */
#definedigitalPinHasPWM(p) (((uint8_t)(p)) < (uint8_t) 5) /* every pin except the reset pin, whichmakes since, seeing as it barely has output drivers... */
51
+
#endif
46
52
47
-
#ifdefDAC0
48
-
#defineDAC_PIN (PIN_PA6)
53
+
#if defined(DAC0)
54
+
#if !defined(USE_TIMERD0_PWM)
55
+
#defineDAC_PIN (PIN_PA6)
56
+
#else
57
+
#pragma message("TCD is enabled for PWM output; DAC output via analogWrite() is disabled in favor of TCD PWM")
58
+
/* If you got a problem with that, do it manually! The DAC is about as easy to confgiure as it gets!*/
0 commit comments