Choco OS
V.0.16.9.0
Join to the chocolate world
|
The file with functions for the bits operation. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | oC_Bits_Mask_U8(FROM, TO) |
#define | oC_Bits_Mask_U16(FROM, TO) |
#define | oC_Bits_Mask_U32(FROM, TO) |
#define | oC_Bits_Mask_U64(FROM, TO) |
#define | oC_Bits_ValueWithMask(VALUE, FROM, MASK) |
Functions | |
static uint8_t | oC_Bits_SetBitsU8 (uint8_t *outVariable, uint8_t Mask) |
static uint16_t | oC_Bits_SetBitsU16 (uint16_t *outVariable, uint16_t Mask) |
static uint32_t | oC_Bits_SetBitsU32 (uint32_t *outVariable, uint32_t Mask) |
static uint64_t | oC_Bits_SetBitsU64 (uint64_t *outVariable, uint64_t Mask) |
static uint8_t | oC_Bits_ClearBitsU8 (uint8_t *outVariable, uint8_t Mask) |
static uint16_t | oC_Bits_ClearBitsU16 (uint16_t *outVariable, uint16_t Mask) |
static uint32_t | oC_Bits_ClearBitsU32 (uint32_t *outVariable, uint32_t Mask) |
static uint64_t | oC_Bits_ClearBitsU64 (uint64_t *outVariable, uint64_t Mask) |
static uint8_t | oC_Bits_SetValueU8 (uint8_t *outVariable, uint8_t Value, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint16_t | oC_Bits_SetValueU16 (uint16_t *outVariable, uint16_t Value, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint32_t | oC_Bits_SetValueU32 (uint32_t *outVariable, uint32_t Value, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint64_t | oC_Bits_SetValueU64 (uint64_t *outVariable, uint64_t Value, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint8_t | oC_Bits_GetValueU8 (uint8_t Variable, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint16_t | oC_Bits_GetValueU16 (uint16_t Variable, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint32_t | oC_Bits_GetValueU32 (uint32_t Variable, uint8_t StartBitNr, uint8_t EndBitNr) |
static uint64_t | oC_Bits_GetValueU64 (uint64_t Variable, uint8_t StartBitNr, uint8_t EndBitNr) |
static void | oC_Bits_SplitU64ToU32 (uint64_t Variable, uint32_t *outLow, uint32_t *outHigh) |
static void | oC_Bits_SplitU32ToU16 (uint32_t Variable, uint16_t *outLow, uint16_t *outHigh) |
static void | oC_Bits_SplitU16ToU8 (uint16_t Variable, uint8_t *outLow, uint8_t *outHigh) |
static uint16_t | oC_Bits_JoinU8ToU16 (uint8_t LowPart, uint8_t HighPart) |
static uint32_t | oC_Bits_JoinU16ToU32 (uint16_t LowPart, uint16_t HighPart) |
static uint64_t | oC_Bits_JoinU32ToU64 (uint32_t LowPart, uint32_t HighPart) |
static int8_t | oC_Bits_GetBitNumberU8 (uint8_t BitMask) |
static int8_t | oC_Bits_GetBitNumberU16 (uint16_t BitMask) |
static int8_t | oC_Bits_GetBitNumberU32 (uint32_t BitMask) |
static int8_t | oC_Bits_GetBitNumberU64 (uint64_t BitMask) |
static bool | oC_Bits_IsBitSetU8 (uint8_t BitMask, uint8_t BitIndex) |
checks if bit is set More... | |
static bool | oC_Bits_IsBitSetU16 (uint16_t BitMask, uint8_t BitIndex) |
checks if bit is set More... | |
static bool | oC_Bits_IsBitSetU32 (uint32_t BitMask, uint8_t BitIndex) |
checks if bit is set More... | |
static bool | oC_Bits_IsBitSetU64 (uint64_t BitMask, uint8_t BitIndex) |
checks if bit is set More... | |
static uint8_t | oC_Bits_SetBitU8 (uint8_t *outVariable, uint8_t BitIndex) |
sets bit in the variable More... | |
static uint16_t | oC_Bits_SetBitU16 (uint16_t *outVariable, uint8_t BitIndex) |
sets bit in the variable More... | |
static uint32_t | oC_Bits_SetBitU32 (uint32_t *outVariable, uint8_t BitIndex) |
sets bit in the variable More... | |
static uint64_t | oC_Bits_SetBitU64 (uint64_t *outVariable, uint8_t BitIndex) |
sets bit in the variable More... | |
static uint8_t | oC_Bits_ClearBitU8 (uint8_t *outVariable, uint8_t BitIndex) |
clear selected bit More... | |
static uint16_t | oC_Bits_ClearBitU16 (uint16_t *outVariable, uint8_t BitIndex) |
clear selected bit More... | |
static uint32_t | oC_Bits_ClearBitU32 (uint32_t *outVariable, uint8_t BitIndex) |
clear selected bit More... | |
static uint64_t | oC_Bits_ClearBitU64 (uint64_t *outVariable, uint8_t BitIndex) |
clear selected bit More... | |
static bool | oC_Bits_AreBitsSetU8 (uint8_t BitMask, uint8_t BitsToCheck) |
checks if all bits in field are set More... | |
static bool | oC_Bits_AreBitsSetU16 (uint16_t BitMask, uint16_t BitsToCheck) |
checks if all bits in field are set More... | |
static bool | oC_Bits_AreBitsSetU32 (uint32_t BitMask, uint32_t BitsToCheck) |
checks if all bits in field are set More... | |
static bool | oC_Bits_AreBitsSetU64 (uint64_t BitMask, uint64_t BitsToCheck) |
checks if all bits in field are set More... | |
static bool | oC_Bits_AreBitsClearU8 (uint8_t BitMask, uint8_t BitsToCheck) |
checks if all bits in field are clear More... | |
static bool | oC_Bits_AreBitsClearU16 (uint16_t BitMask, uint16_t BitsToCheck) |
checks if all bits in field are clear More... | |
static bool | oC_Bits_AreBitsClearU32 (uint32_t BitMask, uint32_t BitsToCheck) |
checks if all bits in field are clear More... | |
static bool | oC_Bits_AreBitsClearU64 (uint64_t BitMask, uint64_t BitsToCheck) |
checks if all bits in field are clear More... | |
static bool | oC_Bits_IsAtLeastOneBitSetU8 (uint8_t BitMask, uint8_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitSetU16 (uint16_t BitMask, uint16_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitSetU32 (uint32_t BitMask, uint32_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitSetU64 (uint64_t BitMask, uint64_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitClearU8 (uint8_t BitMask, uint8_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitClearU16 (uint16_t BitMask, uint16_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitClearU32 (uint32_t BitMask, uint32_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
static bool | oC_Bits_IsAtLeastOneBitClearU64 (uint64_t BitMask, uint64_t BitsToCheck) |
checks if at least one of bits in field is set More... | |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_bits.h.