Merge pull request #8271 from FrameworkComputer/rp2040-no-audio
raspberrypi: Allow build without audio
This commit is contained in:
commit
7432bbce65
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue