esp-idf/components/driver/include/driver
Ivan Grokhotkov 512898edee sdmmc: fix reads/writes to/from unaligned buffers
SDMMC hardware treats all buffers as aligned, and ignores 2 LSBs of
addresses written into DMA descriptors. Previously SDMMC host driver
assumed that data buffers passed from SDDMC command layer would be
aligned. However alignment checks were never implemented in the command
layer, as were the checks that the buffer coming from the application
would be in DMA capable memory. Most of the time this was indeed true.
However in some cases FATFS library can pass buffers offset by 2 bytes
from word boundary. “DMA capable” restriction may be broken if pSRAM
support is used.

This change adds buffer checks to the SDMMC host driver (alignment and
DMA capability), so that the host layer will error out for incompatible
buffers. In SDMMC command layer, a check is added to read and write
functions. If an incompatible buffer is passed from the application, new
buffer (512 bytes size) is allocated, and the transfer is performed
using {READ,WRITE}_SINGLE_BLOCK commands.
2017-08-01 03:15:11 +08:00
..
adc.h examples: add ULP ADC example 2017-05-16 13:15:02 +08:00
dac.h docs: Generate Doxygen directives for API documentation 2017-05-19 18:26:02 +02:00
gpio.h [TW#13322] Typo in documentation, fixes #694 2017-06-19 22:42:22 +02:00
i2c.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
i2s.h Driver update: I2S pdm and built-in DAC 2017-05-12 16:21:02 +08:00
ledc.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
mcpwm.h feature: add Motor Control PWM(mcpwm) driver 2017-05-12 15:47:59 +08:00
pcnt.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
periph_ctrl.h Add SPI Master driver, example, test and docs 2017-01-06 14:20:32 +08:00
rmt.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
rtc_cntl.h driver/rtc: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +08:00
rtc_io.h driver/rtc: add APIs to enable/disable hold function 2017-03-24 10:11:13 +08:00
sdmmc_defs.h sdmmc: add support for SPI protocol commands 2017-07-20 13:34:21 +08:00
sdmmc_host.h sdmmc: fix reads/writes to/from unaligned buffers 2017-08-01 03:15:11 +08:00
sdmmc_types.h sdmmc: fix probing clock frequency 2017-07-20 13:34:21 +08:00
sdspi_host.h driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
sigmadelta.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
spi_common.h docs: Generate Doxygen directives for API documentation 2017-05-19 18:26:02 +02:00
spi_master.h spi_master: fix duplicate bit mask for SPI_TRANS_MODE_DIOQIO_ADDR 2017-07-20 13:34:21 +08:00
spi_slave.h Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
timer.h components/driver: 'const' all config calls. 2017-04-13 18:33:33 +01:00
touch_pad.h fix(touch_pad): modify touch pad read function and touch_pad_deinit 2017-03-11 11:42:44 +08:00
uart.h bugfix(uart): fix bugs reported from github 2017-06-27 16:41:59 +08:00