[PATCH 1/4] atsam_libraries: Introduction of void pointers
Alexander Krutwig
alexander.krutwig at embedded-brains.de
Thu Jun 16 13:48:44 UTC 2016
Makes bytewise read and write accesses possible
---
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..dc9b296 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)
--
1.8.4.5
More information about the devel
mailing list