Skip to content

Commit 3c66a55

Browse files
committed
raspberrypi: Allow build without audio
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 75ba17e commit 3c66a55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/raspberrypi/supervisor/internal_flash.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ void port_internal_flash_flush(void) {
9999
// Make sure we don't have an interrupt while we do flash operations.
100100
common_hal_mcu_disable_interrupts();
101101
// and audio DMA must be paused as well
102+
#if CIRCUITPY_AUDIOCORE
102103
uint32_t channel_mask = audio_dma_pause_all();
104+
#endif
103105
flash_range_erase(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, SECTOR_SIZE);
104106
flash_range_program(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, _cache, SECTOR_SIZE);
105107
_cache_lba = NO_CACHE;
108+
#if CIRCUITPY_AUDIOCORE
106109
audio_dma_unpause_mask(channel_mask);
110+
#endif
107111
common_hal_mcu_enable_interrupts();
108112
}
109113

0 commit comments

Comments
 (0)