-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathwrapper.h
50 lines (42 loc) · 1.52 KB
/
wrapper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Copyright (c) 2024 Linaro LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This file is the seed point for bindgen. This determines every header that will be visited for
* binding generation. It should include any Zephyr headers we need bindings for. The driver in
* build.rs will also select which functions need generation, which will determine the types that
* are output.
*/
#ifdef RUST_BINDGEN
/* errno is coming from somewhere in Zephyr's build. Add the symbol when running bindgen so that it
* is defined here.
*/
extern int errno;
#endif
/* First, make sure we have all of our config settings. */
#include <zephyr/autoconf.h>
/* Gcc defines __SOFT_FP__ when the target uses software floating point, and the CMSIS headers get
* confused without this.
*/
#if defined(CONFIG_CPU_CORTEX_M)
#if !defined(CONFIG_FP_HARDABI) && !defined(FORCE_FP_HARDABI) && !defined(__SOFTFP__)
#define __SOFTFP__
#endif
#endif
#include <zephyr/kernel.h>
#include <zephyr/kernel/thread_stack.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/logging/log.h>
/*
* bindgen will output #defined constant that resolve to simple numbers. There are some symbols
* that we want exported that, at least in some situations, are more complex, usually with a type
* case.
*
* We'll use the prefix "ZR_" to avoid conflicts with other symbols.
*/
const uintptr_t ZR_STACK_ALIGN = Z_KERNEL_STACK_OBJ_ALIGN;
const uintptr_t ZR_STACK_RESERVED = K_KERNEL_STACK_RESERVED;