blob: cbdb67a0cadafe661f8d785bed422b95a3f8f798 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauer36c83402009-03-01 10:16:01 +00002
3#ifndef __TYPES_H
4#define __TYPES_H
Elyes HAOUASb12ece92019-05-15 21:01:02 +02005
Julius Wernera2148372019-11-13 19:50:33 -08006/* types.h is supposed to provide the standard headers defined in here: */
Julius Werner98eeb962019-12-11 15:47:42 -08007#include <commonlib/bsd/cb_err.h>
Julius Wernera2148372019-11-13 19:50:33 -08008#include <stdbool.h>
Stefan Reinauer36c83402009-03-01 10:16:01 +00009#include <stdint.h>
10#include <stddef.h>
Stefan Reinauer36c83402009-03-01 10:16:01 +000011
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060012/*
13 * This may mean something else on architectures where the bits are numbered
14 * from the MSB (e.g. PowerPC), but until we cross that bridge, this macro is
15 * perfectly fine.
16 */
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080017#ifndef BIT
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060018#define BIT(x) (1ul << (x))
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080019#endif
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060020
Furquan Shaikh197c4862021-01-19 22:13:59 -080021#define BITS_PER_BYTE 8
22
Alexandru Gagniucfe9e30d2013-11-23 17:46:04 -060023#endif /* __TYPES_H */