aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/lpc43xx
diff options
context:
space:
mode:
authorNicolas Schodet2012-09-02 17:12:58 +0200
committerNicolas Schodet2012-09-02 17:12:58 +0200
commit3aab6220d83d5b9fcd318e9d87225ff405cad783 (patch)
treeb61019429043b03b091ce00f84b312829abd0e94 /include/libopencm3/lpc43xx
parent11727f56c97fb3d007e0d08e59294b6791067bd1 (diff)
Add C linkage declaration for C++ usage
Diffstat (limited to 'include/libopencm3/lpc43xx')
-rw-r--r--include/libopencm3/lpc43xx/gpio.h4
-rw-r--r--include/libopencm3/lpc43xx/i2c.h4
-rw-r--r--include/libopencm3/lpc43xx/nvic.h4
-rw-r--r--include/libopencm3/lpc43xx/scu.h4
-rw-r--r--include/libopencm3/lpc43xx/ssp.h4
-rw-r--r--include/libopencm3/lpc43xx/systick.h4
6 files changed, 24 insertions, 0 deletions
diff --git a/include/libopencm3/lpc43xx/gpio.h b/include/libopencm3/lpc43xx/gpio.h
index 8abd546..daa21fd 100644
--- a/include/libopencm3/lpc43xx/gpio.h
+++ b/include/libopencm3/lpc43xx/gpio.h
@@ -153,8 +153,12 @@
//TODO interrupts
+BEGIN_DECLS
+
void gpio_set(u32 gpioport, u32 gpios);
void gpio_clear(u32 gpioport, u32 gpios);
void gpio_toggle(u32 gpioport, u32 gpios);
+END_DECLS
+
#endif
diff --git a/include/libopencm3/lpc43xx/i2c.h b/include/libopencm3/lpc43xx/i2c.h
index 249962c..b163af8 100644
--- a/include/libopencm3/lpc43xx/i2c.h
+++ b/include/libopencm3/lpc43xx/i2c.h
@@ -133,10 +133,14 @@
/* --- I2C funtion prototypes----------------------------------------------- */
+BEGIN_DECLS
+
void i2c0_init(void);
void i2c0_tx_start(void);
void i2c0_tx_byte(u8 byte);
u8 i2c0_rx_byte(void);
void i2c0_stop(void);
+END_DECLS
+
#endif
diff --git a/include/libopencm3/lpc43xx/nvic.h b/include/libopencm3/lpc43xx/nvic.h
index b996ab8..cdbf070 100644
--- a/include/libopencm3/lpc43xx/nvic.h
+++ b/include/libopencm3/lpc43xx/nvic.h
@@ -134,6 +134,8 @@
/* --- NVIC functions ------------------------------------------------------ */
+BEGIN_DECLS
+
void nvic_enable_irq(u8 irqn);
void nvic_disable_irq(u8 irqn);
u8 nvic_get_pending_irq(u8 irqn);
@@ -144,4 +146,6 @@ u8 nvic_get_irq_enabled(u8 irqn);
void nvic_set_priority(u8 irqn, u8 priority);
void nvic_generate_software_interrupt(u8 irqn);
+END_DECLS
+
#endif
diff --git a/include/libopencm3/lpc43xx/scu.h b/include/libopencm3/lpc43xx/scu.h
index 6e1be7f..c1b9fc2 100644
--- a/include/libopencm3/lpc43xx/scu.h
+++ b/include/libopencm3/lpc43xx/scu.h
@@ -725,6 +725,10 @@ typedef enum {
#define SCU_UART_RX_TX (SCU_CONF_EPUN_DIS_PULLUP | SCU_CONF_EPD_EN_PULLDOWN | SCU_CONF_EZI_EN_IN_BUFFER)
#define SCU_SSP_IO (SCU_CONF_EPUN_DIS_PULLUP | SCU_CONF_EHS_FAST | SCU_CONF_EZI_EN_IN_BUFFER | SCU_CONF_ZIF_DIS_IN_GLITCH_FILT)
+BEGIN_DECLS
+
void scu_pinmux(scu_grp_pin_t group_pin, u32 scu_conf);
+END_DECLS
+
#endif
diff --git a/include/libopencm3/lpc43xx/ssp.h b/include/libopencm3/lpc43xx/ssp.h
index ed69668..b3d95db 100644
--- a/include/libopencm3/lpc43xx/ssp.h
+++ b/include/libopencm3/lpc43xx/ssp.h
@@ -157,6 +157,8 @@ typedef enum {
SSP_SLAVE_OUT_DISABLE = BIT3
} ssp_slave_option_t; /* This option is relevant only in slave mode */
+BEGIN_DECLS
+
void ssp_disable(ssp_num_t ssp_num);
/*
@@ -178,4 +180,6 @@ u16 ssp_read(ssp_num_t ssp_num);
void ssp_write(ssp_num_t ssp_num, u16 data);
+END_DECLS
+
#endif
diff --git a/include/libopencm3/lpc43xx/systick.h b/include/libopencm3/lpc43xx/systick.h
index 9f8b38d..2ae52c2 100644
--- a/include/libopencm3/lpc43xx/systick.h
+++ b/include/libopencm3/lpc43xx/systick.h
@@ -70,6 +70,8 @@
/* --- Function Prototypes ------------------------------------------------- */
+BEGIN_DECLS
+
void systick_set_reload(u32 value);
u32 systick_get_value(void);
void systick_set_clocksource(u8 clocksource);
@@ -81,4 +83,6 @@ u8 systick_get_countflag(void);
u32 systick_get_calib(void);
+END_DECLS
+
#endif