Schupp icon

Transparent cache

Schupp | PRO | 11/12/23 06:57:49 AM UTC | 0 ⭐ | 11305 👁️ | Never ⏰ | []
Arduino |

900 B

|

None

|

0 👍

/

0 👎

const esp_partition_t* part;
spi_flash_mmap_handle_t handle;
void* data;
esp_err_t err;
 
void setup() {
part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, "storage");
esp_partition_find(ESP_PARTITION_TYPE_DATA,ESP_PARTITION_SUBTYPE_ANY, "storage");
err = esp_partition_mmap(part, 0, part->size, SPI_FLASH_MMAP_DATA, (const void**)&data, &handle);
  
if (err != ESP_OK)
  {
    printf("esp_partition_mmap failed. (%d)\n", err);
    //delay(10000);
    abort();
  }
//Example for Display data without overhead:
vspi->beginTransaction(SPISettings(spiClk, MSBFIRST, SPI_MODE0));
digitalWrite(5, LOW); //pull SS slow to prep other end for transfer
unsigned long offset=0;
//Access Partition on StartByte 0, sending Bytes directly to SPI Display
vspi->writeBytes((uint8_t*)data + offset, width*height * 3);
digitalWrite(5, HIGH); //pull ss high 
}
}
 
void loop(){
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎