Init directly

This commit is contained in:
Scott Shawcroft 2020-08-11 11:19:40 -07:00
parent 87c78be8f4
commit 8488b31aa0
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA

View File

@ -46,13 +46,12 @@ STATIC const esp_partition_t * _partition;
// TODO: Split the caching out of supervisor/shared/external_flash so we can use it. // TODO: Split the caching out of supervisor/shared/external_flash so we can use it.
#define SECTOR_SIZE 4096 #define SECTOR_SIZE 4096
STATIC uint8_t _cache[SECTOR_SIZE]; STATIC uint8_t _cache[SECTOR_SIZE];
STATIC uint32_t _cache_lba; STATIC uint32_t _cache_lba = 0xffffffff;
void supervisor_flash_init(void) { void supervisor_flash_init(void) {
_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, _partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA,
ESP_PARTITION_SUBTYPE_DATA_FAT, ESP_PARTITION_SUBTYPE_DATA_FAT,
NULL); NULL);
_cache_lba = 0xffffffff;
} }
uint32_t supervisor_flash_get_block_size(void) { uint32_t supervisor_flash_get_block_size(void) {