Skip to content

Commit 2a2f94d

Browse files
committed
Update tinyusb for zero support
1 parent 48d826b commit 2a2f94d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

lib/tinyusb

Submodule tinyusb updated 156 files

ports/broadcom/common-hal/neopixel_write/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
4949
}
5050

5151
BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT;
52-
uint8_t index;
52+
uint8_t index = 0;
5353
uint8_t channel = 0;
5454
bool found = false;
5555
for (size_t i = 0; i < NUM_ALT_FUNC; i++) {

ports/broadcom/common-hal/sdioio/SDCard.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "supervisor/port.h"
3838
#include "supervisor/shared/translate.h"
3939

40+
#include "peripherals/broadcom/cpu.h"
4041
#include "peripherals/broadcom/defines.h"
4142
#include "peripherals/broadcom/gpio.h"
4243

@@ -256,6 +257,8 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
256257
GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN;
257258
}
258259

260+
COMPLETE_MEMORY_READS;
261+
259262
self->host_info = (sdmmc_host_t) {
260263
.flags = SDMMC_HOST_FLAG_1BIT | SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_DEINIT_ARG,
261264
.slot = 0,
@@ -301,6 +304,7 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
301304
self->init = err == SDMMC_OK;
302305

303306
self->capacity = self->card_info.csd.capacity;
307+
COMPLETE_MEMORY_READS;
304308
}
305309

306310
uint32_t common_hal_sdioio_sdcard_get_count(sdioio_sdcard_obj_t *self) {
@@ -328,9 +332,10 @@ int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t sta
328332
check_whole_block(bufinfo);
329333
self->state_programming = true;
330334

335+
COMPLETE_MEMORY_READS;
331336
sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf,
332337
start_block, bufinfo->len / 512);
333-
338+
COMPLETE_MEMORY_READS;
334339

335340
if (error != SDMMC_OK) {
336341
mp_printf(&mp_plat_print, "write sectors result %d\n", error);
@@ -345,8 +350,10 @@ int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t star
345350
return -EIO;
346351
}
347352
check_whole_block(bufinfo);
353+
COMPLETE_MEMORY_READS;
348354
sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf,
349355
start_block, bufinfo->len / 512);
356+
COMPLETE_MEMORY_READS;
350357

351358
if (error != SDMMC_OK) {
352359
mp_printf(&mp_plat_print, "read sectors result %d when reading block %d for %d\n", error, start_block, bufinfo->len / 512);

0 commit comments

Comments
 (0)