Skip to content

Commit

Permalink
Modification in DacESP32.h for newer ESP32 framework versions
Browse files Browse the repository at this point in the history
  • Loading branch information
yellobyte committed Sep 15, 2022
1 parent 872e491 commit 589d911
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ To use this library, open the **Library Manager** in your **Arduino IDE**. Go to
In **VSCode/PlatformIO** click the **platformio sidebar icon**, open the **libraries** view and search for DacESP32 and click on **Add to Project**.
All examples were build & tested with ArduinoIDE V1.8.19 and VSCode/PlatformIO (Core 6.0.x/Home 3.4.x).
All examples were build & tested with ArduinoIDE V1.8.19 and VSCode/PlatformIO (Core 6.0.x/Home 3.4.x).
**ATTENTION:**
Older Espressif ESP32 framework versions (<=1.0.6 on ArduinoIDE resp. <=3.3.0 on PlatformIO) have some needed type definitions missing. So in case you get build errors like '_definition for dac_cw_scale_t missing_' or '_definition for dac_cw_phase_t missing_' please uncomment line '#define DACESP32_TYPE_DEFS' in DacESP32.h".
### :hammer_and_wrench: Modifiable definitions in DacESP32.cpp
Expand Down Expand Up @@ -83,6 +86,6 @@ Folder [**Doc**](https://github.com/yellobyte/DacESP32/tree/main/doc) contains a
## :relaxed: Postscript
If you run into trouble with this lib or have suggestions how to improve it, feel free to contact me.
If you run into trouble with this lib or have suggestions how to improve it, feel free to contact me.
And a last remark: Putting this library together took quite long hours and a lot of coffee. So if you like it, please give it a star. Thanks !
And a last remark: Putting this library together took quite long hours and a lot of coffee. So if you like it, please give it a star. Thanks !
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DacESP32",
"version": "1.0.9",
"version": "1.0.10",
"platforms":
[
"espressif32"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DacESP32
version=1.0.9
version=1.0.10
author=Thomas Jentzsch
maintainer=Thomas Jentzsch <[email protected]>
sentence=Arduino library for using the ESP32 DAC output channels fast and easy.
Expand Down
10 changes: 6 additions & 4 deletions src/DacESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@
// According to spec approximately 8MHz.
#define CK8M 8000000UL

// Some typedefs missing in latest Arduino IDEs espressif32 framework V1.0.6
// (version depending ?) but provided in all recent PlatformIOs espressif32
// frameworks (3.4.0 to 4.4.0).
#ifndef PLATFORMIO
// Type definitions needed only for older Espressif ESP32 framework versions:
// <=1.0.6 on ArduinoIDE resp. <=3.3.0 on PlatformIO
// All newer framework versions provide these definitions in dac_types.h.

//#define DACESP32_TYPE_DEFS
#ifdef DACESP32_TYPE_DEFS
typedef enum {
DAC_CW_SCALE_1 = 0x0, // 1/1 (default)
DAC_CW_SCALE_2 = 0x1, // 1/2
Expand Down

0 comments on commit 589d911

Please sign in to comment.