Macros | Functions
acc_alg_basic_utils.h File Reference
`#include <stdbool.h>`
`#include <stddef.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Macros
#define | ACC_ALG_SPEED_OF_LIGHT 299792458.0f
#define | M_PI 3.14159265358979323846
#define | ACC_ALG_BASIC_MATH_PI M_PI

## Functions
uint32_t | acc_alg_basic_util_crc32 (const uint8_t *input, size_t len)
| Calculate CRC32 checksum on byte array. More...
static size_t | acc_alg_basic_utils_calculate_length_of_bitarray_uint32 (size_t number_of_bits)
| Calculate length of 32-bit array to contain size number of bits. More...
static void | acc_alg_basic_utils_set_bit_bitarray_uint32 (uint32_t *bitarray, size_t bit_index)
| Set bit in bit array. More...
static void | acc_alg_basic_utils_clear_bit_bitarray_uint32 (uint32_t *bitarray, size_t bit_index)
| Clear bit in bit array. More...
static bool | acc_alg_basic_utils_is_bit_set_bitarray_uint32 (const uint32_t *bitarray, size_t bit_index)
| Check if bit is set in bit array. More...

## Macro Definition Documentation

## ◆ ACC_ALG_BASIC_MATH_PI

#define ACC_ALG_BASIC_MATH_PI M_PI

Definition at line 20 of file acc_alg_basic_utils.h.

## ◆ ACC_ALG_SPEED_OF_LIGHT

#define ACC_ALG_SPEED_OF_LIGHT 299792458.0f

Definition at line 11 of file acc_alg_basic_utils.h.

## ◆ M_PI

#define M_PI 3.14159265358979323846

Definition at line 14 of file acc_alg_basic_utils.h.

## Function Documentation

## ◆ acc_alg_basic_util_crc32()

uint32_t acc_alg_basic_util_crc32 | ( | const uint8_t * | input,
|  | size_t | len
| ) |  |

Calculate CRC32 checksum on byte array.

Parameters

  [in] | input | byte array
  [in] | len | Length of byte array

Returns
  CRC32 checksum

## ◆ acc_alg_basic_utils_calculate_length_of_bitarray_uint32()

static size_t acc_alg_basic_utils_calculate_length_of_bitarray_uint32 | ( | size_t | number_of_bits | ) |
| inline static

Calculate length of 32-bit array to contain size number of bits.

Parameters

  number_of_bits | Number of bits to contain in bit array

Returns
  Length of 32-bit array

Definition at line 40 of file acc_alg_basic_utils.h.

## ◆ acc_alg_basic_utils_clear_bit_bitarray_uint32()

static void acc_alg_basic_utils_clear_bit_bitarray_uint32 | ( | uint32_t * | bitarray,
|  | size_t | bit_index
| ) |  |
| inline static

Clear bit in bit array.

Parameters

  [in,out] | bitarray | Array to clear bit in
  [in] | bit_index | Index of bit to clear

Definition at line 64 of file acc_alg_basic_utils.h.

## ◆ acc_alg_basic_utils_is_bit_set_bitarray_uint32()

static bool acc_alg_basic_utils_is_bit_set_bitarray_uint32 | ( | const uint32_t * | bitarray,
|  | size_t | bit_index
| ) |  |
| inline static

Check if bit is set in bit array.

Parameters

  [in] | bitarray | Array to check bit in
  [in] | bit_index | Index of bit to check

Returns
  True if bit is set

Definition at line 77 of file acc_alg_basic_utils.h.

## ◆ acc_alg_basic_utils_set_bit_bitarray_uint32()

static void acc_alg_basic_utils_set_bit_bitarray_uint32 | ( | uint32_t * | bitarray,
|  | size_t | bit_index
| ) |  |
| inline static

Set bit in bit array.

Parameters

  [in,out] | bitarray | Array to set bit in
  [in] | bit_index | Index of bit to set

Definition at line 52 of file acc_alg_basic_utils.h.