blob: 398116364d7323f2221fd9830ac2d5e504074d9e [file] [log] [blame]
Zane Shelley876bc2a2019-07-23 12:55:37 -05001#pragma once
2
Zane Shelley01e590b2020-05-08 21:11:46 -05003// The purpose of this file is to include common headers that will be used
4// internally throughout this library. It is advised not to include this in any
5// headers that are installed externally to avoid ballooning the number of
6// headers that are externally exposed.
Zane Shelley876bc2a2019-07-23 12:55:37 -05007
Zane Shelleya61f4c52019-08-01 13:58:49 -05008// Standard library includes
Zane Shelley01e590b2020-05-08 21:11:46 -05009#include <assert.h>
10#include <inttypes.h>
Zane Shelley876bc2a2019-07-23 12:55:37 -050011#include <stdint.h>
Zane Shelleyca9f6252019-10-25 21:17:30 -050012#include <stdlib.h>
13
Zane Shelley6722b5b2020-05-12 22:09:04 -050014#include <algorithm>
Zane Shelleyd0af3582019-09-19 10:48:59 -050015#include <map>
Zane Shelleydd69c962020-05-05 22:19:11 -050016#include <memory>
Zane Shelleyb406de42019-09-09 16:10:38 -050017#include <vector>
Zane Shelley876bc2a2019-07-23 12:55:37 -050018
Zane Shelley01e590b2020-05-08 21:11:46 -050019// Library includes
Zane Shelleyb406de42019-09-09 16:10:38 -050020#include <hei_chip.hpp>
Zane Shelleyb406de42019-09-09 16:10:38 -050021#include <hei_types.hpp>
Zane Shelley01e590b2020-05-08 21:11:46 -050022#include <hei_user_interface.hpp>
23
24// Common macros used throughout this library
Caleb Palmer7bbef162025-01-23 13:36:11 -060025// Only defined if not already defined so that the user application can
26// supersede these definitions with their own if so desired.
27#ifndef HEI_ASSERT
Zane Shelley6722b5b2020-05-12 22:09:04 -050028#define HEI_ASSERT(expression) assert(expression)
Caleb Palmer7bbef162025-01-23 13:36:11 -060029#endif
Zane Shelley01e590b2020-05-08 21:11:46 -050030
Caleb Palmer7bbef162025-01-23 13:36:11 -060031#ifndef HEI_ERR
Zane Shelley01e590b2020-05-08 21:11:46 -050032#define HEI_ERR(...) \
33 { \
34 libhei::hei_err((char*)__VA_ARGS__); \
35 }
Caleb Palmer7bbef162025-01-23 13:36:11 -060036#endif
Zane Shelley01e590b2020-05-08 21:11:46 -050037
Caleb Palmer7bbef162025-01-23 13:36:11 -060038#ifndef HEI_INF
Zane Shelley01e590b2020-05-08 21:11:46 -050039#define HEI_INF(...) \
40 { \
41 libhei::hei_inf((char*)__VA_ARGS__); \
42 }
Caleb Palmer7bbef162025-01-23 13:36:11 -060043#endif