c++: Add extern "C" { } block to header files
Adds extern "C" { } blocks to header files so that they can be safely used by C++ source files. Change-Id: Ia4db0c36a5dac5d3de351184a297d2af0df64532 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
6504b7e72a
commit
a0e4568760
128 changed files with 1035 additions and 3 deletions
|
@ -24,6 +24,10 @@
|
|||
#include <toolchain.h>
|
||||
#include <arch/cpu.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
/* entering this macro, current is in r2 */
|
||||
|
@ -159,4 +163,9 @@
|
|||
.endm
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SWAP_MACROS__H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <arch/cpu.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#define CACHE_ENABLE 0x00
|
||||
|
@ -49,4 +53,9 @@ static ALWAYS_INLINE void _icache_setup(void)
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCV2_CACHE__H_ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef _ARCV2_IRQ__H_
|
||||
#define _ARCV2_IRQ__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _ARC_V2_AUX_IRQ_CTRL_BLINK (1 << 9)
|
||||
#define _ARC_V2_AUX_IRQ_CTRL_LOOP_REGS (1 << 10)
|
||||
#define _ARC_V2_AUX_IRQ_CTRL_14_REGS 7
|
||||
|
@ -60,4 +64,9 @@ static ALWAYS_INLINE void _irq_setup(void)
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCV2_IRQ__H_ */
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#ifndef _VECTOR_TABLE__H_
|
||||
#define _VECTOR_TABLE__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EXC_EV_TRAP 0x9
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
@ -79,4 +83,8 @@ extern void __ev_maligned(void);
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _VECTOR_TABLE__H_ */
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#ifndef _VECTOR_TABLE__H_
|
||||
#define _VECTOR_TABLE__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
#include <board.h>
|
||||
|
@ -61,4 +65,8 @@ GTEXT(_isr_wrapper)
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _VECTOR_TABLE__H_ */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef _ASM_INLINE_GCC_H
|
||||
#define _ASM_INLINE_GCC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The file must not be included directly
|
||||
* Include asm_inline.h instead
|
||||
|
@ -57,4 +61,9 @@ static ALWAYS_INLINE void _MspSet(uint32_t msp /* value to store in MSP */
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_INLINE_GCC_H */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <asm_inline.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
/* nothing */
|
||||
|
@ -80,4 +84,9 @@ static ALWAYS_INLINE void _ExcSetup(void)
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _ARM_CORTEXM_ISR__H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <nano_private.h>
|
||||
#include <asm_inline.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STACK_ALIGN_DOUBLE_WORD
|
||||
#define STACK_ALIGN_SIZE 8
|
||||
#else
|
||||
|
@ -62,4 +66,8 @@ static ALWAYS_INLINE void _InterruptStackSetup(void)
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARM_CORTEXM_STACK__H_ */
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
#ifndef __KERNEL_EVENT_LOGGER_ARCH_H__
|
||||
#define __KERNEL_EVENT_LOGGER_ARCH_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get the identification of the current interrupt.
|
||||
*
|
||||
|
@ -35,4 +39,8 @@ int _sys_current_irq_key_get(void)
|
|||
return _IpsrGet();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL_EVENT_LOGGER_ARCH_H__ */
|
||||
|
|
|
@ -33,8 +33,16 @@
|
|||
#include <nano_private.h>
|
||||
#include <microkernel/task.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _START_TASK_ARCH(task, opt_ptr) \
|
||||
do {/* nothing */ \
|
||||
} while ((0))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _START_TASK_ARCH__H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <misc/util.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* default system clock */
|
||||
|
||||
#define SYSCLK_DEFAULT_IOSC_HZ MHZ(120)
|
||||
|
@ -163,4 +167,8 @@
|
|||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SOC__H_ */
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _SCP_OSC_SOURCE_MAIN 0
|
||||
#define _SCP_OSC_SOURCE_INTERNAL 1
|
||||
#define _SCP_OSC_SOURCE_INTERNAL_DIV4 2
|
||||
|
@ -162,4 +166,9 @@ struct __scp {
|
|||
};
|
||||
|
||||
extern volatile struct __scp __scp;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SCP_H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <misc/util.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* default system clock */
|
||||
|
||||
#define SYSCLK_DEFAULT_IOSC_HZ MHZ(12)
|
||||
|
@ -90,4 +94,8 @@
|
|||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BOARD__H_ */
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
#ifndef __INCadvidle
|
||||
#define __INCadvidle
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADVANCED_IDLE
|
||||
|
||||
/**
|
||||
|
@ -74,4 +78,8 @@ extern int _AdvIdleFunc(int32_t ticks);
|
|||
|
||||
#endif /* CONFIG_ADVANCED_IDLE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCadvidle */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef _ASM_INLINE_GCC_H
|
||||
#define _ASM_INLINE_GCC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The file must not be included directly
|
||||
* Include asm_inline.h instead
|
||||
|
@ -136,4 +140,9 @@ static inline void _do_fp_ctx_init(int flags)
|
|||
#endif /* CONFIG_FP_SHARING */
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_INLINE_GCC_H */
|
||||
|
|
|
@ -19,8 +19,16 @@
|
|||
|
||||
#include <cache.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int _is_clflush_available(void);
|
||||
extern void _cache_flush_wbinvd(vaddr_t, size_t);
|
||||
extern size_t _cache_line_size_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _cache_private__h_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <arch/x86/arch.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -63,4 +67,9 @@ extern tGdtHeader _gdt; /* GDT is implemented in arch/x86/core/gdt.c */
|
|||
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GDT_H */
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
#define _IDTENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern"C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
|
||||
#include <drivers/loapic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get the identification of the current interrupt.
|
||||
*
|
||||
|
@ -37,4 +41,8 @@ static inline int _sys_current_irq_key_get(void)
|
|||
return _loapic_isr_vector_get();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL_EVENT_LOGGER_ARCH_H__ */
|
||||
|
|
|
@ -31,8 +31,16 @@
|
|||
#include <nano_private.h>
|
||||
#include <microkernel/task.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void _StartTaskArch(struct k_task *, unsigned int *);
|
||||
|
||||
#define _START_TASK_ARCH(task, opt_ptr) _StartTaskArch(task, opt_ptr)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _START_TASK_ARCH__H_ */
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#ifndef _SWAPSTK_H
|
||||
#define _SWAPSTK_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
/* Stack of a saved context */
|
||||
|
@ -45,4 +49,8 @@ typedef struct s_SwapStk {
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SWAPSTK_H */
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
#endif
|
||||
#endif /* CONFIG_IOAPIC */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NUM_STD_IRQS 16 /* number of "standard" IRQs on an x86 platform */
|
||||
#define INT_VEC_IRQ0 0x20 /* Vector number for IRQ0 */
|
||||
|
||||
|
@ -117,4 +121,8 @@ static inline int pci_irq2pin(int irq)
|
|||
return irq - NUM_STD_IRQS + 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SOC_H_ */
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
#include <stdint.h>
|
||||
#include <adc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ADC driver name.
|
||||
*
|
||||
|
@ -212,4 +216,8 @@ struct adc_info {
|
|||
*/
|
||||
int adc_dw_init(struct device *dev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DW_ADC_H_ */
|
||||
|
|
|
@ -23,9 +23,12 @@
|
|||
|
||||
#include <misc/byteorder.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Internal return code */
|
||||
#define ADC108S102_DONE (-1)
|
||||
|
||||
/* 8 chans maximum + 1 dummy, 16 bits per-chans -> 18 bytes */
|
||||
#define ADC108S102_CMD_BUFFER_SIZE 9
|
||||
/* 1 dummy + 8 results maximum, 16 bits per-chans -> 18 bytes */
|
||||
|
@ -60,4 +63,8 @@ struct ti_adc108s102_data {
|
|||
struct adc_seq_table *seq_table;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ADC108S102_PRIV_H__ */
|
||||
|
|
|
@ -16,4 +16,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void bt_uart_isr(void *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include "contiki/ip/uip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*eth_config_irq_t)(struct device *port);
|
||||
|
||||
struct eth_config {
|
||||
|
@ -192,4 +196,8 @@ struct eth_runtime {
|
|||
#define REG_ADDR_DMA_OPERATION 0x1018
|
||||
#define REG_ADDR_INT_ENABLE 0x101C
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DRIVERS_ETHERNET_ETH_DW_PRIV_H_ */
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#include <pci/pci_mgr.h>
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int gpio_dw_initialize(struct device *port);
|
||||
typedef void (*gpio_config_irq_t)(struct device *port);
|
||||
|
||||
|
@ -52,3 +56,8 @@ struct gpio_dw_runtime {
|
|||
uint32_t enabled_callbacks;
|
||||
uint8_t port_callback;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
|
||||
#include <gpio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For enable register:
|
||||
* NORMAL: 0 - disable, 1 - enable
|
||||
* INV: 0 - enable, 1 - disable
|
||||
|
@ -79,4 +83,8 @@ struct gpio_mmio_config {
|
|||
} access;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GPIO_MMIO_H_ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <gpio.h>
|
||||
#include <i2c.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialization function for PCAL9535A
|
||||
*
|
||||
|
@ -73,4 +77,8 @@ struct gpio_pcal9535a_drv_data {
|
|||
} reg_cache;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GPIO_PCAL9535A_H_ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <pci/pci_mgr.h>
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define I2C_DW_MAGIC_KEY 0x44570140
|
||||
|
||||
|
||||
|
@ -123,4 +127,8 @@ struct i2c_dw_dev_config {
|
|||
uint16_t lcnt;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVERS_I2C_DW_H */
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
#ifndef __DRIVERS_I2C_DW_REGISTERS_H
|
||||
#define __DRIVERS_I2C_DW_REGISTERS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* IC_CON bits */
|
||||
#define IC_CON_TX_INTR_MODE (1 << 8)
|
||||
|
@ -260,4 +263,8 @@ struct i2c_dw_registers {
|
|||
uint32_t ic_comp_type; /* offset 0xFC */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVERS_I2C_DW_REGISTERS_H */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#include <i2c.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* dev->state values from IC_DATA_CMD Data transfer mode settings (bit 8) */
|
||||
#define I2C_QSE_SS_STATE_READY (0)
|
||||
#define I2C_QSE_SS_CMD_SEND (1 << 0)
|
||||
|
@ -73,4 +77,8 @@ struct i2c_qse_ss_dev_config {
|
|||
uint16_t lcnt;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVERS_I2C_QUARK_SE_SS_H__ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <device.h>
|
||||
#include <init.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define QUARK_SE_IPM_OUTBOUND 0
|
||||
#define QUARK_SE_IPM_INBOUND 1
|
||||
|
||||
|
@ -139,5 +143,8 @@ int quark_se_ipm_controller_initialize(struct device *d);
|
|||
SYS_DEFINE_DEVICE(name, &quark_se_ipm_runtime_##name, SECONDARY, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCquark_se_mailboxh */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#include <stdint.h>
|
||||
#include <device.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pin_config {
|
||||
uint8_t pin_num;
|
||||
uint8_t mode;
|
||||
|
@ -32,4 +36,8 @@ struct pinmux_config {
|
|||
|
||||
extern int pinmux_initialize(struct device *port);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DRIVERS_PINMUX_H */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#include <gpio.h>
|
||||
#include <i2c.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialization function for PCA9685
|
||||
*
|
||||
|
@ -47,4 +51,8 @@ struct pwm_pca9685_drv_data {
|
|||
struct device *i2c_master;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PWM_PCA9685_H__ */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#include <device.h>
|
||||
#include <rtc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RTC_CCVR (0x0)
|
||||
#define RTC_CMR (0x4)
|
||||
#define RTC_CLR (0x8)
|
||||
|
@ -58,4 +62,8 @@ struct rtc_dw_dev_config {
|
|||
|
||||
int rtc_dw_init(struct device *dev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RTC_DW_H_ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <stdint.h>
|
||||
#include <misc/__assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
union BDH {
|
||||
uint8_t value;
|
||||
struct {
|
||||
|
@ -251,4 +255,8 @@ static inline void _uart_k20_fifo_enable(volatile struct K20_UART *uart_p)
|
|||
uart_p->c2.value |= tx_rx_state;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K20UART_H_ */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
#include <spi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*spi_dw_config_t)(void);
|
||||
|
||||
/* Private structures */
|
||||
|
@ -166,4 +170,8 @@ struct spi_dw_data {
|
|||
DW_SPI_IMR_RXOIM | \
|
||||
DW_SPI_IMR_RXFIM))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __SPI_DW_H__ */
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#include <pci/pci.h>
|
||||
#include <pci/pci_mgr.h>
|
||||
#endif /* CONFIG_PCI */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*spi_intel_config_t)(void);
|
||||
|
||||
|
@ -114,5 +117,8 @@ struct spi_intel_data {
|
|||
/* DSS_RATE settings */
|
||||
#define INTEL_SPI_DSS_RATE(__msf) \
|
||||
((__msf & (INTEL_SPI_DDS_RATE_MASK)) >> 8)
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SPI_INTEL_PRIV_H__ */
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
#include <stdint.h>
|
||||
#include <device.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief ADC Interface
|
||||
* @defgroup adc_interface ADC Interface
|
||||
|
@ -139,4 +143,8 @@ static inline int adc_read(struct device *dev, struct adc_seq_table *seq_table)
|
|||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_ADC_H__ */
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#ifndef _AIO_COMPARATOR_H_
|
||||
#define _AIO_COMPARATOR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum aio_cmp_ref {
|
||||
AIO_CMP_REF_A, /**< Use reference A. */
|
||||
AIO_CMP_REF_B, /**< Use reference B. */
|
||||
|
@ -84,4 +88,8 @@ static inline int aio_cmp_configure(struct device *dev, uint8_t index,
|
|||
return api->configure(dev, index, polarity, refsel, cb, param);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _AIO_COMPARATOR_H_ */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef _ARC_V2_IRQ_UNIT__H
|
||||
#define _ARC_V2_IRQ_UNIT__H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* configuration flags for interrupt unit */
|
||||
|
||||
#define _ARC_V2_INT_DISABLE 0
|
||||
|
@ -107,4 +111,9 @@ void _arc_v2_irq_unit_int_eoi(int irq);
|
|||
void _arc_v2_irq_unit_init(void);
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARC_V2_IRQ_UNIT__H */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef __ASM_INLINE_GCC_H__
|
||||
#define __ASM_INLINE_GCC_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <sys_io.h>
|
||||
|
@ -266,4 +270,9 @@ static inline __attribute__((always_inline))
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_INLINE_GCC_H__ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef _ARC_V2_AUX_REGS__H_
|
||||
#define _ARC_V2_AUX_REGS__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _ARC_V2_LP_START 0x002
|
||||
#define _ARC_V2_LP_END 0x003
|
||||
#define _ARC_V2_STATUS32 0x00a
|
||||
|
@ -104,4 +108,8 @@
|
|||
#endif /* __GNUC__ */
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARC_V2_AUX_REGS__H_ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <arch/arc/v2/exc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <toolchain/gcc.h>
|
||||
extern FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int,
|
||||
|
@ -38,4 +42,9 @@ extern void _SysFatalErrorHandler(unsigned int cause, const NANO_ESF *esf);
|
|||
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
||||
#define _NANO_ERR_ALLOCATION_FAIL (3) /* Kernel Allocation Failure */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _ARCH_ARC_V2_ERROR_H_ */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _ARCH_ARC_V2_EXC_H_
|
||||
#define _ARCH_ARC_V2_EXC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
#else
|
||||
struct __esf {
|
||||
|
@ -35,4 +39,9 @@ typedef struct __esf NANO_ESF;
|
|||
extern const NANO_ESF _default_esf;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _ARCH_ARC_V2_EXC_H_ */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _ARCH_ARC_V2_FFS_H_
|
||||
#define _ARCH_ARC_V2_FFS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -89,4 +93,8 @@ static ALWAYS_INLINE unsigned int find_lsb_set(uint32_t op)
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARC_V2_FFS_H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <arch/arc/v2/aux_regs.h>
|
||||
#include <toolchain/common.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
GTEXT(_irq_exit);
|
||||
GTEXT(irq_connect)
|
||||
|
@ -103,4 +107,9 @@ static ALWAYS_INLINE void irq_unlock(unsigned int key)
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARC_V2_IRQ__H_ */
|
||||
|
|
|
@ -24,10 +24,18 @@
|
|||
#ifndef _ARCH_ARC_V2_MISC_H_
|
||||
#define _ARCH_ARC_V2_MISC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern unsigned int nano_cpu_sleep_mode;
|
||||
extern void nano_cpu_idle(void);
|
||||
extern void nano_cpu_atomic_idle(unsigned int key);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARC_V2_MISC_H_ */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#ifndef _ASM_INLINE_GCC_PUBLIC_GCC_H
|
||||
#define _ASM_INLINE_GCC_PUBLIC_GCC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The file must not be included directly
|
||||
* Include arch/cpu.h instead
|
||||
|
@ -170,4 +174,9 @@ static ALWAYS_INLINE void irq_unlock(unsigned int key)
|
|||
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_INLINE_GCC_PUBLIC_GCC_H */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <arch/arm/cortex_m/exc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int,
|
||||
const NANO_ESF*);
|
||||
|
@ -37,4 +41,8 @@ extern void _SysFatalErrorHandler(unsigned int, const NANO_ESF*);
|
|||
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
||||
#define _NANO_ERR_ALLOCATION_FAIL (3) /* Kernel Allocation Failure */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARM_CORTEXM_ERROR_H_ */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _ARCH_ARM_CORTEXM_EXC_H_
|
||||
#define _ARCH_ARM_CORTEXM_EXC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
GTEXT(_ExcExit);
|
||||
#else
|
||||
|
@ -47,4 +51,8 @@ extern const NANO_ESF _default_esf;
|
|||
extern void _ExcExit(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARM_CORTEXM_EXC_H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#ifndef _GDB_STUB__H_
|
||||
#define _GDB_STUB__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
#if CONFIG_GDB_INFO
|
||||
|
@ -58,4 +62,9 @@ GTEXT(_irq_vector_table_entry_with_gdb_stub)
|
|||
#else
|
||||
extern void _irq_vector_table_entry_with_gdb_stub(void);
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GDB_STUB__H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
#include <arch/arm/cortex_m/nvic.h>
|
||||
#include <sw_isr_table.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
GTEXT(_IntExit);
|
||||
GTEXT(irq_connect_dynamic)
|
||||
|
@ -98,4 +102,8 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARM_CORTEXM_IRQ_H_ */
|
||||
|
|
|
@ -24,8 +24,16 @@
|
|||
#ifndef _ARCH_ARM_CORTEXM_MISC_H_
|
||||
#define _ARCH_ARM_CORTEXM_MISC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern void nano_cpu_idle(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARM_CORTEXM_MISC_H_ */
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
|
||||
#include <arch/arm/cortex_m/scs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* for assembler, only works with constants */
|
||||
#define _EXC_PRIO(pri) (((pri) << (8 - CONFIG_NUM_IRQ_PRIO_BITS)) & 0xff)
|
||||
#if defined(CONFIG_ZERO_LATENCY_IRQS)
|
||||
|
@ -221,4 +225,8 @@ static inline void _NvicSwInterruptTrigger(unsigned int irq)
|
|||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NVIC_H_ */
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
#ifndef _SCB__H_
|
||||
#define _SCB__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
/* needed by nano_cpu_atomic_idle() written in asm */
|
||||
|
@ -1203,4 +1207,8 @@ static inline void _ScbUsageFaultAllFaultsReset(void)
|
|||
}
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SCB__H_ */
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
#ifndef _SCS__H_
|
||||
#define _SCS__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
#include <arch/arm/cortex_m/memory_map.h>
|
||||
|
@ -557,4 +561,8 @@ static inline void _scs_relocate_vector_table(void *new_addr)
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SCS__H_ */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include <arch/x86/addr_types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* APIs need to support non-byte addressable architectures */
|
||||
|
||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
||||
|
@ -539,4 +543,8 @@ extern void _IntVecMarkFree(unsigned int vector);
|
|||
#define SYS_X86_RST_CNT_CPU_RST 0x4
|
||||
#define SYS_X86_RST_CNT_FULL_RST 0x08
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_IFACE_H */
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
|
||||
#include <sys_io.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
@ -482,4 +486,9 @@ static inline __attribute__((always_inline))
|
|||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_INLINE_GCC_PUBLIC_GCC_H */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <bluetooth/hci.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @brief Callback for notifying that Bluetooth has been enabled.
|
||||
*
|
||||
* @param err zero on success or (negative) error code otherwise.
|
||||
|
@ -319,4 +323,9 @@ int bt_br_set_discoverable(bool enable);
|
|||
*/
|
||||
int bt_br_set_connectable(bool enable);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_BLUETOOTH_H */
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef __BT_CONN_H
|
||||
#define __BT_CONN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CENTRAL) || defined(CONFIG_BLUETOOTH_PERIPHERAL)
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -350,4 +354,8 @@ int bt_conn_auth_pincode_entry(struct bt_conn *conn, const char *pin);
|
|||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
#endif /* CONFIG_BLUETOOTH_SMP || CONFIG_BLUETOOTH_BREDR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_CONN_H */
|
||||
|
|
|
@ -35,6 +35,10 @@ struct net_buf *bt_buf_get_evt(void);
|
|||
/* Allocate a buffer for incoming ACL data */
|
||||
struct net_buf *bt_buf_get_acl(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Receive data from the controller/HCI driver */
|
||||
void bt_recv(struct net_buf *buf);
|
||||
|
||||
|
@ -52,4 +56,8 @@ int bt_driver_register(struct bt_driver *drv);
|
|||
/* Unregister a previously registered HCI driver */
|
||||
void bt_driver_unregister(struct bt_driver *drv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_DRIVER_H */
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef __BT_GATT_H
|
||||
#define __BT_GATT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CENTRAL) || defined(CONFIG_BLUETOOTH_PERIPHERAL)
|
||||
#include <stddef.h>
|
||||
#include <misc/util.h>
|
||||
|
@ -906,4 +910,9 @@ int bt_gatt_read_multiple(struct bt_conn *conn, const uint16_t *handles,
|
|||
|
||||
#endif /* CONFIG_BLUETOOTH_GATT_CLIENT */
|
||||
#endif /* CONFIG_BLUETOOTH_CENTRAL || CONFIG_BLUETOOTH_PERIPHERAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_GATT_H */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#include <toolchain.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BT_ADDR_LE_PUBLIC 0x00
|
||||
#define BT_ADDR_LE_RANDOM 0x01
|
||||
|
||||
|
@ -576,4 +580,8 @@ struct bt_hci_evt_le_generate_dhkey_complete {
|
|||
uint8_t dhkey[32];
|
||||
} __packed;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_HCI_H */
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#ifndef __BT_L2CAP_H
|
||||
#define __BT_L2CAP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CENTRAL) || defined(CONFIG_BLUETOOTH_PERIPHERAL)
|
||||
#include <net/buf.h>
|
||||
#include <bluetooth/conn.h>
|
||||
|
@ -151,4 +155,9 @@ int bt_l2cap_chan_send(struct bt_l2cap_chan *chan, struct net_buf *buf);
|
|||
|
||||
#endif /* CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL */
|
||||
#endif /* CONFIG_BLUETOOTH_CENTRAL || CONFIG_BLUETOOTH_PERIPHERAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_L2CAP_H */
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_DEBUG_COLOR)
|
||||
#define BT_COLOR_OFF "\x1B[0m"
|
||||
#define BT_COLOR_RED "\x1B[0;31m"
|
||||
|
@ -59,4 +63,8 @@
|
|||
#define BT_STACK_NOINIT(name, size) \
|
||||
char __noinit __stack name[(size) + BT_STACK_DEBUG_EXTRA]
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_LOG_H */
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef __BT_UUID_H
|
||||
#define __BT_UUID_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @def BBT_UUID_GAP
|
||||
* @brief Generic Access
|
||||
*/
|
||||
|
@ -233,4 +237,8 @@ void bt_uuid_to_str(const struct bt_uuid *uuid, char *str, size_t len);
|
|||
const char *bt_uuid_str(const struct bt_uuid *uuid);
|
||||
#endif /* CONFIG_BLUETOOTH_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BT_UUID_H */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
|
||||
#include <nanokernel.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CACHE_FLUSHING)
|
||||
#define _sys_cache_flush_sig(x) void (x)(vaddr_t virt, size_t size)
|
||||
|
||||
|
@ -36,4 +40,8 @@
|
|||
#define sys_cache_line_size CONFIG_CACHE_LINE_SIZE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _cache__h_ */
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
#ifndef _DEVICE_H_
|
||||
#define _DEVICE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @def DECLARE_DEVICE_INIT_CONFIG
|
||||
*
|
||||
* @brief Define an config object
|
||||
|
@ -190,4 +194,8 @@ static inline void synchronous_call_complete(device_sync_call_t *sync)
|
|||
|
||||
#endif /* CONFIG_MICROKERNEL || CONFIG_NANOKERNEL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DEVICE_H_ */
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
#ifndef DISPLAY_GROVE_LCD_H
|
||||
#define DISPLAY_GROVE_LCD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GROVE_LCD_NAME "GLCD"
|
||||
|
||||
/**
|
||||
|
@ -162,4 +166,8 @@ void glcd_color_set(struct device *port, uint8_t r, uint8_t g, uint8_t b);
|
|||
*/
|
||||
int glcd_initialize(struct device *port);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DISPLAY_GROVE_LCD_H */
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#include <device.h>
|
||||
#include <misc/ring_buffer.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IPM_CONSOLE_STDOUT (1 << 0)
|
||||
#define IPM_CONSOLE_PRINTK (1 << 1)
|
||||
|
||||
|
@ -99,4 +103,8 @@ int ipm_console_receiver_init(struct device *d);
|
|||
int ipm_console_sender_init(struct device *d);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _IPM_CONSOLE_H_ */
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @brief Received data callback.
|
||||
*
|
||||
* This function is called when new data is received on UART. The off parameter
|
||||
|
@ -66,3 +70,7 @@ int uart_pipe_send(const uint8_t *data, int len);
|
|||
* @param unused unused
|
||||
*/
|
||||
void uart_pipe_isr(void *unused);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* MCG - module register structure */
|
||||
typedef volatile struct
|
||||
{
|
||||
|
@ -204,4 +208,8 @@ typedef union {
|
|||
/* Control register fields */
|
||||
#define OSC_CR_EXT_CLK_EN 0x80
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K20MCG_H_ */
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PCR_PORT_A 0
|
||||
#define PCR_PORT_B 1
|
||||
#define PCR_PORT_C 2
|
||||
|
@ -88,4 +92,8 @@ struct K20_PORT_PCR {
|
|||
#define K20_PCR(base, port, pin) \
|
||||
((union K20_PCR *)(base + (0x1000 * port) + (pin * 4)))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K20PCR_H_ */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include <stdint.h>
|
||||
#include <misc/__assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SIM_OCS32K_SYS 0
|
||||
#define SIM_OCS32K_RTS 2
|
||||
#define SIM_OCS32K_LPO 3 /* 1kHz */
|
||||
|
@ -215,4 +219,8 @@ struct K20_SIM {
|
|||
uint8_t res104c_1063[0x1063 - 0x104c]; /* Reserved */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K20SIM_H_ */
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Sequence of writes within 20 bus cycles for action to take effect */
|
||||
#define WDOG_REFRESH_1 0xA602
|
||||
#define WDOG_REFRESH_2 0xB480
|
||||
|
@ -135,4 +139,8 @@ static ALWAYS_INLINE void wdog_disable(volatile struct K20_WDOG *wdog_p)
|
|||
wdog_p->stctrlh.value = stctrlh.value;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K20WDOG_H_ */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MPU_VALID_MASK 0x01
|
||||
#define MPU_SLV_PORT_ERR_MASK 0xF8
|
||||
|
||||
|
@ -68,4 +72,8 @@ struct K6x_MPU {
|
|||
uint32_t rgnDescAltAccCtrl[MPU_NUM_REGIONS]; /* 0x0800 */
|
||||
}; /* K6x Microntroller PMC module */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K6xMPU_H_ */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PMC_REGSC_ACKISO_MASK 0x08 /* ack I/O isolation (write to clear) */
|
||||
|
||||
union REGSC {
|
||||
|
@ -50,4 +54,8 @@ struct K6x_PMC {
|
|||
union REGSC regsc; /* 0x0002 */
|
||||
}; /* K6x Microntroller PMC module */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _K6xPMC_H_ */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _PCI_H_
|
||||
#define _PCI_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BAR_SPACE_MEM 0
|
||||
#define BAR_SPACE_IO 1
|
||||
|
||||
|
@ -77,4 +81,8 @@ extern void pci_show(struct pci_dev_info *dev_info);
|
|||
#define pci_show(__unused__) { ; }
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _PCI_H_ */
|
||||
|
|
|
@ -34,7 +34,15 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void sys_rand32_init(void);
|
||||
extern uint32_t sys_rand32_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCrand32h */
|
||||
|
|
|
@ -23,6 +23,14 @@
|
|||
|
||||
#include <uart.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void uart_nsim_port_init(struct device *, const struct uart_init_info * const);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DRIVERS_UART_NSIM_H_ */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef __SPI_INTEL_H__
|
||||
#define __SPI_INTEL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* SPI Maximum supported system frequencies */
|
||||
#define SPI_MAX_CLK_FREQ_25MHZ ((0x800000 << 8))
|
||||
#define SPI_MAX_CLK_FREQ_20MHz ((0x666666 << 8) | 1)
|
||||
|
@ -52,5 +56,8 @@
|
|||
#define SPI_MAX_CLK_FREQ_10KHZ ((0x20000 << 8) | 77)
|
||||
#define SPI_MAX_CLK_FREQ_5KHZ ((0x20000 << 8) | 154)
|
||||
#define SPI_MAX_CLK_FREQ_1KHZ ((0x8000 << 8) | 194)
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SPI_INTEL_H__ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef _TIMER__H_
|
||||
#define _TIMER__H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _ASMLANGUAGE
|
||||
|
||||
GTEXT(_timer_int_handler)
|
||||
|
@ -66,4 +70,8 @@ extern void _nano_sys_clock_tick_announce(int32_t ticks);
|
|||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TIMER__H_ */
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
#include <device.h>
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* System initialization levels. The PRIMARY and SECONDARY levels are
|
||||
* executed in the kernel's initialization context, which uses the interrupt
|
||||
|
@ -116,4 +120,8 @@
|
|||
*/
|
||||
#define SYS_GET_DEVICE(name) (&SYS_GET_DEVICE_NAME(name))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INIT_H_ */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include <nanokernel.h>
|
||||
#include <device.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Callback API for incoming IPM messages
|
||||
*
|
||||
|
@ -168,6 +172,10 @@ static inline int ipm_set_enabled(struct device *ipmdev, int enable)
|
|||
return api->set_enabled(ipmdev, enable);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef _IRQ_OFFLOAD_H_
|
||||
#define _IRQ_OFFLOAD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*irq_offload_routine_t)(void *parameter);
|
||||
|
||||
/**
|
||||
|
@ -36,4 +40,8 @@ typedef void (*irq_offload_routine_t)(void *parameter);
|
|||
*/
|
||||
void irq_offload(irq_offload_routine_t routine, void *parameter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SW_IRQ_H_ */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef _kernel_version__h_
|
||||
#define _kernel_version__h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The kernel version has been converted from a string to a four-byte
|
||||
* quantity that is divided into two parts.
|
||||
|
@ -40,4 +44,8 @@
|
|||
|
||||
extern uint32_t sys_kernel_version_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _kernel_version__h_ */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
#ifndef _MICROKERNEL_H
|
||||
#define _MICROKERNEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* nanokernel and generic kernel public APIs */
|
||||
|
||||
#include <nanokernel.h>
|
||||
|
@ -57,4 +61,8 @@
|
|||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MICROKERNEL_H */
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
#include <microkernel/base_api.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define INVALID_VECTOR 0xFFFFFFFF
|
||||
|
||||
/**
|
||||
|
@ -83,4 +87,9 @@ extern int task_irq_wait(kirq_t irq_obj, int32_t timeout);
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TASK_IRQ_H */
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Safe memory access routines
|
||||
|
@ -153,4 +157,8 @@ static inline int _mem_safe_region_add(void *addr, size_t num_bytes,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _debug__mem_safe__h_ */
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct _dnode {
|
||||
union {
|
||||
struct _dnode *head; /* ptr to head of list (sys_dlist_t) */
|
||||
|
@ -281,4 +285,8 @@ static inline sys_dnode_t *sys_dlist_get(sys_dlist_t *list)
|
|||
return node;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _misc_dlist__h_ */
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
#ifndef __EVENT_LOGGER_H__
|
||||
#define __EVENT_LOGGER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EVENT_HEADER_SIZE 1
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
@ -149,4 +153,9 @@ int sys_event_logger_get_wait_timeout(struct event_logger *logger,
|
|||
#endif /* CONFIG_NANO_TIMEOUTS */
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __EVENT_LOGGER_H__ */
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef __KERNEL_EVENT_LOGGER_H__
|
||||
#define __KERNEL_EVENT_LOGGER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_EVENT_LOGGER
|
||||
|
||||
#ifdef CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH
|
||||
|
@ -200,4 +204,8 @@ static inline void _sys_k_event_logger_enter_sleep(void) {};
|
|||
|
||||
#endif /* CONFIG_KERNEL_EVENT_LOGGER */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL_EVENT_LOGGER_H__ */
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Print kernel debugging message.
|
||||
|
@ -53,4 +57,8 @@ static inline void printk(const char *fmt, ...)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#ifndef _misc_reboot__h_
|
||||
#define _misc_reboot__h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SYS_REBOOT_WARM 0
|
||||
#define SYS_REBOOT_COLD 1
|
||||
|
||||
|
@ -40,4 +44,9 @@
|
|||
*/
|
||||
|
||||
extern void sys_reboot(int type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _misc_reboot__h_ */
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
#include <misc/util.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SIZE32_OF(x) (sizeof((x))/sizeof(uint32_t))
|
||||
|
||||
/**
|
||||
|
@ -165,4 +169,8 @@ int sys_ring_buf_put(struct ring_buf *buf, uint16_t type, uint8_t value,
|
|||
int sys_ring_buf_get(struct ring_buf *buf, uint16_t *type, uint8_t *value,
|
||||
uint32_t *data, uint8_t *size32);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __RING_BUFFER_H__ */
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @brief Callback called when command is entered.
|
||||
*
|
||||
* @param argc Number of parameters passed.
|
||||
|
@ -53,3 +57,8 @@ typedef const char *(*shell_prompt_function_t)(void);
|
|||
* @param handler To be called to get the current prompt.
|
||||
*/
|
||||
void shell_register_prompt_handler(shell_prompt_function_t handler);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
#include <misc/util.h>
|
||||
#include <nanokernel.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Alignment needed for various parts of the buffer definition */
|
||||
#define __net_buf_align __aligned(sizeof(int))
|
||||
|
||||
|
@ -250,4 +254,8 @@ size_t net_buf_headroom(struct net_buf *buf);
|
|||
*/
|
||||
#define net_buf_tail(buf) ((buf)->data + (buf)->len)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NET_BUF_H */
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#include "contiki/ip/uip.h"
|
||||
#include "contiki/packetbuf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NETWORKING_WITH_LOGGING
|
||||
#undef DEBUG_IP_BUFS
|
||||
#define DEBUG_IP_BUFS
|
||||
|
@ -374,4 +378,8 @@ static inline void net_analyze_stack(const char *name,
|
|||
#endif
|
||||
/* @endcond */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __IP_BUF_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