Update tinyusb for zero support

This commit is contained in:
Scott Shawcroft 2022-01-06 08:52:33 -08:00
parent 48d826b15d
commit 2a2f94df15
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
4 changed files with 11 additions and 4 deletions

@ -1 +1 @@
Subproject commit ae73873b5cba0eb11c89165f4559964940430d44 Subproject commit 3b09b82123a50bef6b18cf90c2734ae7581da4a3

View File

@ -49,7 +49,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
} }
BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT; BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT;
uint8_t index; uint8_t index = 0;
uint8_t channel = 0; uint8_t channel = 0;
bool found = false; bool found = false;
for (size_t i = 0; i < NUM_ALT_FUNC; i++) { for (size_t i = 0; i < NUM_ALT_FUNC; i++) {

View File

@ -37,6 +37,7 @@
#include "supervisor/port.h" #include "supervisor/port.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
#include "peripherals/broadcom/cpu.h"
#include "peripherals/broadcom/defines.h" #include "peripherals/broadcom/defines.h"
#include "peripherals/broadcom/gpio.h" #include "peripherals/broadcom/gpio.h"
@ -256,6 +257,8 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN; GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN;
} }
COMPLETE_MEMORY_READS;
self->host_info = (sdmmc_host_t) { self->host_info = (sdmmc_host_t) {
.flags = SDMMC_HOST_FLAG_1BIT | SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_DEINIT_ARG, .flags = SDMMC_HOST_FLAG_1BIT | SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_DEINIT_ARG,
.slot = 0, .slot = 0,
@ -301,6 +304,7 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self,
self->init = err == SDMMC_OK; self->init = err == SDMMC_OK;
self->capacity = self->card_info.csd.capacity; self->capacity = self->card_info.csd.capacity;
COMPLETE_MEMORY_READS;
} }
uint32_t common_hal_sdioio_sdcard_get_count(sdioio_sdcard_obj_t *self) { 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
check_whole_block(bufinfo); check_whole_block(bufinfo);
self->state_programming = true; self->state_programming = true;
COMPLETE_MEMORY_READS;
sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf, sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf,
start_block, bufinfo->len / 512); start_block, bufinfo->len / 512);
COMPLETE_MEMORY_READS;
if (error != SDMMC_OK) { if (error != SDMMC_OK) {
mp_printf(&mp_plat_print, "write sectors result %d\n", error); 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
return -EIO; return -EIO;
} }
check_whole_block(bufinfo); check_whole_block(bufinfo);
COMPLETE_MEMORY_READS;
sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf, sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf,
start_block, bufinfo->len / 512); start_block, bufinfo->len / 512);
COMPLETE_MEMORY_READS;
if (error != SDMMC_OK) { if (error != SDMMC_OK) {
mp_printf(&mp_plat_print, "read sectors result %d when reading block %d for %d\n", error, start_block, bufinfo->len / 512); mp_printf(&mp_plat_print, "read sectors result %d when reading block %d for %d\n", error, start_block, bufinfo->len / 512);

@ -1 +1 @@
Subproject commit 24578e029babb1a01ef8641ca6019f1a86992ff4 Subproject commit 08370086080759ed54ac1136d62d2ad24c6fa267