cleanup: include/: move misc/byteorder.h to sys/byteorder.h
move misc/byteorder.h to sys/byteorder.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
5eb90ec169
commit
5d001f3e41
162 changed files with 492 additions and 477 deletions
|
@ -15,7 +15,7 @@
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/uart.h>
|
#include <drivers/uart.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/uart.h>
|
#include <drivers/uart.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <drivers/can.h>
|
#include <drivers/can.h>
|
||||||
#include <drivers/clock_control.h>
|
#include <drivers/clock_control.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <fsl_flexcan.h>
|
#include <fsl_flexcan.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_CAN_LOG_LEVEL
|
#define LOG_LEVEL CONFIG_CAN_LOG_LEVEL
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
LOG_MODULE_REGISTER(display_ili9340);
|
LOG_MODULE_REGISTER(display_ili9340);
|
||||||
|
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(ssd1673);
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "ssd1673_regs.h"
|
#include "ssd1673_regs.h"
|
||||||
#include <display/cfb.h>
|
#include <display/cfb.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#ifdef CONFIG_HAS_DTS_I2C
|
#ifdef CONFIG_HAS_DTS_I2C
|
||||||
|
|
|
@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||||
#include <net/net_if.h>
|
#include <net/net_if.h>
|
||||||
#include <net/net_pkt.h>
|
#include <net/net_pkt.h>
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <random/rand32.h>
|
#include <random/rand32.h>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||||
#include <net/net_if.h>
|
#include <net/net_if.h>
|
||||||
#include <net/net_pkt.h>
|
#include <net/net_pkt.h>
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <random/rand32.h>
|
#include <random/rand32.h>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||||
#include <net/ieee802154_radio.h>
|
#include <net/ieee802154_radio.h>
|
||||||
#include <net/net_if.h>
|
#include <net/net_if.h>
|
||||||
#include <net/net_pkt.h>
|
#include <net/net_pkt.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <random/rand32.h>
|
#include <random/rand32.h>
|
||||||
|
|
||||||
#include "fsl_xcvr.h"
|
#include "fsl_xcvr.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||||
#include <net/net_if.h>
|
#include <net/net_if.h>
|
||||||
#include <net/net_pkt.h>
|
#include <net/net_pkt.h>
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <random/rand32.h>
|
#include <random/rand32.h>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||||
#include <net/openthread.h>
|
#include <net/openthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <random/rand32.h>
|
#include <random/rand32.h>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/led.h>
|
#include <drivers/led.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LED_LOG_LEVEL
|
#define LOG_LEVEL CONFIG_LED_LOG_LEVEL
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
#ifdef DT_BOSCH_BME280_BUS_I2C
|
#ifdef DT_BOSCH_BME280_BUS_I2C
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
#include "mcp9808.h"
|
#include "mcp9808.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/i2c.h>
|
#include <drivers/i2c.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <usb/usb_device.h>
|
#include <usb/usb_device.h>
|
||||||
#include "usb_dw_registers.h"
|
#include "usb_dw_registers.h"
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <usb/usb_device.h>
|
#include <usb/usb_device.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <usb/usb_dc.h>
|
#include <usb/usb_dc.h>
|
||||||
#include <usb/usb_device.h>
|
#include <usb/usb_device.h>
|
||||||
#include <net/net_ip.h>
|
#include <net/net_ip.h>
|
||||||
|
|
|
@ -1,328 +1,15 @@
|
||||||
/** @file
|
|
||||||
* @brief Byte order helpers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2016, Intel Corporation.
|
* Copyright (c) 2019 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ZEPHYR_INCLUDE_MISC_BYTEORDER_H_
|
#ifndef ZEPHYR_INCLUDE_MISC_BYTEORDER_H_
|
||||||
#define ZEPHYR_INCLUDE_MISC_BYTEORDER_H_
|
#define ZEPHYR_INCLUDE_MISC_BYTEORDER_H_
|
||||||
|
|
||||||
#include <zephyr/types.h>
|
#ifndef CONFIG_COMPAT_INCLUDES
|
||||||
#include <stddef.h>
|
#warning "This header file has moved, include <sys/byteorder.h> instead."
|
||||||
#include <sys/__assert.h>
|
|
||||||
|
|
||||||
/* Internal helpers only used by the sys_* APIs further below */
|
|
||||||
#define __bswap_16(x) ((u16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
|
|
||||||
#define __bswap_32(x) ((u32_t) ((((x) >> 24) & 0xff) | \
|
|
||||||
(((x) >> 8) & 0xff00) | \
|
|
||||||
(((x) & 0xff00) << 8) | \
|
|
||||||
(((x) & 0xff) << 24)))
|
|
||||||
#define __bswap_64(x) ((u64_t) ((((x) >> 56) & 0xff) | \
|
|
||||||
(((x) >> 40) & 0xff00) | \
|
|
||||||
(((x) >> 24) & 0xff0000) | \
|
|
||||||
(((x) >> 8) & 0xff000000) | \
|
|
||||||
(((x) & 0xff000000) << 8) | \
|
|
||||||
(((x) & 0xff0000) << 24) | \
|
|
||||||
(((x) & 0xff00) << 40) | \
|
|
||||||
(((x) & 0xff) << 56)))
|
|
||||||
|
|
||||||
/** @def sys_le16_to_cpu
|
|
||||||
* @brief Convert 16-bit integer from little-endian to host endianness.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in little-endian format.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_cpu_to_le16
|
|
||||||
* @brief Convert 16-bit integer from host endianness to little-endian.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in host endianness.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in little-endian format.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_be16_to_cpu
|
|
||||||
* @brief Convert 16-bit integer from big-endian to host endianness.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in big-endian format.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_cpu_to_be16
|
|
||||||
* @brief Convert 16-bit integer from host endianness to big-endian.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in host endianness.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in big-endian format.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_le32_to_cpu
|
|
||||||
* @brief Convert 32-bit integer from little-endian to host endianness.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in little-endian format.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_cpu_to_le32
|
|
||||||
* @brief Convert 32-bit integer from host endianness to little-endian.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in host endianness.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in little-endian format.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_be32_to_cpu
|
|
||||||
* @brief Convert 32-bit integer from big-endian to host endianness.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in big-endian format.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @def sys_cpu_to_be32
|
|
||||||
* @brief Convert 32-bit integer from host endianness to big-endian.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in host endianness.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in big-endian format.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
||||||
#define sys_le16_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_le16(val) (val)
|
|
||||||
#define sys_be16_to_cpu(val) __bswap_16(val)
|
|
||||||
#define sys_cpu_to_be16(val) __bswap_16(val)
|
|
||||||
#define sys_le32_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_le32(val) (val)
|
|
||||||
#define sys_le64_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_le64(val) (val)
|
|
||||||
#define sys_be32_to_cpu(val) __bswap_32(val)
|
|
||||||
#define sys_cpu_to_be32(val) __bswap_32(val)
|
|
||||||
#define sys_be64_to_cpu(val) __bswap_64(val)
|
|
||||||
#define sys_cpu_to_be64(val) __bswap_64(val)
|
|
||||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
||||||
#define sys_le16_to_cpu(val) __bswap_16(val)
|
|
||||||
#define sys_cpu_to_le16(val) __bswap_16(val)
|
|
||||||
#define sys_be16_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_be16(val) (val)
|
|
||||||
#define sys_le32_to_cpu(val) __bswap_32(val)
|
|
||||||
#define sys_cpu_to_le32(val) __bswap_32(val)
|
|
||||||
#define sys_le64_to_cpu(val) __bswap_64(val)
|
|
||||||
#define sys_cpu_to_le64(val) __bswap_64(val)
|
|
||||||
#define sys_be32_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_be32(val) (val)
|
|
||||||
#define sys_be64_to_cpu(val) (val)
|
|
||||||
#define sys_cpu_to_be64(val) (val)
|
|
||||||
#else
|
|
||||||
#error "Unknown byte order"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
#include <sys/byteorder.h>
|
||||||
* @brief Put a 16-bit integer as big-endian to arbitrary location.
|
|
||||||
*
|
|
||||||
* Put a 16-bit integer, originally in host endianness, to a
|
|
||||||
* potentially unaligned memory location in big-endian format.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in host endianness.
|
|
||||||
* @param dst Destination memory address to store the result.
|
|
||||||
*/
|
|
||||||
static inline void sys_put_be16(u16_t val, u8_t dst[2])
|
|
||||||
{
|
|
||||||
dst[0] = val >> 8;
|
|
||||||
dst[1] = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Put a 32-bit integer as big-endian to arbitrary location.
|
|
||||||
*
|
|
||||||
* Put a 32-bit integer, originally in host endianness, to a
|
|
||||||
* potentially unaligned memory location in big-endian format.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in host endianness.
|
|
||||||
* @param dst Destination memory address to store the result.
|
|
||||||
*/
|
|
||||||
static inline void sys_put_be32(u32_t val, u8_t dst[4])
|
|
||||||
{
|
|
||||||
sys_put_be16(val >> 16, dst);
|
|
||||||
sys_put_be16(val, &dst[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Put a 16-bit integer as little-endian to arbitrary location.
|
|
||||||
*
|
|
||||||
* Put a 16-bit integer, originally in host endianness, to a
|
|
||||||
* potentially unaligned memory location in little-endian format.
|
|
||||||
*
|
|
||||||
* @param val 16-bit integer in host endianness.
|
|
||||||
* @param dst Destination memory address to store the result.
|
|
||||||
*/
|
|
||||||
static inline void sys_put_le16(u16_t val, u8_t dst[2])
|
|
||||||
{
|
|
||||||
dst[0] = val;
|
|
||||||
dst[1] = val >> 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Put a 32-bit integer as little-endian to arbitrary location.
|
|
||||||
*
|
|
||||||
* Put a 32-bit integer, originally in host endianness, to a
|
|
||||||
* potentially unaligned memory location in little-endian format.
|
|
||||||
*
|
|
||||||
* @param val 32-bit integer in host endianness.
|
|
||||||
* @param dst Destination memory address to store the result.
|
|
||||||
*/
|
|
||||||
static inline void sys_put_le32(u32_t val, u8_t dst[4])
|
|
||||||
{
|
|
||||||
sys_put_le16(val, dst);
|
|
||||||
sys_put_le16(val >> 16, &dst[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Put a 64-bit integer as little-endian to arbitrary location.
|
|
||||||
*
|
|
||||||
* Put a 64-bit integer, originally in host endianness, to a
|
|
||||||
* potentially unaligned memory location in little-endian format.
|
|
||||||
*
|
|
||||||
* @param val 64-bit integer in host endianness.
|
|
||||||
* @param dst Destination memory address to store the result.
|
|
||||||
*/
|
|
||||||
static inline void sys_put_le64(u64_t val, u8_t dst[8])
|
|
||||||
{
|
|
||||||
sys_put_le32(val, dst);
|
|
||||||
sys_put_le32(val >> 32, &dst[4]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a 16-bit integer stored in big-endian format.
|
|
||||||
*
|
|
||||||
* Get a 16-bit integer, stored in big-endian format in a potentially
|
|
||||||
* unaligned memory location, and convert it to the host endianness.
|
|
||||||
*
|
|
||||||
* @param src Location of the big-endian 16-bit integer to get.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
static inline u16_t sys_get_be16(const u8_t src[2])
|
|
||||||
{
|
|
||||||
return ((u16_t)src[0] << 8) | src[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a 32-bit integer stored in big-endian format.
|
|
||||||
*
|
|
||||||
* Get a 32-bit integer, stored in big-endian format in a potentially
|
|
||||||
* unaligned memory location, and convert it to the host endianness.
|
|
||||||
*
|
|
||||||
* @param src Location of the big-endian 32-bit integer to get.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
static inline u32_t sys_get_be32(const u8_t src[4])
|
|
||||||
{
|
|
||||||
return ((u32_t)sys_get_be16(&src[0]) << 16) | sys_get_be16(&src[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a 16-bit integer stored in little-endian format.
|
|
||||||
*
|
|
||||||
* Get a 16-bit integer, stored in little-endian format in a potentially
|
|
||||||
* unaligned memory location, and convert it to the host endianness.
|
|
||||||
*
|
|
||||||
* @param src Location of the little-endian 16-bit integer to get.
|
|
||||||
*
|
|
||||||
* @return 16-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
static inline u16_t sys_get_le16(const u8_t src[2])
|
|
||||||
{
|
|
||||||
return ((u16_t)src[1] << 8) | src[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a 32-bit integer stored in little-endian format.
|
|
||||||
*
|
|
||||||
* Get a 32-bit integer, stored in little-endian format in a potentially
|
|
||||||
* unaligned memory location, and convert it to the host endianness.
|
|
||||||
*
|
|
||||||
* @param src Location of the little-endian 32-bit integer to get.
|
|
||||||
*
|
|
||||||
* @return 32-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
static inline u32_t sys_get_le32(const u8_t src[4])
|
|
||||||
{
|
|
||||||
return ((u32_t)sys_get_le16(&src[2]) << 16) | sys_get_le16(&src[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get a 64-bit integer stored in little-endian format.
|
|
||||||
*
|
|
||||||
* Get a 64-bit integer, stored in little-endian format in a potentially
|
|
||||||
* unaligned memory location, and convert it to the host endianness.
|
|
||||||
*
|
|
||||||
* @param src Location of the little-endian 64-bit integer to get.
|
|
||||||
*
|
|
||||||
* @return 64-bit integer in host endianness.
|
|
||||||
*/
|
|
||||||
static inline u64_t sys_get_le64(const u8_t src[8])
|
|
||||||
{
|
|
||||||
return ((u64_t)sys_get_le32(&src[4]) << 32) | sys_get_le32(&src[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Swap one buffer content into another
|
|
||||||
*
|
|
||||||
* Copy the content of src buffer into dst buffer in reversed order,
|
|
||||||
* i.e.: src[n] will be put in dst[end-n]
|
|
||||||
* Where n is an index and 'end' the last index in both arrays.
|
|
||||||
* The 2 memory pointers must be pointing to different areas, and have
|
|
||||||
* a minimum size of given length.
|
|
||||||
*
|
|
||||||
* @param dst A valid pointer on a memory area where to copy the data in
|
|
||||||
* @param src A valid pointer on a memory area where to copy the data from
|
|
||||||
* @param length Size of both dst and src memory areas
|
|
||||||
*/
|
|
||||||
static inline void sys_memcpy_swap(void *dst, const void *src, size_t length)
|
|
||||||
{
|
|
||||||
u8_t *pdst = (u8_t *)dst;
|
|
||||||
const u8_t *psrc = (const u8_t *)src;
|
|
||||||
|
|
||||||
__ASSERT(((psrc < pdst && (psrc + length) <= pdst) ||
|
|
||||||
(psrc > pdst && (pdst + length) <= psrc)),
|
|
||||||
"Source and destination buffers must not overlap");
|
|
||||||
|
|
||||||
psrc += length - 1;
|
|
||||||
|
|
||||||
for (; length > 0; length--) {
|
|
||||||
*pdst++ = *psrc--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Swap buffer content
|
|
||||||
*
|
|
||||||
* In-place memory swap, where final content will be reversed.
|
|
||||||
* I.e.: buf[n] will be put in buf[end-n]
|
|
||||||
* Where n is an index and 'end' the last index of buf.
|
|
||||||
*
|
|
||||||
* @param buf A valid pointer on a memory area to swap
|
|
||||||
* @param length Size of buf memory area
|
|
||||||
*/
|
|
||||||
static inline void sys_mem_swap(void *buf, size_t length)
|
|
||||||
{
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < (length/2); i++) {
|
|
||||||
u8_t tmp = ((u8_t *)buf)[i];
|
|
||||||
|
|
||||||
((u8_t *)buf)[i] = ((u8_t *)buf)[length - 1 - i];
|
|
||||||
((u8_t *)buf)[length - 1 - i] = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ZEPHYR_INCLUDE_MISC_BYTEORDER_H_ */
|
#endif /* ZEPHYR_INCLUDE_MISC_BYTEORDER_H_ */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
|
||||||
#include <net/net_linkaddr.h>
|
#include <net/net_linkaddr.h>
|
||||||
|
|
328
include/sys/byteorder.h
Normal file
328
include/sys/byteorder.h
Normal file
|
@ -0,0 +1,328 @@
|
||||||
|
/** @file
|
||||||
|
* @brief Byte order helpers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2015-2016, Intel Corporation.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ZEPHYR_INCLUDE_SYS_BYTEORDER_H_
|
||||||
|
#define ZEPHYR_INCLUDE_SYS_BYTEORDER_H_
|
||||||
|
|
||||||
|
#include <zephyr/types.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <sys/__assert.h>
|
||||||
|
|
||||||
|
/* Internal helpers only used by the sys_* APIs further below */
|
||||||
|
#define __bswap_16(x) ((u16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
|
||||||
|
#define __bswap_32(x) ((u32_t) ((((x) >> 24) & 0xff) | \
|
||||||
|
(((x) >> 8) & 0xff00) | \
|
||||||
|
(((x) & 0xff00) << 8) | \
|
||||||
|
(((x) & 0xff) << 24)))
|
||||||
|
#define __bswap_64(x) ((u64_t) ((((x) >> 56) & 0xff) | \
|
||||||
|
(((x) >> 40) & 0xff00) | \
|
||||||
|
(((x) >> 24) & 0xff0000) | \
|
||||||
|
(((x) >> 8) & 0xff000000) | \
|
||||||
|
(((x) & 0xff000000) << 8) | \
|
||||||
|
(((x) & 0xff0000) << 24) | \
|
||||||
|
(((x) & 0xff00) << 40) | \
|
||||||
|
(((x) & 0xff) << 56)))
|
||||||
|
|
||||||
|
/** @def sys_le16_to_cpu
|
||||||
|
* @brief Convert 16-bit integer from little-endian to host endianness.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in little-endian format.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_cpu_to_le16
|
||||||
|
* @brief Convert 16-bit integer from host endianness to little-endian.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in host endianness.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in little-endian format.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_be16_to_cpu
|
||||||
|
* @brief Convert 16-bit integer from big-endian to host endianness.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in big-endian format.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_cpu_to_be16
|
||||||
|
* @brief Convert 16-bit integer from host endianness to big-endian.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in host endianness.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in big-endian format.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_le32_to_cpu
|
||||||
|
* @brief Convert 32-bit integer from little-endian to host endianness.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in little-endian format.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_cpu_to_le32
|
||||||
|
* @brief Convert 32-bit integer from host endianness to little-endian.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in host endianness.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in little-endian format.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_be32_to_cpu
|
||||||
|
* @brief Convert 32-bit integer from big-endian to host endianness.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in big-endian format.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @def sys_cpu_to_be32
|
||||||
|
* @brief Convert 32-bit integer from host endianness to big-endian.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in host endianness.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in big-endian format.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
|
#define sys_le16_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_le16(val) (val)
|
||||||
|
#define sys_be16_to_cpu(val) __bswap_16(val)
|
||||||
|
#define sys_cpu_to_be16(val) __bswap_16(val)
|
||||||
|
#define sys_le32_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_le32(val) (val)
|
||||||
|
#define sys_le64_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_le64(val) (val)
|
||||||
|
#define sys_be32_to_cpu(val) __bswap_32(val)
|
||||||
|
#define sys_cpu_to_be32(val) __bswap_32(val)
|
||||||
|
#define sys_be64_to_cpu(val) __bswap_64(val)
|
||||||
|
#define sys_cpu_to_be64(val) __bswap_64(val)
|
||||||
|
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
|
#define sys_le16_to_cpu(val) __bswap_16(val)
|
||||||
|
#define sys_cpu_to_le16(val) __bswap_16(val)
|
||||||
|
#define sys_be16_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_be16(val) (val)
|
||||||
|
#define sys_le32_to_cpu(val) __bswap_32(val)
|
||||||
|
#define sys_cpu_to_le32(val) __bswap_32(val)
|
||||||
|
#define sys_le64_to_cpu(val) __bswap_64(val)
|
||||||
|
#define sys_cpu_to_le64(val) __bswap_64(val)
|
||||||
|
#define sys_be32_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_be32(val) (val)
|
||||||
|
#define sys_be64_to_cpu(val) (val)
|
||||||
|
#define sys_cpu_to_be64(val) (val)
|
||||||
|
#else
|
||||||
|
#error "Unknown byte order"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Put a 16-bit integer as big-endian to arbitrary location.
|
||||||
|
*
|
||||||
|
* Put a 16-bit integer, originally in host endianness, to a
|
||||||
|
* potentially unaligned memory location in big-endian format.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in host endianness.
|
||||||
|
* @param dst Destination memory address to store the result.
|
||||||
|
*/
|
||||||
|
static inline void sys_put_be16(u16_t val, u8_t dst[2])
|
||||||
|
{
|
||||||
|
dst[0] = val >> 8;
|
||||||
|
dst[1] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Put a 32-bit integer as big-endian to arbitrary location.
|
||||||
|
*
|
||||||
|
* Put a 32-bit integer, originally in host endianness, to a
|
||||||
|
* potentially unaligned memory location in big-endian format.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in host endianness.
|
||||||
|
* @param dst Destination memory address to store the result.
|
||||||
|
*/
|
||||||
|
static inline void sys_put_be32(u32_t val, u8_t dst[4])
|
||||||
|
{
|
||||||
|
sys_put_be16(val >> 16, dst);
|
||||||
|
sys_put_be16(val, &dst[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Put a 16-bit integer as little-endian to arbitrary location.
|
||||||
|
*
|
||||||
|
* Put a 16-bit integer, originally in host endianness, to a
|
||||||
|
* potentially unaligned memory location in little-endian format.
|
||||||
|
*
|
||||||
|
* @param val 16-bit integer in host endianness.
|
||||||
|
* @param dst Destination memory address to store the result.
|
||||||
|
*/
|
||||||
|
static inline void sys_put_le16(u16_t val, u8_t dst[2])
|
||||||
|
{
|
||||||
|
dst[0] = val;
|
||||||
|
dst[1] = val >> 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Put a 32-bit integer as little-endian to arbitrary location.
|
||||||
|
*
|
||||||
|
* Put a 32-bit integer, originally in host endianness, to a
|
||||||
|
* potentially unaligned memory location in little-endian format.
|
||||||
|
*
|
||||||
|
* @param val 32-bit integer in host endianness.
|
||||||
|
* @param dst Destination memory address to store the result.
|
||||||
|
*/
|
||||||
|
static inline void sys_put_le32(u32_t val, u8_t dst[4])
|
||||||
|
{
|
||||||
|
sys_put_le16(val, dst);
|
||||||
|
sys_put_le16(val >> 16, &dst[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Put a 64-bit integer as little-endian to arbitrary location.
|
||||||
|
*
|
||||||
|
* Put a 64-bit integer, originally in host endianness, to a
|
||||||
|
* potentially unaligned memory location in little-endian format.
|
||||||
|
*
|
||||||
|
* @param val 64-bit integer in host endianness.
|
||||||
|
* @param dst Destination memory address to store the result.
|
||||||
|
*/
|
||||||
|
static inline void sys_put_le64(u64_t val, u8_t dst[8])
|
||||||
|
{
|
||||||
|
sys_put_le32(val, dst);
|
||||||
|
sys_put_le32(val >> 32, &dst[4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a 16-bit integer stored in big-endian format.
|
||||||
|
*
|
||||||
|
* Get a 16-bit integer, stored in big-endian format in a potentially
|
||||||
|
* unaligned memory location, and convert it to the host endianness.
|
||||||
|
*
|
||||||
|
* @param src Location of the big-endian 16-bit integer to get.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
static inline u16_t sys_get_be16(const u8_t src[2])
|
||||||
|
{
|
||||||
|
return ((u16_t)src[0] << 8) | src[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a 32-bit integer stored in big-endian format.
|
||||||
|
*
|
||||||
|
* Get a 32-bit integer, stored in big-endian format in a potentially
|
||||||
|
* unaligned memory location, and convert it to the host endianness.
|
||||||
|
*
|
||||||
|
* @param src Location of the big-endian 32-bit integer to get.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
static inline u32_t sys_get_be32(const u8_t src[4])
|
||||||
|
{
|
||||||
|
return ((u32_t)sys_get_be16(&src[0]) << 16) | sys_get_be16(&src[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a 16-bit integer stored in little-endian format.
|
||||||
|
*
|
||||||
|
* Get a 16-bit integer, stored in little-endian format in a potentially
|
||||||
|
* unaligned memory location, and convert it to the host endianness.
|
||||||
|
*
|
||||||
|
* @param src Location of the little-endian 16-bit integer to get.
|
||||||
|
*
|
||||||
|
* @return 16-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
static inline u16_t sys_get_le16(const u8_t src[2])
|
||||||
|
{
|
||||||
|
return ((u16_t)src[1] << 8) | src[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a 32-bit integer stored in little-endian format.
|
||||||
|
*
|
||||||
|
* Get a 32-bit integer, stored in little-endian format in a potentially
|
||||||
|
* unaligned memory location, and convert it to the host endianness.
|
||||||
|
*
|
||||||
|
* @param src Location of the little-endian 32-bit integer to get.
|
||||||
|
*
|
||||||
|
* @return 32-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
static inline u32_t sys_get_le32(const u8_t src[4])
|
||||||
|
{
|
||||||
|
return ((u32_t)sys_get_le16(&src[2]) << 16) | sys_get_le16(&src[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a 64-bit integer stored in little-endian format.
|
||||||
|
*
|
||||||
|
* Get a 64-bit integer, stored in little-endian format in a potentially
|
||||||
|
* unaligned memory location, and convert it to the host endianness.
|
||||||
|
*
|
||||||
|
* @param src Location of the little-endian 64-bit integer to get.
|
||||||
|
*
|
||||||
|
* @return 64-bit integer in host endianness.
|
||||||
|
*/
|
||||||
|
static inline u64_t sys_get_le64(const u8_t src[8])
|
||||||
|
{
|
||||||
|
return ((u64_t)sys_get_le32(&src[4]) << 32) | sys_get_le32(&src[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Swap one buffer content into another
|
||||||
|
*
|
||||||
|
* Copy the content of src buffer into dst buffer in reversed order,
|
||||||
|
* i.e.: src[n] will be put in dst[end-n]
|
||||||
|
* Where n is an index and 'end' the last index in both arrays.
|
||||||
|
* The 2 memory pointers must be pointing to different areas, and have
|
||||||
|
* a minimum size of given length.
|
||||||
|
*
|
||||||
|
* @param dst A valid pointer on a memory area where to copy the data in
|
||||||
|
* @param src A valid pointer on a memory area where to copy the data from
|
||||||
|
* @param length Size of both dst and src memory areas
|
||||||
|
*/
|
||||||
|
static inline void sys_memcpy_swap(void *dst, const void *src, size_t length)
|
||||||
|
{
|
||||||
|
u8_t *pdst = (u8_t *)dst;
|
||||||
|
const u8_t *psrc = (const u8_t *)src;
|
||||||
|
|
||||||
|
__ASSERT(((psrc < pdst && (psrc + length) <= pdst) ||
|
||||||
|
(psrc > pdst && (pdst + length) <= psrc)),
|
||||||
|
"Source and destination buffers must not overlap");
|
||||||
|
|
||||||
|
psrc += length - 1;
|
||||||
|
|
||||||
|
for (; length > 0; length--) {
|
||||||
|
*pdst++ = *psrc--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Swap buffer content
|
||||||
|
*
|
||||||
|
* In-place memory swap, where final content will be reversed.
|
||||||
|
* I.e.: buf[n] will be put in buf[end-n]
|
||||||
|
* Where n is an index and 'end' the last index of buf.
|
||||||
|
*
|
||||||
|
* @param buf A valid pointer on a memory area to swap
|
||||||
|
* @param length Size of buf memory area
|
||||||
|
*/
|
||||||
|
static inline void sys_mem_swap(void *buf, size_t length)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < (length/2); i++) {
|
||||||
|
u8_t tmp = ((u8_t *)buf)[i];
|
||||||
|
|
||||||
|
((u8_t *)buf)[i] = ((u8_t *)buf)[length - 1 - i];
|
||||||
|
((u8_t *)buf)[length - 1 - i] = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ZEPHYR_INCLUDE_SYS_BYTEORDER_H_ */
|
|
@ -17,7 +17,7 @@
|
||||||
#include <bluetooth/conn.h>
|
#include <bluetooth/conn.h>
|
||||||
#include <bluetooth/uuid.h>
|
#include <bluetooth/uuid.h>
|
||||||
#include <bluetooth/gatt.h>
|
#include <bluetooth/gatt.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
static struct bt_conn *default_conn;
|
static struct bt_conn *default_conn;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <bluetooth/conn.h>
|
#include <bluetooth/conn.h>
|
||||||
#include <bluetooth/uuid.h>
|
#include <bluetooth/uuid.h>
|
||||||
#include <bluetooth/gatt.h>
|
#include <bluetooth/gatt.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
static struct bt_conn *default_conn;
|
static struct bt_conn *default_conn;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <settings/settings.h>
|
#include <settings/settings.h>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <settings/settings.h>
|
#include <settings/settings.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/ipm.h>
|
#include <drivers/ipm.h>
|
||||||
#include <ipm/ipm_quark_se.h>
|
#include <ipm/ipm_quark_se.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <drivers/sensor.h>
|
#include <drivers/sensor.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <settings/settings.h>
|
#include <settings/settings.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <nrf.h>
|
#include <nrf.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@ LOG_MODULE_REGISTER(net_coap_client_sample, LOG_LEVEL_DBG);
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <net/socket.h>
|
#include <net/socket.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@ LOG_MODULE_REGISTER(net_coap_server_sample, LOG_LEVEL_DBG);
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#include <net/socket.h>
|
#include <net/socket.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <drivers/uart.h>
|
#include <drivers/uart.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#define BUF_MAXSIZE 256
|
#define BUF_MAXSIZE 256
|
||||||
#define SLEEP_TIME 500
|
#define SLEEP_TIME 500
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(main);
|
LOG_MODULE_REGISTER(main);
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <usb/usb_common.h>
|
#include <usb/usb_common.h>
|
||||||
#include <usb/usb_device.h>
|
#include <usb/usb_device.h>
|
||||||
#include <usb/bos.h>
|
#include <usb/bos.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(webusb);
|
LOG_MODULE_REGISTER(webusb);
|
||||||
|
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <usb/usb_device.h>
|
#include <usb/usb_device.h>
|
||||||
#include <usb/usb_common.h>
|
#include <usb/usb_common.h>
|
||||||
#include <usb_descriptor.h>
|
#include <usb_descriptor.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
|
|
||||||
#include <tinycrypt/constants.h>
|
#include <tinycrypt/constants.h>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <bluetooth/buf.h>
|
#include <bluetooth/buf.h>
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#include <drivers/bluetooth/hci_driver.h>
|
#include <drivers/bluetooth/hci_driver.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#include "util/util.h"
|
#include "util/util.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <drivers/clock_control.h>
|
#include <drivers/clock_control.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "ll.h"
|
#include "ll.h"
|
||||||
#include "ll_feat.h"
|
#include "ll_feat.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
||||||
#include "util/util.h"
|
#include "util/util.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <zephyr/types.h>
|
#include <zephyr/types.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "hal/ccm.h"
|
#include "hal/ccm.h"
|
||||||
#include "hal/radio.h"
|
#include "hal/radio.h"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <drivers/entropy.h>
|
#include <drivers/entropy.h>
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "hal/ecb.h"
|
#include "hal/ecb.h"
|
||||||
#include "hal/ccm.h"
|
#include "hal/ccm.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
||||||
#include "hal/ccm.h"
|
#include "hal/ccm.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "util/util.h"
|
#include "util/util.h"
|
||||||
#include "util/memq.h"
|
#include "util/memq.h"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include "util/util.h"
|
#include "util/util.h"
|
||||||
#include "util/memq.h"
|
#include "util/memq.h"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/slist.h>
|
#include <misc/slist.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
|
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
#include <settings/settings.h>
|
#include <settings/settings.h>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
#include <misc/slist.h>
|
#include <misc/slist.h>
|
||||||
#include <misc/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <misc/stack.h>
|
#include <misc/stack.h>
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue