Skip to content

Commit 070a74d

Browse files
committed
IDF logging support for ESP32
1 parent 6ae42ff commit 070a74d

36 files changed

+107
-51
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ if (DEFINED ESP_PLATFORM)
44

55
# idf component
66
idf_component_register(
7-
SRC_DIRS src/Utils src/Driver/ac101 src/Driver/cs42448 src/Driver/es7243 src/Driver/es8156 src/Driver/es8374 src/Driver/pcm3168 src/Driver/wm8960 src/Driver/wm8994 src/Driver/cs43l22 src/Driver/es7210 src/Driver/es7243e src/Driver/es8311 src/Driver/es8388 src/Driver/tas5805m src/Driver/wm8978
7+
SRC_DIRS src/Platforms src/Driver/ac101 src/Driver/cs42448 src/Driver/es7243 src/Driver/es8156 src/Driver/es8374 src/Driver/pcm3168 src/Driver/wm8960 src/Driver/wm8994 src/Driver/cs43l22 src/Driver/es7210 src/Driver/es7243e src/Driver/es8311 src/Driver/es8388 src/Driver/tas5805m src/Driver/wm8978
88
INCLUDE_DIRS src
99
REQUIRES hal driver
1010
)
1111
# activate ESP32 I2C
12-
add_compile_definitions(ESP32_CMAKE)
12+
add_compile_definitions(ESP32 ESP32_CMAKE)
1313
add_compile_options(-Wno-unused-variable)
1414

1515
else()

src/AudioDriverConfig.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,13 @@
3939
# define FORCE_WIRE_CLOSE false
4040
#endif
4141

42+
/// Activate / Deactivate Logging: set to true or false
43+
#ifndef AUDIO_DRIVER_LOGGIN_ACTVIE
44+
# define AUDIO_DRIVER_LOGGIN_ACTVIE false
45+
#endif
46+
47+
/// Use IDF Logger: by default we use it if ESP32 outside of ARDUINO
48+
#if !defined(AUDIO_DRIVER_LOGGING_IDF) && defined(ESP32_CMAKE)
49+
# define AUDIO_DRIVER_LOGGING_IDF
50+
#endif
51+

src/Driver/ac101/ac101.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "stdbool.h"
66
#include "DriverCommon.h"
7-
#include "Utils/API_I2C.h"
7+
#include "Platforms/API_I2C.h"
88
#include "Driver/DriverConstants.h"
99

1010
#define I2C_MASTER_WRITE 0

src/Driver/cs42448/cs42448.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#pragma once
2727
#include "Driver/DriverConstants.h"
2828
#include "DriverCommon.h"
29-
#include "Utils/API_I2C.h"
29+
#include "Platforms/API_I2C.h"
3030

3131
/*
3232
* Definitions for Audio registers for CS42448

src/Driver/cs43l22/cs43l22.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include <stdint.h>
4242
#include "stdbool.h"
4343
#include "DriverCommon.h"
44-
#include "Utils/API_I2C.h"
44+
#include "Platforms/API_I2C.h"
4545
#include "Driver/DriverConstants.h"
4646

4747
/** @addtogroup Component

src/Driver/es7210/es7210.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include "stdbool.h"
2828
#include "DriverCommon.h"
29-
#include "Utils/API_I2C.h"
29+
#include "Platforms/API_I2C.h"
3030
#include "Driver/DriverConstants.h"
3131

3232
#ifdef __cplusplus

src/Driver/es7243/es7243.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#include <string.h>
3030

31-
#include "Utils/etc.h"
31+
#include "Platforms/etc.h"
3232

3333
#define MCLK_PULSES_NUMBER (20)
3434
#define ES_ASSERT(a, format, b, ...) \

src/Driver/es7243/es7243.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "stdbool.h"
2929
#include "DriverCommon.h"
30-
#include "Utils/API_I2C.h"
30+
#include "Platforms/API_I2C.h"
3131
#include "Driver/DriverConstants.h"
3232

3333
#ifdef __cplusplus

src/Driver/es7243e/es7243e.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include "stdbool.h"
2929
#include "DriverCommon.h"
30-
#include "Utils/API_I2C.h"
30+
#include "Platforms/API_I2C.h"
3131
#include "Driver/DriverConstants.h"
3232

3333
#ifdef __cplusplus

src/Driver/es8156/es8156.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "stdbool.h"
2727
#include "DriverCommon.h"
28-
#include "Utils/API_I2C.h"
28+
#include "Platforms/API_I2C.h"
2929
#include "Driver/DriverConstants.h"
3030

3131
#ifdef __cplusplus

0 commit comments

Comments
 (0)