diff options
Diffstat (limited to 'include/osmocom/core/utils.h')
-rw-r--r-- | include/osmocom/core/utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 63a73ab4..1d1ebd8a 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -19,6 +19,8 @@ #define OSMO_STRINGIFY(x) #x /*! \brief Make a value_string entry from an enum value name */ #define OSMO_VALUE_STRING(x) { x, #x } +/*! \brief Number of bytes necessary to store given BITS */ +#define OSMO_BYTES_FOR_BITS(BITS) ((BITS + 8 - 1) / 8) #include <stdint.h> #include <stdio.h> |