diff mbox

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

Message ID 1471630635-48894-1-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard Aug. 19, 2016, 6:17 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, 8:47 p.m. UTC | #1
On Fri, Aug 19, 2016 at 1:17 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>

> ---

>  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..aae6e69 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_BIG_ENDIAN_BITFIELD     0

>


Still the typo here. It should be #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

>

>
Christophe Milard Aug. 19, 2016, 10:24 p.m. UTC | #2
God! I am just blind... sorry. sending a V3

On 19 August 2016 at 22:47, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

>

>

> On Fri, Aug 19, 2016 at 1:17 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>

>> ---

>>  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..aae6e69 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_BIG_ENDIAN_BITFIELD     0

>>

>

> Still the typo here. It should be #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..aae6e69 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_BIG_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;