]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/edma3_lld.git/commitdiff
Merge pull request #18 in PROCESSOR-SDK/edma3_lld from edma_fix_v2_PRSDK-3197 to...
authorRaghu Nambiath <a0850439@ti.com>
Wed, 6 Dec 2017 21:58:18 +0000 (15:58 -0600)
committerRaghu Nambiath <a0850439@ti.com>
Wed, 6 Dec 2017 21:58:18 +0000 (15:58 -0600)
* commit 'f1d26105b93684104b9d7df51080e4abbf0fd85d':
  fixed based on review comments (PRSDK-3197)
  modified endian check based on gcc and ti compiler (PRSDK-3197)

packages/ti/sdo/edma3/drv/edma3_drv.h
packages/ti/sdo/edma3/rm/edma3_rm.h

index becc961d28b381e4099378958cf886cbf12f2104..2c77bf8f2211657403fcd5e8252f35e5c0277807 100755 (executable)
@@ -2194,7 +2194,7 @@ typedef struct  {
  * This is a mapping of the EDMA3 PaRAM set provided to the user
  * for ease of modification of the individual fields
  */
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if defined(EDMA_MODE_LITTLE_ENDIAN)
 /* LITTLE_ENDIAN_MODE */
 typedef struct  {
         /** OPT field of PaRAM Set */
@@ -2350,7 +2350,7 @@ typedef struct  {
          */
         volatile uint16_t cCnt;
 } EDMA3_DRV_PaRAMRegs;
-#endif         /* #if _BYTE_ORDER == _LITTLE_ENDIAN */
+#endif
 
 /**
  * \brief Event queue priorities setup
index b0fca333a1d944f19bf7f477891688d3974d3c58..e38eb18ce61a6a458f0dcc5eed3da9c280e002a8 100755 (executable)
@@ -1503,13 +1503,27 @@ typedef struct  {
     volatile uint32_t CCNT;
 } EDMA3_RM_ParamentryRegs;
 
+#if defined(__GNUC__) && !defined(__ti__)
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define EDMA_MODE_LITTLE_ENDIAN   1
+#else
+#define EDMA_MODE_BIG_ENDIAN      1
+#endif
+#else
+#ifndef _BIG_ENDIAN
+#define EDMA_MODE_LITTLE_ENDIAN   1
+#else
+#define EDMA_MODE_BIG_ENDIAN      1
+#endif
+#endif
+
 /**\struct      EDMA3_RM_PaRAMRegs
  * \brief       EDMA3 PaRAM Set in User Configurable format
  *
  * This is a mapping of the EDMA3 PaRAM set provided to the user
  * for ease of modification of the individual fields.
  */
-#if _BYTE_ORDER == _LITTLE_ENDIAN
+#if defined(EDMA_MODE_LITTLE_ENDIAN)
 /* LITTLE_ENDIAN_MODE */
 typedef struct  {
         /** OPT field of PaRAM Set */
@@ -1665,7 +1679,7 @@ typedef struct  {
          */
         volatile uint16_t cCnt;
 } EDMA3_RM_PaRAMRegs;
-#endif         /* #if _BYTE_ORDER == _LITTLE_ENDIAN */
+#endif         /* #if defined(__GNUC__) && !defined(__ti__) */
 
 /**
 @}