summaryrefslogtreecommitdiff
path: root/controller/fw/src/sr_global.h
blob: ac773590946e42623c1a1e0ad25499975c4905dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef __SR_GLOBAL_H__
#define __SR_GLOBAL_H__

#include <stdint.h>

#define UNUSED(x) ((void) x)
#define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0]))

#define unused_a __attribute__((unused))

static inline uint16_t htole(uint16_t val) { return val; }

void __libc_init_array(void);

static inline void panic(void) {
    asm volatile ("bkpt");
}

#endif /* __SR_GLOBAL_H__ */