diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-03-11 17:09:00 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-03-11 17:09:00 +1000 |
commit | c70d98ef59bddda73cd4d97142a98f1513d11947 (patch) | |
tree | c13bf45707708c9876e5f841ff611df052f5804e /src | |
parent | 6d5a748f1ce7ec0c3bf61ad7fbc1ef8cfbf3e129 (diff) | |
download | uGFX-c70d98ef59bddda73cd4d97142a98f1513d11947.tar.gz uGFX-c70d98ef59bddda73cd4d97142a98f1513d11947.tar.bz2 uGFX-c70d98ef59bddda73cd4d97142a98f1513d11947.zip |
Add bit format testing to sample formats.
Diffstat (limited to 'src')
-rw-r--r-- | src/gmisc/sys_defs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gmisc/sys_defs.h b/src/gmisc/sys_defs.h index cbb0111b..41a9bca6 100644 --- a/src/gmisc/sys_defs.h +++ b/src/gmisc/sys_defs.h @@ -40,6 +40,16 @@ typedef enum ArrayDataFormat_e { } ArrayDataFormat; /** + * @brief Is the sample data format a "signed" data format? + */ +#define gfxSampleFormatIsSigned(fmt) ((fmt) & 1) + +/** + * @brief How many bits are in the sample data format + */ +#define gfxSampleFormatBits(fmt) ((fmt) & ~1) + +/** * @brief The type for a fixed point type. * @details The top 16 bits are the integer component, the bottom 16 bits are the real component. */ |