Skip to content

Commit

Permalink
reviewing #1297 Use constant directly instead of number.
Browse files Browse the repository at this point in the history
  • Loading branch information
stc1988 authored and mkellner committed Jan 22, 2024
1 parent aa85473 commit 439ba91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/devices/esp32/targets/m5stack_cores3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"volume_divider": 1,
"i2s": {
"num": 1,
"slot": 1,
"slot": "I2S_STD_SLOT_LEFT",
"bitsPerSample": 16,
"bck_pin": 34,
"lr_pin": 33,
Expand Down
8 changes: 2 additions & 6 deletions modules/pins/i2s/audioout.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#endif
#endif
#ifndef MODDEF_AUDIOOUT_I2S_SLOT
#define MODDEF_AUDIOOUT_I2S_SLOT 0
#define MODDEF_AUDIOOUT_I2S_SLOT I2S_STD_SLOT_RIGHT
#endif
#endif

Expand Down Expand Up @@ -1512,11 +1512,7 @@ void audioOutLoop(void *pvParameter)
i2s_config.slot_cfg.slot_mask = I2S_STD_SLOT_BOTH;
#else
i2s_config.slot_cfg.slot_mode = I2S_SLOT_MODE_MONO;
#if MODDEF_AUDIOOUT_I2S_SLOT == 1
i2s_config.slot_cfg.slot_mask = I2S_STD_SLOT_LEFT;
#else
i2s_config.slot_cfg.slot_mask = I2S_STD_SLOT_RIGHT;
#endif
i2s_config.slot_cfg.slot_mask = MODDEF_AUDIOOUT_I2S_SLOT;;
#endif
i2s_config.slot_cfg.ws_pol = false;
i2s_config.slot_cfg.bit_shift = false;
Expand Down

0 comments on commit 439ba91

Please sign in to comment.