brg_types.h File Reference
`#include <limits.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Macros

#define | ptrint_t int
#define | BRG_UI32
#define | RETURN_VALUES
#define | VOID_RETURN void
#define | INT_RETURN int
#define | ALIGN_OFFSET(x, n) (((ptrint_t)(x)) & ((n) - 1))
#define | ALIGN_FLOOR(x, n) ((uint8_t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1)))
#define | ALIGN_CEIL(x, n) ((uint8_t*)(x) + (-((ptrint_t)(x)) & ((n) - 1)))
#define | UI_TYPE(size) uint##size##_t
#define | UNIT_TYPEDEF(x, size) typedef UI_TYPE(size) x
#define | BUFR_TYPEDEF(x, size, bsize) typedef UI_TYPE(size) x[bsize / (size >> 3)]
#define | UNIT_CAST(x, size) ((UI_TYPE(size) )(x))
#define | UPTR_CAST(x, size) ((UI_TYPE(size)*)(x))

## Macro Definition Documentation

## ALIGN_CEIL

#define ALIGN_CEIL | ( |  | x,
|  |  | n
| ) |  | ((uint8_t*)(x) + (-((ptrint_t)(x)) & ((n) - 1)))

## ALIGN_FLOOR

#define ALIGN_FLOOR | ( |  | x,
|  |  | n
| ) |  | ((uint8_t*)(x) - ( ((ptrint_t)(x)) & ((n) - 1)))

## ALIGN_OFFSET

#define ALIGN_OFFSET | ( |  | x,
|  |  | n
| ) |  | (((ptrint_t)(x)) & ((n) - 1))

## BRG_UI32

#define BRG_UI32

## BUFR_TYPEDEF

#define BUFR_TYPEDEF | ( |  | x,
|  |  | size,
|  |  | bsize
| ) |  | typedef UI_TYPE(size) x[bsize / (size >> 3)]

## INT_RETURN

#define INT_RETURN int

## ptrint_t

#define ptrint_t int

## RETURN_VALUES

#define RETURN_VALUES

## UI_TYPE

#define UI_TYPE | ( |  | size | ) | uint##size##_t

## UNIT_CAST

#define UNIT_CAST | ( |  | x,
|  |  | size
| ) |  | ((UI_TYPE(size) )(x))

## UNIT_TYPEDEF

#define UNIT_TYPEDEF | ( |  | x,
|  |  | size
| ) |  | typedef UI_TYPE(size) x

## UPTR_CAST

#define UPTR_CAST | ( |  | x,
|  |  | size
| ) |  | ((UI_TYPE(size)*)(x))

## VOID_RETURN

#define VOID_RETURN void