Skip to content

Commit

Permalink
Merge pull request #8271 from FrameworkComputer/rp2040-no-audio
Browse files Browse the repository at this point in the history
raspberrypi: Allow build without audio
  • Loading branch information
dhalbert committed Aug 9, 2023
2 parents fb57c08 + 3c66a55 commit 7432bbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/raspberrypi/supervisor/internal_flash.c
Expand Up @@ -99,11 +99,15 @@ void port_internal_flash_flush(void) {
// Make sure we don't have an interrupt while we do flash operations.
common_hal_mcu_disable_interrupts();
// and audio DMA must be paused as well
#if CIRCUITPY_AUDIOCORE
uint32_t channel_mask = audio_dma_pause_all();
#endif
flash_range_erase(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, SECTOR_SIZE);
flash_range_program(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, _cache, SECTOR_SIZE);
_cache_lba = NO_CACHE;
#if CIRCUITPY_AUDIOCORE
audio_dma_unpause_mask(channel_mask);
#endif
common_hal_mcu_enable_interrupts();
}

Expand Down

0 comments on commit 7432bbc

Please sign in to comment.