Merge pull request #2136 from dhalbert/filesystem-tick-status-fixes
fix atmel-samd filesystem_tick'ing; clear_temp_status() should check for status indicator in use
This commit is contained in:
commit
9d95cc7ef9
|
@ -29,6 +29,7 @@
|
|||
#include "peripheral_clk_config.h"
|
||||
|
||||
#include "supervisor/shared/autoreload.h"
|
||||
#include "supervisor/filesystem.h"
|
||||
#include "shared-bindings/microcontroller/__init__.h"
|
||||
#include "shared-bindings/microcontroller/Processor.h"
|
||||
|
||||
|
@ -52,6 +53,9 @@ void SysTick_Handler(void) {
|
|||
(void) SysTick->CTRL;
|
||||
common_hal_mcu_enable_interrupts();
|
||||
|
||||
#if CIRCUITPY_FILESYSTEM_FLUSH_INTERVAL_MS > 0
|
||||
filesystem_tick();
|
||||
#endif
|
||||
#ifdef CIRCUITPY_AUTORELOAD_DELAY_MS
|
||||
autoreload_tick();
|
||||
#endif
|
||||
|
|
|
@ -428,6 +428,7 @@ static bool flush_ram_cache(bool keep_cache) {
|
|||
}
|
||||
|
||||
// Delegates to the correct flash flush method depending on the existing cache.
|
||||
// TODO Don't blink the status indicator if we don't actually do any writing (hard to tell right now).
|
||||
static void spi_flash_flush_keep_cache(bool keep_cache) {
|
||||
#ifdef MICROPY_HW_LED_MSC
|
||||
port_pin_set_output_level(MICROPY_HW_LED_MSC, true);
|
||||
|
|
|
@ -266,9 +266,15 @@ void temp_status_color(uint32_t rgb) {
|
|||
|
||||
void clear_temp_status() {
|
||||
#ifdef MICROPY_HW_NEOPIXEL
|
||||
if (neopixel_in_use) {
|
||||
return;
|
||||
}
|
||||
common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3);
|
||||
#endif
|
||||
#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
|
||||
if (apa102_mosi_in_use || apa102_sck_in_use) {
|
||||
return;
|
||||
}
|
||||
#if CIRCUITPY_BITBANG_APA102
|
||||
shared_module_bitbangio_spi_write(&status_apa102, status_apa102_color, APA102_BUFFER_LENGTH);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue