Skip to content

Commit c8499a5

Browse files
committed
Support 32-bit pio pin mask.
1 parent c04489c commit c8499a5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ports/raspberrypi/common-hal/audiobusio/I2S.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ void common_hal_audiobusio_i2s_construct(audiobusio_i2s_obj_t *self,
7676
sample_rate * bits_per_sample * 16, // Frequency based on sample rate and bit width
7777
NULL, 0, // init
7878
NULL, 0, // may_exec
79-
data_out, 1, 0, 0xffffffff, // out pin
79+
data_out, 1, PIO_PINMASK32_NONE, PIO_PINMASK32_ALL, // out pin
8080
data_in, 1, // in pins
81-
0, 0, // in pulls
82-
NULL, 1, 0, 0, // set pins
83-
sideset_pin, 2, false, 0, 0x1f, // sideset pins
81+
PIO_PINMASK32_NONE, PIO_PINMASK32_NONE, // in pulls
82+
NULL, 1, PIO_PINMASK32_NONE, PIO_PINMASK32_NONE, // set pins
83+
sideset_pin, 2, false, PIO_PINMASK32_NONE, PIO_PINMASK32_FROM_VALUE(0x1f), // sideset pins
8484
false, // No sideset enable
8585
NULL, PULL_NONE, // jump pin
86-
0, // wait gpio pins
86+
PIO_PINMASK_NONE, // wait gpio pins
8787
true, // exclusive pin use
8888
false, 32, false, // out settings
8989
false, // Wait for txstall

ports/raspberrypi/common-hal/audiobusio/I2SIn.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,14 @@ void common_hal_audiobusio_i2sin_construct(audiobusio_i2sin_obj_t *self,
209209
sample_rate * bits_per_sample * 2 * 4, // Frequency based on sample rate and bit width
210210
NULL, 0, // init
211211
NULL, 0, // may_exec
212-
NULL, 1, 0, 0, // out pin
212+
NULL, 1, PIO_PINMASK32_NONE, PIO_PINMASK32_NONE, // out pin
213213
data, 1, // in pins
214-
0, 0, // in pulls
215-
NULL, 1, 0, 0, // set pins
216-
sideset_pin, 2, false, 0, 0x1f, // sideset pins
214+
PIO_PINMASK32_NONE, PIO_PINMASK32_NONE, // in pulls
215+
NULL, 1, PIO_PINMASK32_NONE, PIO_PINMASK32_NONE, // set pins
216+
sideset_pin, 2, false, PIO_PINMASK32_NONE, PIO_PINMASK32_FROM_VALUE(0x1f), // sideset pins
217217
false, // No sideset enable
218218
NULL, PULL_NONE, // jump pin
219-
0, // wait gpio pins
219+
PIO_PINMASK_NONE, // wait gpio pins
220220
true, // exclusive pin use
221221
false, 8, false, // out settings
222222
false, // Wait for txstall

0 commit comments

Comments
 (0)