aroarfw
Data Structures | Macros
caps.h File Reference
#include <stdint.h>
#include <aroarfw/vendor.h>
Include dependency graph for caps.h:

Go to the source code of this file.

Data Structures

union  rstandard_t
 This is the base type for storing of standard IDs. More...

Macros

#define __RPACKED__
#define RSTANDARD_INIT(_vendor, _standard, _version)
 Macro to initialize a constant array of standard IDs.
#define rstandard_getvendor(x)   (((rstandard_t)(x)).subm.vendor)
 Macro to access the Vendor ID from a standard ID.
#define rstandard_getversion(x)   (((rstandard_t)(x)).subm.version)
 Macro to access the standard version from a standard ID.
#define rstandard_getstandard(x)
 Macro to access the standard number from a standard ID in host native format.
#define rstandard_getu32hbo(x)   RBO_NB2H32(&(x))
 Macro to convert a standard ID into a host native 32 bit unsigned integer.

Macro Definition Documentation

#define __RPACKED__

Definition at line 34 of file caps.h.

#define rstandard_getstandard (   x)
Value:
(((uint16_t)(((rstandard_t)(x)).subm.standardmsb) << (uint16_t)8) | \
((uint16_t)(((rstandard_t)(x)).subm.standardlsb)))

Macro to access the standard number from a standard ID in host native format.

Parameters
xThe Standard ID
Returns
The standard number

Definition at line 84 of file caps.h.

#define rstandard_getu32hbo (   x)    RBO_NB2H32(&(x))

Macro to convert a standard ID into a host native 32 bit unsigned integer.

Parameters
xThe Standard ID
Returns
The Standard ID in native format

Definition at line 90 of file caps.h.

#define rstandard_getvendor (   x)    (((rstandard_t)(x)).subm.vendor)

Macro to access the Vendor ID from a standard ID.

Parameters
xThe Standard ID
Returns
The Vendor ID

Definition at line 74 of file caps.h.

#define rstandard_getversion (   x)    (((rstandard_t)(x)).subm.version)

Macro to access the standard version from a standard ID.

Parameters
xThe sStandard ID
Returns
The standard version

Definition at line 79 of file caps.h.

#define RSTANDARD_INIT (   _vendor,
  _standard,
  _version 
)
Value:
{.subm = { \
.vendor = (uint8_t)(rstdvendor_t)(_vendor), \
.standardmsb = (uint8_t)(uint16_t)(((_standard) & (uint16_t)0xFF00) >> (uint16_t)8), \
.standardlsb = (uint8_t)(uint16_t)(((_standard) & (uint16_t)0x00FF)), \
.version = (uint8_t)(_version) \
} \
}

Macro to initialize a constant array of standard IDs.

Parameters
_vendorThe Vendor ID (of type rstdvendor_t).
_standardThe standard number (in native byte order uint16_t)
_versionThe standard version (as uint8_t)
Returns
The Standard ID suitable for array initialization

Definition at line 63 of file caps.h.