raspberrypi: Allow build without audio
Signed-off-by: Daniel Schaefer <dhs@frame.work>
This commit is contained in:
parent
75ba17e84e
commit
3c66a55341
@ -99,11 +99,15 @@ void port_internal_flash_flush(void) {
|
|||||||
// Make sure we don't have an interrupt while we do flash operations.
|
// Make sure we don't have an interrupt while we do flash operations.
|
||||||
common_hal_mcu_disable_interrupts();
|
common_hal_mcu_disable_interrupts();
|
||||||
// and audio DMA must be paused as well
|
// and audio DMA must be paused as well
|
||||||
|
#if CIRCUITPY_AUDIOCORE
|
||||||
uint32_t channel_mask = audio_dma_pause_all();
|
uint32_t channel_mask = audio_dma_pause_all();
|
||||||
|
#endif
|
||||||
flash_range_erase(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, SECTOR_SIZE);
|
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);
|
flash_range_program(CIRCUITPY_CIRCUITPY_DRIVE_START_ADDR + _cache_lba, _cache, SECTOR_SIZE);
|
||||||
_cache_lba = NO_CACHE;
|
_cache_lba = NO_CACHE;
|
||||||
|
#if CIRCUITPY_AUDIOCORE
|
||||||
audio_dma_unpause_mask(channel_mask);
|
audio_dma_unpause_mask(channel_mask);
|
||||||
|
#endif
|
||||||
common_hal_mcu_enable_interrupts();
|
common_hal_mcu_enable_interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user