mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
arch/arm: fix DMA transfers with sizes smaller than 4 bytes.
When the buffer to send has a size not multiple of 4 bytes, 4-byte words are sent correctly, but when the code reaches the section to send the remaining bytes (1, 2 or 3) it was taking the remaining byte count as origin of the copy, instead of the buffer (as it should). This commit fixes it to correctly copy from the buffer pointer. Signed-off-by: Carlos Sanchez <carlossanchez@geotab.com>
This commit is contained in:
parent
21def97623
commit
5feb1c4b8b
4 changed files with 4 additions and 4 deletions
|
|
@ -1087,7 +1087,7 @@ static void stm32_sendfifo(struct stm32_dev_s *priv)
|
|||
* padding with zero as necessary to extend to a full word.
|
||||
*/
|
||||
|
||||
uint8_t *ptr = (uint8_t *)priv->remaining;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
data.w = 0;
|
||||
|
|
|
|||
|
|
@ -1313,7 +1313,7 @@ static void stm32_sendfifo(struct stm32_dev_s *priv)
|
|||
* padding with zero as necessary to extend to a full word.
|
||||
*/
|
||||
|
||||
uint8_t *ptr = (uint8_t *)priv->remaining;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
data.w = 0;
|
||||
|
|
|
|||
|
|
@ -1232,7 +1232,7 @@ static void stm32_sendfifo(struct stm32_dev_s *priv)
|
|||
* padding with zero as necessary to extend to a full word.
|
||||
*/
|
||||
|
||||
uint8_t *ptr = (uint8_t *)priv->remaining;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
data.w = 0;
|
||||
|
|
|
|||
|
|
@ -1177,7 +1177,7 @@ static void stm32_sendfifo(struct stm32_dev_s *priv)
|
|||
* padding with zero as necessary to extend to a full word.
|
||||
*/
|
||||
|
||||
uint8_t *ptr = (uint8_t *)priv->remaining;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
data.w = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue