LinuxQMISDK-Lite  SLQS04.00.23
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
switype_256bit.h
Go to the documentation of this file.
1 #ifndef __H__SWITYPE_256BIT__H__
2 #define __H__SWITYPE_256BIT__H__
3 
4 #include <stdint.h>
5 /* 256 bit data type for bitmask and helper functions */
6 #define SWI_UINT256_WORD_COUNT 16
7 #define SWI_UINT256_BITS_PER_WORD 16
8 
9 #define SWI_UINT256_WORD_OFFSET(val) ((val) / SWI_UINT256_BITS_PER_WORD)
10 #define SWI_UINT256_BIT_OFFSET(val) ((val) % SWI_UINT256_BITS_PER_WORD)
11 
15 typedef struct
16 {
17  uint16_t word[SWI_UINT256_WORD_COUNT];
19 
25 void swi_uint256_set_bit(swi_uint256_t *pMask,uint8_t bit);
26 
32 void swi_uint256_clear_bit(swi_uint256_t *pMask,uint8_t bit);
33 
42 uint8_t swi_uint256_get_bit(swi_uint256_t Mask, uint8_t bit);
43 
49 
50 #define SWI_UINT256_INT_VALUE {{0}}
51 #endif //__H__SWITYPE_256BIT__H__
uint8_t swi_uint256_get_bit(swi_uint256_t Mask, uint8_t bit)
#define SWI_UINT256_WORD_COUNT
Definition: switype_256bit.h:6
void swi_uint256_clear_bit(swi_uint256_t *pMask, uint8_t bit)
void swi_uint256_print_mask(swi_uint256_t mask)
Definition: switype_256bit.h:15
void swi_uint256_set_bit(swi_uint256_t *pMask, uint8_t bit)

Copyright (c) 2011-2015 Sierra Wireless, Inc. All rights reserved