Comments (3)
I don't know how to use SPI without DMA.
You can probably find out by asking here.
https://github.com/espressif/esp-idf/issues
from esp-idf-ili9340.
I guess, it is because we cannot use SPI without DMA for transferring more than 64 Bytes in one session according to the docs.
I'll change it and figure out how to fix this.
from esp-idf-ili9340.
I rewrote transfer function to this and fixed it.
bool spi_master_write_byte(spi_device_handle_t SPIHandle, const uint8_t* Data, size_t DataLength)
{
spi_transaction_t SPITransaction;
esp_err_t ret;
// if ( DataLength > 0 ) {
// memset( &SPITransaction, 0, sizeof( spi_transaction_t ) );
// SPITransaction.length = DataLength * 8;
// SPITransaction.tx_buffer = Data;
// #if 1
// ret = spi_device_transmit( SPIHandle, &SPITransaction );
// #endif
// #if 0
// ret = spi_device_polling_transmit( SPIHandle, &SPITransaction );
// #endif
// assert(ret==ESP_OK);
// }
if ( DataLength > 0 ) {
memset( &SPITransaction, 0, sizeof( spi_transaction_t ) );
uint32_t Count = 0;
for (; DataLength / SOC_SPI_MAXIMUM_BUFFER_SIZE != 0; Count++, DataLength -= SOC_SPI_MAXIMUM_BUFFER_SIZE)
{
SPITransaction.length = SOC_SPI_MAXIMUM_BUFFER_SIZE * 8;
SPITransaction.tx_buffer = &Data[Count * SOC_SPI_MAXIMUM_BUFFER_SIZE];
ret = spi_device_transmit( SPIHandle, &SPITransaction );
assert(ret==ESP_OK);
}
if (DataLength % SOC_SPI_MAXIMUM_BUFFER_SIZE != 0)
{
SPITransaction.length = (DataLength % SOC_SPI_MAXIMUM_BUFFER_SIZE) * 8;
SPITransaction.tx_buffer = &Data[Count * SOC_SPI_MAXIMUM_BUFFER_SIZE];
ret = spi_device_transmit( SPIHandle, &SPITransaction );
assert(ret==ESP_OK);
}
}
return true;
}
from esp-idf-ili9340.
Related Issues (20)
- IMAGE
- IMAGE
- IMAGE
- IMAGE
- IMAGE
- IMAGE HOT 4
- License HOT 2
- IMAGE HOT 3
- Guide how to use as esp-idf component HOT 7
- IMAGE HOT 1
- IMAGE HOT 35
- Use this library with platformio HOT 4
- Cant display ascii>127 HOT 6
- Often crashing on lcdDrawFillRect HOT 13
- xpt2046 issue HOT 44
- About coordinate systems
- A question. HOT 3
- Slow loading speed HOT 8
- display is mirrored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-ili9340.