diff mbox

[API-NEXT,PATCHv3] drv: byteorder: added bitfield order

Message ID 1471645471-18758-1-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard Aug. 19, 2016, 10:24 p.m. UTC
mostly to keep the symmetry with the API side

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 include/odp/drv/spec/byteorder.h                              |  3 +++
 platform/linux-generic/include/odp/drv/plat/byteorder_types.h | 10 +++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.7.4

Comments

Bill Fischofer Aug. 19, 2016, 10:34 p.m. UTC | #1
Third time's the charm...

On Fri, Aug 19, 2016 at 5:24 PM, Christophe Milard <
christophe.milard@linaro.org> wrote:

> mostly to keep the symmetry with the API side

>

> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

>  include/odp/drv/spec/byteorder.h                              |  3 +++

>  platform/linux-generic/include/odp/drv/plat/byteorder_types.h | 10

> +++++++---

>  2 files changed, 10 insertions(+), 3 deletions(-)

>

> diff --git a/include/odp/drv/spec/byteorder.h b/include/odp/drv/spec/

> byteorder.h

> index d3f5d7e..bf363f5 100644

> --- a/include/odp/drv/spec/byteorder.h

> +++ b/include/odp/drv/spec/byteorder.h

> @@ -38,6 +38,9 @@ extern "C" {

>   *

>   * @def ODPDRV_BYTE_ORDER

>   * Selected byte order

> + *

> + * @def ODPDRV_BITFIELD_ORDER

> + * Selected bitfield order

>   */

>

>  /**

> diff --git a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

> b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

> index cb7aec2..5dd182d 100644

> --- a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

> +++ b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

> @@ -49,12 +49,16 @@ extern "C" {

>         #define ODPDRV_LITTLE_ENDIAN           1

>         #define ODPDRV_BIG_ENDIAN              0

>         #define ODPDRV_BYTE_ORDER              ODPDRV_LITTLE_ENDIAN

> -       #define ODPDRV_LITTLE_ENDIAN_BITFIELD

> +       #define ODPDRV_LITTLE_ENDIAN_BITFIELD  1

> +       #define ODPDRV_BIG_ENDIAN_BITFIELD     0

> +       #define ODPDRV_BITFIELD_ORDER

> ODPDRV_LITTLE_ENDIAN_BITFIELD

>  #else

>         #define ODPDRV_LITTLE_ENDIAN           0

>         #define ODPDRV_BIG_ENDIAN              1

> -       #define ODPDRV_BYTE_ORDER              ODP_BIG_ENDIAN

> -       #define ODPDRV_BIG_ENDIAN_BITFIELD

> +       #define ODPDRV_BYTE_ORDER              ODPDRV_BIG_ENDIAN

> +       #define ODPDRV_LITTLE_ENDIAN_BITFIELD  0

> +       #define ODPDRV_BIG_ENDIAN_BITFIELD     1

> +       #define ODPDRV_BITFIELD_ORDER          ODPDRV_BIG_ENDIAN_BITFIELD

>  #endif

>

>  typedef uint16_t __odpdrv_bitwise      odpdrv_u16le_t;

> --

> 2.7.4

>

>
Maxim Uvarov Aug. 22, 2016, 2:21 p.m. UTC | #2
Merged,
Maxim.

On 08/20/16 01:34, Bill Fischofer wrote:
> Third time's the charm...

>

> On Fri, Aug 19, 2016 at 5:24 PM, Christophe Milard <

> christophe.milard@linaro.org> wrote:

>

>> mostly to keep the symmetry with the API side

>>

>> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

>>

> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>

>

>> ---

>>   include/odp/drv/spec/byteorder.h                              |  3 +++

>>   platform/linux-generic/include/odp/drv/plat/byteorder_types.h | 10

>> +++++++---

>>   2 files changed, 10 insertions(+), 3 deletions(-)

>>

>> diff --git a/include/odp/drv/spec/byteorder.h b/include/odp/drv/spec/

>> byteorder.h

>> index d3f5d7e..bf363f5 100644

>> --- a/include/odp/drv/spec/byteorder.h

>> +++ b/include/odp/drv/spec/byteorder.h

>> @@ -38,6 +38,9 @@ extern "C" {

>>    *

>>    * @def ODPDRV_BYTE_ORDER

>>    * Selected byte order

>> + *

>> + * @def ODPDRV_BITFIELD_ORDER

>> + * Selected bitfield order

>>    */

>>

>>   /**

>> diff --git a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

>> b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

>> index cb7aec2..5dd182d 100644

>> --- a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

>> +++ b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h

>> @@ -49,12 +49,16 @@ extern "C" {

>>          #define ODPDRV_LITTLE_ENDIAN           1

>>          #define ODPDRV_BIG_ENDIAN              0

>>          #define ODPDRV_BYTE_ORDER              ODPDRV_LITTLE_ENDIAN

>> -       #define ODPDRV_LITTLE_ENDIAN_BITFIELD

>> +       #define ODPDRV_LITTLE_ENDIAN_BITFIELD  1

>> +       #define ODPDRV_BIG_ENDIAN_BITFIELD     0

>> +       #define ODPDRV_BITFIELD_ORDER

>> ODPDRV_LITTLE_ENDIAN_BITFIELD

>>   #else

>>          #define ODPDRV_LITTLE_ENDIAN           0

>>          #define ODPDRV_BIG_ENDIAN              1

>> -       #define ODPDRV_BYTE_ORDER              ODP_BIG_ENDIAN

>> -       #define ODPDRV_BIG_ENDIAN_BITFIELD

>> +       #define ODPDRV_BYTE_ORDER              ODPDRV_BIG_ENDIAN

>> +       #define ODPDRV_LITTLE_ENDIAN_BITFIELD  0

>> +       #define ODPDRV_BIG_ENDIAN_BITFIELD     1

>> +       #define ODPDRV_BITFIELD_ORDER          ODPDRV_BIG_ENDIAN_BITFIELD

>>   #endif

>>

>>   typedef uint16_t __odpdrv_bitwise      odpdrv_u16le_t;

>> --

>> 2.7.4

>>

>>
diff mbox

Patch

diff --git a/include/odp/drv/spec/byteorder.h b/include/odp/drv/spec/byteorder.h
index d3f5d7e..bf363f5 100644
--- a/include/odp/drv/spec/byteorder.h
+++ b/include/odp/drv/spec/byteorder.h
@@ -38,6 +38,9 @@  extern "C" {
  *
  * @def ODPDRV_BYTE_ORDER
  * Selected byte order
+ *
+ * @def ODPDRV_BITFIELD_ORDER
+ * Selected bitfield order
  */
 
 /**
diff --git a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h
index cb7aec2..5dd182d 100644
--- a/platform/linux-generic/include/odp/drv/plat/byteorder_types.h
+++ b/platform/linux-generic/include/odp/drv/plat/byteorder_types.h
@@ -49,12 +49,16 @@  extern "C" {
 	#define ODPDRV_LITTLE_ENDIAN           1
 	#define ODPDRV_BIG_ENDIAN              0
 	#define ODPDRV_BYTE_ORDER              ODPDRV_LITTLE_ENDIAN
-	#define ODPDRV_LITTLE_ENDIAN_BITFIELD
+	#define ODPDRV_LITTLE_ENDIAN_BITFIELD  1
+	#define ODPDRV_BIG_ENDIAN_BITFIELD     0
+	#define ODPDRV_BITFIELD_ORDER          ODPDRV_LITTLE_ENDIAN_BITFIELD
 #else
 	#define ODPDRV_LITTLE_ENDIAN           0
 	#define ODPDRV_BIG_ENDIAN              1
-	#define	ODPDRV_BYTE_ORDER              ODP_BIG_ENDIAN
-	#define ODPDRV_BIG_ENDIAN_BITFIELD
+	#define	ODPDRV_BYTE_ORDER              ODPDRV_BIG_ENDIAN
+	#define ODPDRV_LITTLE_ENDIAN_BITFIELD  0
+	#define ODPDRV_BIG_ENDIAN_BITFIELD     1
+	#define ODPDRV_BITFIELD_ORDER          ODPDRV_BIG_ENDIAN_BITFIELD
 #endif
 
 typedef uint16_t __odpdrv_bitwise	odpdrv_u16le_t;