LinuxQMISDK-Lite  SLQS04.00.23
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
switype_256bit.h File Reference

Go to the source code of this file.

Data Structures

struct  swi_uint256_t
 

Macros

#define SWI_UINT256_WORD_COUNT   16
 
#define SWI_UINT256_BITS_PER_WORD   16
 
#define SWI_UINT256_WORD_OFFSET(val)   ((val) / SWI_UINT256_BITS_PER_WORD)
 
#define SWI_UINT256_BIT_OFFSET(val)   ((val) % SWI_UINT256_BITS_PER_WORD)
 
#define SWI_UINT256_INT_VALUE   {{0}}
 

Functions

void swi_uint256_set_bit (swi_uint256_t *pMask, uint8_t bit)
 
void swi_uint256_clear_bit (swi_uint256_t *pMask, uint8_t bit)
 
uint8_t swi_uint256_get_bit (swi_uint256_t Mask, uint8_t bit)
 
void swi_uint256_print_mask (swi_uint256_t mask)
 

Macro Definition Documentation

#define SWI_UINT256_BIT_OFFSET (   val)    ((val) % SWI_UINT256_BITS_PER_WORD)
#define SWI_UINT256_BITS_PER_WORD   16
#define SWI_UINT256_INT_VALUE   {{0}}
#define SWI_UINT256_WORD_COUNT   16
#define SWI_UINT256_WORD_OFFSET (   val)    ((val) / SWI_UINT256_BITS_PER_WORD)

Function Documentation

void swi_uint256_clear_bit ( swi_uint256_t pMask,
uint8_t  bit 
)

Clear relevant bit in provided mask

Parameters
[in]pMaskPointer to bitmask
[in]bitBit to clear
uint8_t swi_uint256_get_bit ( swi_uint256_t  Mask,
uint8_t  bit 
)

Get relevant bit from provided mask

Parameters
[in]MaskBit mask
[in]bitBit to extract
Returns
Bit value
  • 0 - bit is not set
  • 1 - bit is set
void swi_uint256_print_mask ( swi_uint256_t  mask)

Print the log mask to syslog. Use only for debugging

Parameters
[in]maskBit mask
void swi_uint256_set_bit ( swi_uint256_t pMask,
uint8_t  bit 
)

Set relevant bit in provided mask

Parameters
[in]pMaskPointer to bit mask
[in]bitBit to set

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