Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 3090d0e

Browse files
authored
v1.1.0 for AVRDD and core 1.5.1
### Release v1.1.0 1. Add support to AVRDD (AVR64DD, AVR32DDx, AVR16DD, etc.) 2. Modify to use either breaking DxCore v1.5.1+ or v1.4.10-
1 parent 7a4ddea commit 3090d0e

File tree

13 files changed

+80
-26
lines changed

13 files changed

+80
-26
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* `DxCore` Core Version (e.g. Arduino DxCore core v1.4.10)
18+
* `DxCore` Core Version (e.g. Arduino DxCore core v1.5.1)
1919
* Board (e.g. AVR128DA64, AVR128DB48, AVR64DB32, etc.)
2020
* Contextual information (e.g. what you were trying to achieve)
2121
* Simplest possible steps to reproduce
2222
* Anything that might be relevant in your opinion, such as:
2323
* Operating system (Windows, Ubuntu, etc.) and the output of `uname -a`
2424
* Network configuration
2525

26+
Please be educated, civilized and constructive. Disrespective posts against [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-event-code-of-conduct) will be ignored and deleted.
2627

2728
### Example
2829

2930
```
3031
Arduino IDE version: 1.8.19
31-
Arduino DxCore core v1.4.10
32-
OS: Ubuntu 20.04 LTS
32+
Arduino DxCore core v1.5.1
3333
Board: Curiosity AVR128DB48
34-
Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
34+
Linux xy-Inspiron-3593 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3535
3636
Context:
3737
I encountered a crash while trying to use this library

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
## Table of Contents
1919

2020
* [Changelog](#changelog)
21+
* [Release v1.1.0](#release-v110)
2122
* [Initial Release v1.0.0](#initial-release-v100)
2223

2324
---
@@ -26,6 +27,11 @@
2627
## Changelog
2728

2829

30+
### Release v1.1.0
31+
32+
1. Add support to AVRDD (AVR64DD, AVR32DDx, AVR16DD, etc.)
33+
2. Modify to use either breaking DxCore v1.5.1+ or v1.4.10-
34+
2935
### Initial Release v1.0.0
3036

3137
1. Initial release to support Arduino **AVRDx-based boards (AVR128Dx, AVR64Dx, AVR32Dx, etc.) using DxCore**

examples/PWM_Basic/PWM_Basic.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
// PF0-3: Not PWM
5252
// PF4-5: TCB
5353

54-
#define pinToUse PIN_PC3 //PIN_PF5
54+
#if defined(PIN_PF5)
55+
#define pinToUse PIN_PF5
56+
#else
57+
#define pinToUse PIN_PC0
58+
#endif
5559

5660
//creates pwm instance
5761
Dx_PWM* PWM_Instance;

examples/PWM_DynamicDutyCycle/PWM_DynamicDutyCycle.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
// PF0-3: Not PWM
5252
// PF4-5: TCB
5353

54-
#define pinToUse PIN_PF5
54+
#if defined(PIN_PF5)
55+
#define pinToUse PIN_PF5
56+
#else
57+
#define pinToUse PIN_PC0
58+
#endif
5559

5660
//creates pwm instance
5761
Dx_PWM* PWM_Instance;

examples/PWM_DynamicDutyCycle_Int/PWM_DynamicDutyCycle_Int.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
// PF0-3: Not PWM
5252
// PF4-5: TCB
5353

54-
#define pinToUse PIN_PF5
54+
#if defined(PIN_PF5)
55+
#define pinToUse PIN_PF5
56+
#else
57+
#define pinToUse PIN_PC0
58+
#endif
5559

5660
//creates pwm instance
5761
Dx_PWM* PWM_Instance;

examples/PWM_DynamicFreq/PWM_DynamicFreq.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
// PF0-3: Not PWM
5252
// PF4-5: TCB
5353

54-
#define pinToUse PIN_PF5
54+
#if defined(PIN_PF5)
55+
#define pinToUse PIN_PF5
56+
#else
57+
#define pinToUse PIN_PC0
58+
#endif
5559

5660
//creates pwm instance
5761
Dx_PWM* PWM_Instance;

examples/PWM_Multi/PWM_Multi.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@
5050
// PF0-3: Not PWM
5151
// PF4-5: TCB
5252

53-
// Be careful to select pins for different frequencies
54-
uint32_t PWM_Pins[] = { PIN_PB2, PIN_PC0, PIN_PF4, PIN_PF5 };
53+
#if defined(PIN_PF5)
54+
// Be careful to select pins for different frequencies
55+
uint32_t PWM_Pins[] = { PIN_PC0, PIN_PF4, PIN_PF5 };
56+
#else
57+
// Be careful to select pins for different frequencies
58+
uint32_t PWM_Pins[] = { PIN_PC0 };
59+
#endif
5560

5661
float frequency[] = { 2000.0f, 3000.0f, 4000.0f, 8000.0f };
5762
float dutyCycle[] = { 20.0f, 30.0f, 40.0f, 80.0f };

examples/PWM_MultiChannel/PWM_MultiChannel.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@
5050
// PF0-3: Not PWM
5151
// PF4-5: TCB
5252

53-
// Be careful to select pins for different frequencies
54-
uint32_t PWM_Pins[] = { PIN_PB2, PIN_PC0, PIN_PF4, PIN_PF5 };
53+
#if defined(PIN_PF5)
54+
// Be careful to select pins for different frequencies
55+
uint32_t PWM_Pins[] = { PIN_PC0, PIN_PF4, PIN_PF5 };
56+
#else
57+
// Be careful to select pins for different frequencies
58+
uint32_t PWM_Pins[] = { PIN_PC0 };
59+
#endif
5560

5661
float dutyCycle[] = { 20.0f, 30.0f, 40.0f, 80.0f };
5762

examples/PWM_Waveform/PWM_Waveform.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
// PF0-3: Not PWM
5252
// PF4-5: TCB
5353

54-
#define pinToUse PIN_PF5
54+
#if defined(PIN_PF5)
55+
#define pinToUse PIN_PF5
56+
#else
57+
#define pinToUse PIN_PC0
58+
#endif
5559

5660
//creates pwm instance
5761
Dx_PWM* PWM_Instance;

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Dx_PWM",
33
"version": "1.0.0",
44
"keywords": "timing, device, control, timer, pwm, pwm-driver, pwm-frequency, dynamic-pwm, duty-cycle, hardware-based-pwm, multi-channel-pwm, waveform-generator, mission-critical, accuracy, non-blocking, megaavr, avr-da, avr-db, avr-dd, dxcore, avr128dx, avr64dx, avr32dx, megatinycore, dx-timerinterrupt, tcb-timers",
5-
"description": "This library enables you to use Hardware-based PWM channels on Arduino AVRDx-based boards (AVR128Dx, AVR64Dx, AVR32Dx, etc.), using DxCore, to create and output PWM. The most important feature is they're purely hardware-based PWM channels, supporting very high PWM frequencies. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks. These hardware-based PWMs, still work even if other software functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software-based PWM using ISR, millis() or micros(). That's necessary if you need to control devices requiring high precision. New efficient setPWM_manual function to facilitate waveform creation using PWM.",
5+
"description": "This library enables you to use Hardware-based PWM channels on Arduino AVRDx-based boards (AVR128Dx, AVR64Dx, AVR32Dx, etc.), using DxCore, to create and output PWM. The most important feature is they're purely hardware-based PWM channels, supporting very high PWM frequencies. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks. These hardware-based PWMs, still work even if other software functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software-based PWM using ISR, millis() or micros(). That's necessary if you need to control devices requiring high precision. New efficient setPWM_manual function to facilitate waveform creation using PWM. Now supporting AVRDD and DxCore v1.5.1",
66
"authors":
77
{
88
"name": "Khoi Hoang",

0 commit comments

Comments
 (0)