Skip to content

Commit

Permalink
RP2040 mck_mult
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Oct 25, 2023
1 parent 56f97c5 commit e9d6580
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AudioI2S/I2SConfigStd.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ class I2SConfigStd : public AudioInfo {
int buffer_count = I2S_BUFFER_COUNT;
int buffer_size = I2S_BUFFER_SIZE;

#if defined(RP2040_HOWER)
/// materclock multiplier for RP2040: must be multiple of 64
int mck_multiplier = 64;
#endif

#if defined(USE_ALT_PIN_SUPPORT)
bool is_arduino_pin_numbers = true;
#endif
Expand Down
1 change: 1 addition & 0 deletions src/AudioI2S/I2SRP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class I2SDriverRP2040 {
return false;
}
if (cfg.pin_mck != -1){
i2s.setMCLKmult(cfg.mck_multiplier);
if (!i2s.setMCLK(cfg.pin_mck)){
LOGE("Could not set data pin: %d", cfg.pin_mck);
return false;
Expand Down

0 comments on commit e9d6580

Please sign in to comment.