get_dword_bits added.
FossilOrigin-Name: 354080d0831ac0c2a9cac1d4658574d630f916181fd794bdf969ed58efe86e7a
This commit is contained in:
parent
c5855d946c
commit
8efdef045d
@ -34,3 +34,9 @@ extern int cw_is_printable(const uint8_t * s,int len);
|
|||||||
|
|
||||||
#define cw_timer_start(t) (time(NULL)+t)
|
#define cw_timer_start(t) (time(NULL)+t)
|
||||||
#define cw_timer_timeout(t) (time(NULL)>t ? 1 : 0)
|
#define cw_timer_timeout(t) (time(NULL)>t ? 1 : 0)
|
||||||
|
|
||||||
|
|
||||||
|
/* generic macroto to isolate bits from a dword */
|
||||||
|
#define cw_get_dword_bits(src,start,len) ((~(0xFFFFFFFF<<len)) & (src >> (32 - start - len)))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user