[rtems commit] bsp/atsam: Fix QSPI driver API
Sebastian Huber
sebh at rtems.org
Wed Jun 22 14:10:27 UTC 2016
Module: rtems
Branch: master
Commit: 0fddefe65b605e4d09d88c7036a323c133f87038
Changeset: http://git.rtems.org/rtems/commit/?id=0fddefe65b605e4d09d88c7036a323c133f87038
Author: Alexander Krutwig <alexander.krutwig at embedded-brains.de>
Date: Wed Jun 8 09:55:53 2016 +0200
bsp/atsam: Fix QSPI driver API
We support read/write of arbitrary buffers.
---
c/src/lib/libbsp/arm/atsam/libraries/libchip/include/qspi.h | 4 ++--
c/src/lib/libbsp/arm/atsam/libraries/libchip/source/qspi.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/c/src/lib/libbsp/arm/atsam/libraries/libchip/include/qspi.h b/c/src/lib/libbsp/arm/atsam/libraries/libchip/include/qspi.h
index 710baa7..c1f81f6 100644
--- a/c/src/lib/libbsp/arm/atsam/libraries/libchip/include/qspi.h
+++ b/c/src/lib/libbsp/arm/atsam/libraries/libchip/include/qspi.h
@@ -141,8 +141,8 @@ typedef struct {
typedef struct {
uint32_t TxDataSize; /* Tx buffer size */
uint32_t RxDataSize; /* Rx buffer size */
- uint32_t *pDataTx; /* Tx buffer */
- uint32_t *pDataRx; /* Rx buffer */
+ const void *pDataTx; /* Tx buffer */
+ void *pDataRx; /* Rx buffer */
} QspiBuffer_t;
diff --git a/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/qspi.c b/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/qspi.c
index 367789f..fd9de3a 100644
--- a/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/qspi.c
+++ b/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/qspi.c
@@ -744,7 +744,7 @@ QspidStatus_t QSPI_ReadWriteMem(Qspid_t *pQspid, Access_t const ReadWrite)
{
QspidStatus_t Status = QSPI_UNKNOWN_ERROR;
QspiInstFrame_t *const pFrame = pQspid->pQspiFrame;
- uint32_t *pQspiMem = (uint32_t *)(QSPIMEM_ADDR | pFrame->Addr);
+ void *pQspiMem = (void *)(QSPIMEM_ADDR | pFrame->Addr);
QspiBuffer_t pBuffer = pQspid->qspiBuffer;
assert(((ReadWrite > CmdAccess)
More information about the vc
mailing list