KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros
Macros for accessing the format of an image

Macros

#define KOS_IMG_FMT_I(x)   ((x) & 0xffff)
 Read the platform-independent half of the format. More...
 
#define KOS_IMG_FMT_D(x)   (((x) >> 16) & 0xffff)
 Read the platform-specific half of the format. More...
 
#define KOS_IMG_FMT(i, d)   ( ((i) & 0xffff) | (((d) & 0xffff) << 16) )
 Build a format value from a platform-independent half and a platform-specific half of the value. More...
 

Detailed Description

These macros provide easy access to the fmt field of a kos_img_t object.

Macro Definition Documentation

#define KOS_IMG_FMT (   i,
 
)    ( ((i) & 0xffff) | (((d) & 0xffff) << 16) )

Build a format value from a platform-independent half and a platform-specific half of the value.

This macro combines the platform-independent and platform-specific portions of an image format into a value suitable for storing as the fmt field of a kos_img_t object.

Parameters
iThe platform-independent half of the format.
dThe platform-specific half of the format. This should not be pre-shifted.
Returns
A complete image format value, suitable for placing in the fmt variable of a kos_img_t.
#define KOS_IMG_FMT_D (   x)    (((x) >> 16) & 0xffff)

Read the platform-specific half of the format.

This macro masks the format of a kos_img_t to give you just the upper half of the value, which contains the platform-specific half of the format.

Parameters
xAn image format (fmt field of a kos_img_t).
Returns
The platform-specific half of the format.
#define KOS_IMG_FMT_I (   x)    ((x) & 0xffff)

Read the platform-independent half of the format.

This macro masks the format of a kos_img_t to give you just the lower half of the value, which contains the platform-independent half of the format.

Parameters
xAn image format (fmt field of a kos_img_t).
Returns
The platform-independent half of the format.