8000 Added CIRCUITPY_AUDIOBUSIO_PDMIN guard macros to allow code to build … · JetForMe/circuitpython@66c3ee8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 66c3ee8

Browse files
committed
Added CIRCUITPY_AUDIOBUSIO_PDMIN guard macros to allow code to build on boards that don't support PDMIn.
1 parent 7d9fb35 commit 66c3ee8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ports/espressif/common-hal/audiobusio/PDMIn.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818

1919

20+
#if CIRCUITPY_AUDIOBUSIO_PDMIN
2021

2122

2223

@@ -126,3 +127,5 @@ uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t *self)
126127
uint32_t common_hal_audiobusio_pdmin_get_sample_rate(audiobusio_pdmin_obj_t *self) {
127128
return self->sample_rate;
128129
}
130+
131+
#endif

ports/espressif/common-hal/audiobusio/PDMIn.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "common-hal/audiobusio/__init__.h"
1212
#include "common-hal/microcontroller/Pin.h"
1313

14+
#if CIRCUITPY_AUDIOBUSIO_PDMIN
1415

1516
typedef struct {
1617
i2s_t i2s;
@@ -20,3 +21,5 @@ typedef struct {
2021
uint32_t sample_rate;
2122
uint8_t bit_depth;
2223
} audiobusio_pdmin_obj_t;
24+
25+
#endif

0 commit comments

Comments
 (0)
0