Clean up and review of header files for conformance to standards

This commit is contained in:
Gregory Nutt
2015-06-12 19:00:52 -06:00
parent d6ce8220fd
commit 7bd3d5eaf1
52 changed files with 551 additions and 531 deletions

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/imx/imx_cspi.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -167,7 +167,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif /* __cplusplus */
@@ -195,10 +196,10 @@ extern "C" {
* for example, will bind the SPI driver to the SPI MMC/SD driver).
*/
EXTERN void imx_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN uint8_t imx_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void imx_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t imx_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
EXTERN int imx_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
int imx_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************
/**********************************************************************************************
* arch/arm/src/lpc31xx/lpc31_cgudrvr.h
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
@@ -35,14 +35,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************/
**********************************************************************************************/
#ifndef __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H
#define __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H
/************************************************************************
/**********************************************************************************************
* Included Files
************************************************************************/
**********************************************************************************************/
#include <nuttx/config.h>
@@ -52,9 +52,9 @@
#include "up_arch.h"
#include "lpc31_cgu.h"
/************************************************************************
/**********************************************************************************************
* Pre-processor Definitions
************************************************************************/
**********************************************************************************************/
/* Maps a valid, x, relative to a base value, b, and converts that to a bit position */
@@ -179,14 +179,15 @@
#define FDCNDX_INVALID -1 /* Indicates an invalid fractional
* divider index */
/************************************************************************
* Public Types
/**********************************************************************************************
* Public Types**********************
************************************************************************/
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -422,7 +423,7 @@ struct lpc31_subdomainconfig_s
uint32_t clkset; /* Bitset of all clocks in the sub-domain */
};
/* CGU clock initilization structure. Describes the platform-specific
/* CGU clock initialization structure. Describes the platform-specific
* configuration of every clock domain.
*/
@@ -524,35 +525,35 @@ struct lpc31_pllconfig_s
uint32_t mdec; /* PLL M-divider value: 0-0x1ffff */
};
/************************************************************************
/**********************************************************************************************
* Public Data
************************************************************************/
**********************************************************************************************/
/* This array is managed by the chip-specific logic and provides the
* programmed frequency of every input source
/* This array is managed by the chip-specific logic and provides the programmed frequency of
* every input source
*/
EXTERN uint32_t g_boardfreqin[CGU_NFREQIN];
/* This instance of the lpc31_clkinit_s structure provides the initial,
* default clock configuration for the board. Every board must provide
* an implementation of g_boardclks. This rather complex structure is
* used by the boot-up logic to configure initial lpc31xx clocking.
/* This instance of the lpc31_clkinit_s structure provides the initial, default clock
* configuration for the board. Every board must provide an implementation of g_boardclks.
* This rather complex structure is used by the boot-up logic to configure initial lpc31xx
* clocking.
*/
EXTERN const struct lpc31_clkinit_s g_boardclks;
/************************************************************************
/**********************************************************************************************
* Inline Functions
************************************************************************/
**********************************************************************************************/
/************************************************************************
/**********************************************************************************************
* Name: lpc31_getbasefreq
*
* Description:
* Return the base frequency associated with a clock domain
*
************************************************************************/
**********************************************************************************************/
static inline uint32_t lpc31_getbasefreq(enum lpc31_domainid_e dmnid)
{
@@ -572,13 +573,13 @@ static inline uint32_t lpc31_getbasefreq(enum lpc31_domainid_e dmnid)
return g_boardfreqin[ndx];
}
/************************************************************************
/**********************************************************************************************
* Name: lpc31_enableclock
*
* Description:
* Enable the specified clock
*
************************************************************************/
**********************************************************************************************/
static inline void lpc31_enableclock(enum lpc31_clockid_e clkid)
{
@@ -589,13 +590,13 @@ static inline void lpc31_enableclock(enum lpc31_clockid_e clkid)
putreg32(regval, address);
}
/************************************************************************
/**********************************************************************************************
* Name: lpc31_disableclock
*
* Description:
* Disable the specified clock
*
************************************************************************/
**********************************************************************************************/
static inline void lpc31_disableclock(enum lpc31_clockid_e clkid)
{
@@ -606,129 +607,121 @@ static inline void lpc31_disableclock(enum lpc31_clockid_e clkid)
putreg32(regval, address);
}
/************************************************************************
/**********************************************************************************************
* Public Functions
************************************************************************/
**********************************************************************************************/
/****************************************************************************
/**************************************************************************************************
* Name: lpc31_defclk
*
* Description:
* Enable the specified clock if it is one of the default clocks needed
* by the board.
* Enable the specified clock if it is one of the default clocks needed by the board.
*
****************************************************************************/
**************************************************************************************************/
EXTERN bool lpc31_defclk(enum lpc31_clockid_e clkid);
bool lpc31_defclk(enum lpc31_clockid_e clkid);
/****************************************************************************
/**************************************************************************************************
* Name: lpc31_resetclks
*
* Description:
* Put all clocks into a known, initial state
*
****************************************************************************/
**************************************************************************************************/
EXTERN void lpc31_resetclks(void);
void lpc31_resetclks(void);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_clkinit
*
* Description:
* Initialize all clock domains based on board-specific clock
* configuration data
* Initialize all clock domains based on board-specific clock configuration data
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_clkinit(const struct lpc31_clkinit_s* cfg);
void lpc31_clkinit(const struct lpc31_clkinit_s* cfg);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_fdivinit
*
* Description:
* Enable and configure (or disable) a fractional divider. For
* internal us only... see lpc31_setfdiv() the externally usable
* function.
* Enable and configure (or disable) a fractional divider. For internal us only... see
* lpc31_setfdiv() the externally usable function.
*
************************************************************************/
**********************************************************************************************/
EXTERN uint32_t lpc31_fdivinit(int fdcndx,
const struct lpc31_fdivconfig_s *fdiv,
bool enable);
uint32_t lpc31_fdivinit(int fdcndx, const struct lpc31_fdivconfig_s *fdiv, bool enable);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_setfdiv
*
* Description:
* Set/reset subdomain frequency containing the specified clock using
* the provided divider settings
* Set/reset subdomain frequency containing the specified clock using the provided divider
* settings
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_setfdiv(enum lpc31_domainid_e dmnid,
enum lpc31_clockid_e clkid,
const struct lpc31_fdivconfig_s *fdiv);
void lpc31_setfdiv(enum lpc31_domainid_e dmnid, enum lpc31_clockid_e clkid,
const struct lpc31_fdivconfig_s *fdiv);
/****************************************************************************
/**************************************************************************************************
* Name: lpc31_pllconfig
*
* Description:
* Re-onfigure the PLL according to the provided selections.
*
****************************************************************************/
**************************************************************************************************/
EXTERN void lpc31_pllconfig(const struct lpc31_pllconfig_s * const cfg);
void lpc31_pllconfig(const struct lpc31_pllconfig_s * const cfg);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_hp0pllconfig
*
* Description:
* Configure the HP0 PLL according to the board.h default selections.
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_hp0pllconfig(void);
void lpc31_hp0pllconfig(void);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_hp1pllconfig
*
* Description:
* Configure the HP1 PLL according to the board.h default selections.
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_hp1pllconfig(void);
void lpc31_hp1pllconfig(void);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_softreset
*
* Description:
* Perform a soft reset on the specified module.
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_softreset(enum lpc31_resetid_e resetid);
void lpc31_softreset(enum lpc31_resetid_e resetid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_clkdomain
*
* Description:
* Given a clock ID, return the ID of the domain in which the clock
* resides.
* Given a clock ID, return the ID of the domain in which the clock resides.
*
************************************************************************/
**********************************************************************************************/
EXTERN enum lpc31_domainid_e lpc31_clkdomain(enum lpc31_clockid_e clkid);
enum lpc31_domainid_e lpc31_clkdomain(enum lpc31_clockid_e clkid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_esrndx
*
* Description:
* Given a clock ID, return the index of the corresponding ESR
* register (or ESRNDX_INVALID if there is no ESR associated with
* this clock ID). Indexing of ESRs differs slightly from the clock
* ID: There are 92 clock IDs but only 89 ESR regisers. There are no
* ESR registers for :
* Given a clock ID, return the index of the corresponding ESR register (or ESRNDX_INVALID
* if there is no ESR associated with this clock ID). Indexing of ESRs differs slightly
* from the clock ID: There are 92 clock IDs but only 89 ESR regisers. There are no ESR
* registers for :
*
*
* CLKID_I2SRXBCK0 Clock ID 87: I2SRX_BCK0
@@ -738,77 +731,72 @@ EXTERN enum lpc31_domainid_e lpc31_clkdomain(enum lpc31_clockid_e clkid);
*
* CLKID_SYSCLKO Clock ID 91: SYSCLK_O
*
************************************************************************/
**********************************************************************************************/
EXTERN int lpc31_esrndx(enum lpc31_clockid_e clkid);
int lpc31_esrndx(enum lpc31_clockid_e clkid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_bcrndx
*
* Description:
* Only 5 of the 12 domains have an associated BCR register. This
* function returns the index to the associated BCR register (if any)
* or BCRNDX_INVALID otherwise.
* Only 5 of the 12 domains have an associated BCR register. This function returns the
* index to the associated BCR register (if any) or BCRNDX_INVALID otherwise.
*
************************************************************************/
**********************************************************************************************/
EXTERN int lpc31_bcrndx(enum lpc31_domainid_e dmnid);
int lpc31_bcrndx(enum lpc31_domainid_e dmnid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_fdcndx
*
* Description:
* Given a clock ID and its domain ID, return the index of the
* corresponding fractional divider register (or FDCNDX_INVALID if
* there is no fractional divider associated with this clock).
* Given a clock ID and its domain ID, return the index of the corresponding fractional
* divider register (or FDCNDX_INVALID if there is no fractional divider associated with
* this clock).
*
************************************************************************/
**********************************************************************************************/
EXTERN int lpc31_fdcndx(enum lpc31_clockid_e clkid,
enum lpc31_domainid_e dmnid);
int lpc31_fdcndx(enum lpc31_clockid_e clkid, enum lpc31_domainid_e dmnid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_selectfreqin
*
* Description:
* Set the base frequency source selection for with a clock domain
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_selectfreqin(enum lpc31_domainid_e dmnid,
uint32_t finsel);
void lpc31_selectfreqin(enum lpc31_domainid_e dmnid, uint32_t finsel);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_clkfreq
*
* Description:
* Given a clock ID and its domain ID, return the frequency of the
* clock.
* Given a clock ID and its domain ID, return the frequency of the clock.
*
************************************************************************/
**********************************************************************************************/
EXTERN uint32_t lpc31_clkfreq(enum lpc31_clockid_e clkid,
enum lpc31_domainid_e dmnid);
uint32_t lpc31_clkfreq(enum lpc31_clockid_e clkid, enum lpc31_domainid_e dmnid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_enableexten
*
* Description:
* Enable external enabling for the specified possible clocks.
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_enableexten(enum lpc31_clockid_e clkid);
void lpc31_enableexten(enum lpc31_clockid_e clkid);
/************************************************************************
/**********************************************************************************************
* Name: lpc31_disableexten
*
* Description:
* Disable external enabling for the specified possible clocks.
*
************************************************************************/
**********************************************************************************************/
EXTERN void lpc31_disableexten(enum lpc31_clockid_e clkid);
void lpc31_disableexten(enum lpc31_clockid_e clkid);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43/chip/lpc43_spifi.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -249,7 +249,8 @@ struct spifi_driver_s
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -258,12 +259,12 @@ extern "C" {
* Public Functions
****************************************************************************/
EXTERN int32_t spifi_init(struct spifi_dev_s *dev, uint32_t cshigh,
int32_t spifi_init(struct spifi_dev_s *dev, uint32_t cshigh,
uint32_t options, uint32_t mhz);
EXTERN int32_t spifi_program(struct spifi_dev_s *dev, const uint8_t *source,
struct spifi_operands_s *opers);
EXTERN int32_t spifi_erase(struct spifi_dev_s *dev,
struct spifi_operands_s *opers);
int32_t spifi_program(struct spifi_dev_s *dev, const uint8_t *source,
struct spifi_operands_s *opers);
int32_t spifi_erase(struct spifi_dev_s *dev,
struct spifi_operands_s *opers);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/lpc43xx/lpc43_cgu.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -80,7 +81,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void lpc43_clockconfig(void);
void lpc43_clockconfig(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43xx/lpc43_dac.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -83,7 +84,7 @@ extern "C" {
*
****************************************************************************/
EXTERN FAR struct dac_dev_s *lpc43_dacinitialize(void);
FAR struct dac_dev_s *lpc43_dacinitialize(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -109,7 +109,8 @@ struct lpc43_dmaregs_s
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -129,7 +130,7 @@ extern "C" {
*
****************************************************************************/
EXTERN void lpc43_dmainitilaize(void);
void lpc43_dmainitilaize(void);
/****************************************************************************
* Name: lpc43_dmachannel
@@ -145,7 +146,7 @@ EXTERN void lpc43_dmainitilaize(void);
*
****************************************************************************/
EXTERN DMA_HANDLE lpc43_dmachannel(void);
DMA_HANDLE lpc43_dmachannel(void);
/****************************************************************************
* Name: lpc43_dmafree
@@ -160,7 +161,7 @@ EXTERN DMA_HANDLE lpc43_dmachannel(void);
*
****************************************************************************/
EXTERN void lpc43_dmafree(DMA_HANDLE handle);
void lpc43_dmafree(DMA_HANDLE handle);
/****************************************************************************
* Name: lpc43_dmasetup
@@ -170,10 +171,8 @@ EXTERN void lpc43_dmafree(DMA_HANDLE handle);
*
****************************************************************************/
EXTERN int lpc43_dmarxsetup(DMA_HANDLE handle,
uint32_t control, uint32_t config,
uint32_t srcaddr, uint32_t destaddr,
size_t nbytes);
int lpc43_dmarxsetup(DMA_HANDLE handle, uint32_t control, uint32_t config,
uint32_t srcaddr, uint32_t destaddr, size_t nbytes);
/****************************************************************************
* Name: lpc43_dmastart
@@ -183,7 +182,7 @@ EXTERN int lpc43_dmarxsetup(DMA_HANDLE handle,
*
****************************************************************************/
EXTERN int lpc43_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
int lpc43_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
/****************************************************************************
* Name: lpc43_dmastop
@@ -195,7 +194,7 @@ EXTERN int lpc43_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg)
*
****************************************************************************/
EXTERN void lpc43_dmastop(DMA_HANDLE handle);
void lpc43_dmastop(DMA_HANDLE handle);
/****************************************************************************
* Name: lpc43_dmasample
@@ -206,7 +205,7 @@ EXTERN void lpc43_dmastop(DMA_HANDLE handle);
****************************************************************************/
#ifdef CONFIG_DEBUG_DMA
EXTERN void lpc43_dmasample(DMA_HANDLE handle, struct lpc43_dmaregs_s *regs);
void lpc43_dmasample(DMA_HANDLE handle, struct lpc43_dmaregs_s *regs);
#else
# define lpc43_dmasample(handle,regs)
#endif
@@ -220,8 +219,8 @@ EXTERN void lpc43_dmasample(DMA_HANDLE handle, struct lpc43_dmaregs_s *regs);
****************************************************************************/
#ifdef CONFIG_DEBUG_DMA
EXTERN void lpc43_dmadump(DMA_HANDLE handle, const struct lpc43_dmaregs_s *regs,
const char *msg);
void lpc43_dmadump(DMA_HANDLE handle, const struct lpc43_dmaregs_s *regs,
const char *msg);
#else
# define lpc43_dmadump(handle,regs,msg)
#endif

View File

@@ -1,7 +1,7 @@
/********************************************************************************************
* arch/arm/src/lpc43xx/lpc43_gpio.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -252,7 +252,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -273,7 +274,7 @@ extern "C" {
*
********************************************************************************************/
EXTERN int lpc43_gpio_config(uint16_t gpiocfg);
int lpc43_gpio_config(uint16_t gpiocfg);
/********************************************************************************************
* Name: lpc43_gpio_write
@@ -286,7 +287,7 @@ EXTERN int lpc43_gpio_config(uint16_t gpiocfg);
*
********************************************************************************************/
EXTERN void lpc43_gpio_write(uint16_t gpiocfg, bool value);
void lpc43_gpio_write(uint16_t gpiocfg, bool value);
/********************************************************************************************
* Name: lpc43_gpio_read
@@ -299,7 +300,7 @@ EXTERN void lpc43_gpio_write(uint16_t gpiocfg, bool value);
*
********************************************************************************************/
EXTERN bool lpc43_gpio_read(uint16_t gpiocfg);
bool lpc43_gpio_read(uint16_t gpiocfg);
/********************************************************************************************
* Function: lpc43_gpio_dump
@@ -310,7 +311,7 @@ EXTERN bool lpc43_gpio_read(uint16_t gpiocfg);
********************************************************************************************/
#ifdef CONFIG_DEBUG
EXTERN int lpc43_gpio_dump(uint16_t gpiocfg, const char *msg);
int lpc43_gpio_dump(uint16_t gpiocfg, const char *msg);
#else
# define lpc43_gpio_dump(p,m)
#endif

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43xx/lpc43_irq.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -81,7 +82,7 @@ extern "C" {
*
****************************************************************************/
EXTERN void lpc43_clrpend(int irq);
void lpc43_clrpend(int irq);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/********************************************************************************************
* arch/arm/src/lpc43xx/lpc43_pinconfig.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -230,7 +230,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -253,7 +254,7 @@ extern "C" {
*
********************************************************************************************/
EXTERN int lpc43_pin_config(uint32_t pinconf);
int lpc43_pin_config(uint32_t pinconf);
/********************************************************************************************
* Function: lpc43_pin_dump
@@ -264,7 +265,7 @@ EXTERN int lpc43_pin_config(uint32_t pinconf);
********************************************************************************************/
#ifdef CONFIG_DEBUG
EXTERN int lpc43_pin_dump(uint32_t pinconf, const char *msg);
int lpc43_pin_dump(uint32_t pinconf, const char *msg);
#else
# define lpc43_pin_dump(p,m)
#endif

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43xx/lpc43_rgu.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -81,7 +82,7 @@ extern "C" {
*
****************************************************************************/
EXTERN void lpc43_softreset(void);
void lpc43_softreset(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/lpc43xx/lpc43_spi.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -102,7 +103,7 @@ extern "C" {
*
************************************************************************************/
EXTERN FAR struct spi_dev_s *lpc43_spiinitialize(int port);
FAR struct spi_dev_s *lpc43_spiinitialize(int port);
/************************************************************************************
* Name: lpc43_spiselect, lpc43_spistatus, and lpc43_spicmddata
@@ -118,22 +119,19 @@ EXTERN FAR struct spi_dev_s *lpc43_spiinitialize(int port);
*
************************************************************************************/
EXTERN void lpc43_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
bool selected);
EXTERN uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void lpc43_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
EXTERN int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
bool cmd);
int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
/****************************************************************************
/************************************************************************************
* Name: spi_flush
*
* Description:
* Flush and discard any words left in the RX fifo. This can be called
* from spiselect after a device is deselected (if you worry about such
* things).
* Flush and discard any words left in the RX fifo. This can be called from
* spiselect after a device is deselected (if you worry about such things).
*
* Input Parameters:
* dev - Device-specific state data
@@ -141,33 +139,32 @@ EXTERN int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
* Returned Value:
* None
*
****************************************************************************/
************************************************************************************/
EXTERN void spi_flush(FAR struct spi_dev_s *dev);
void spi_flush(FAR struct spi_dev_s *dev);
/****************************************************************************
/************************************************************************************
* Name: lpc43_spi/spiregister
*
* Description:
* If the board supports a card detect callback to inform the SPI-based
* MMC/SD drvier when an SD card is inserted or removed, then
* CONFIG_SPI_CALLBACK should be defined and the following function(s) must
* must be implemented. These functiosn implements the registercallback
* method of the SPI interface (see include/nuttx/spi/spi.h for details)
* If the board supports a card detect callback to inform the SPI-based MMC/SD
* driver when an SD card is inserted or removed, then CONFIG_SPI_CALLBACK should
* be defined and the following function(s) must must be implemented. These
* functions implements the registercallback method of the SPI interface (see
* include/nuttx/spi/spi.h for details)
*
* Input Parameters:
* dev - Device-specific state data
* callback - The funtion to call on the media change
* callback - The function to call on the media change
* arg - A caller provided value to return with the callback
*
* Returned Value:
* 0 on success; negated errno on failure.
*
****************************************************************************/
************************************************************************************/
#ifdef CONFIG_SPI_CALLBACK
EXTERN int lpc43_spiregister(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int lpc43_spiregister(FAR struct spi_dev_s *dev, spi_mediachange_t callback, void *arg);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/lpc43xx/lpc43_ssp.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -98,7 +99,7 @@ extern "C" {
* port - Port number (0=SSP0, 1=SSP1)
*
* Returned Value:
* Valid SPI device structure reference on succcess; a NULL on failure
* Valid SPI device structure reference on success; a NULL on failure
*
****************************************************************************/
@@ -120,18 +121,18 @@ FAR struct spi_dev_s *lpc43_sspinitialize(int port)
************************************************************************************/
#ifdef CONFIG_LPC43_SSP0
EXTERN void lpc43_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void lpc43_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
EXTERN int lpc43_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
int lpc43_ssp0cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
#endif
#ifdef CONFIG_LPC43_SSP1
EXTERN void lpc43_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void lpc43_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
EXTERN int lpc43_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
int lpc43_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
#endif
@@ -152,7 +153,7 @@ EXTERN int lpc43_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bo
****************************************************************************/
#if defined(CONFIG_LPC43_SSP0) || defined(CONFIG_LPC43_SSP1)
EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
void ssp_flush(FAR struct spi_dev_s *dev);
#endif
/****************************************************************************
@@ -160,14 +161,14 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
*
* Description:
* If the board supports a card detect callback to inform the SPI-based
* MMC/SD drvier when an SD card is inserted or removed, then
* MMC/SD driver when an SD card is inserted or removed, then
* CONFIG_SPI_CALLBACK should be defined and the following function(s) must
* must be implemented. These functiosn implements the registercallback
* must be implemented. These functions implements the registercallback
* method of the SPI interface (see include/nuttx/spi/spi.h for details)
*
* Input Parameters:
* dev - Device-specific state data
* callback - The funtion to call on the media change
* callback - The function to call on the media change
* arg - A caller provided value to return with the callback
*
* Returned Value:
@@ -177,13 +178,13 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
#ifdef CONFIG_SPI_CALLBACK
#ifdef CONFIG_LPC43_SSP0
EXTERN int lpc43_ssp0register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int lpc43_ssp0register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_LPC43_SSP1
EXTERN int lpc43_ssp1register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int lpc43_ssp1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#endif

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc43xx/lpc43_uart.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -79,7 +80,7 @@ extern "C" {
*
****************************************************************************/
EXTERN void lpc43_lowsetup(void);
void lpc43_lowsetup(void);
/****************************************************************************
* Name: lpc43_usart0_reset, lpc43_uart1_reset, lpc43_usart2_reset, and
@@ -92,16 +93,16 @@ EXTERN void lpc43_lowsetup(void);
****************************************************************************/
#ifdef CONFIG_LPC43_USART0
EXTERN void lpc43_usart0_reset(void);
void lpc43_usart0_reset(void);
#endif
#ifdef CONFIG_LPC43_UART1
EXTERN void lpc43_uart1_reset(void);
void lpc43_uart1_reset(void);
#endif
#ifdef CONFIG_LPC43_USART2
EXTERN void lpc43_usart2_reset(void);
void lpc43_usart2_reset(void);
#endif
#ifdef CONFIG_LPC43_USART3
EXTERN void lpc43_usart3_reset(void);
void lpc43_usart3_reset(void);
#endif
/****************************************************************************
@@ -118,19 +119,19 @@ EXTERN void lpc43_usart3_reset(void);
****************************************************************************/
#ifdef CONFIG_LPC43_USART0
EXTERN void lpc43_usart0_setup(void);
void lpc43_usart0_setup(void);
#endif
#ifdef CONFIG_LPC43_UART1
EXTERN void lpc43_uart1_setup(void);
void lpc43_uart1_setup(void);
#endif
#ifdef CONFIG_LPC43_USART2
EXTERN void lpc43_usart2_setup(void);
void lpc43_usart2_setup(void);
#endif
#ifdef CONFIG_LPC43_USART3
EXTERN void lpc43_usart3_setup(void);
void lpc43_usart3_setup(void);
#endif
/****************************************************************************
@@ -145,7 +146,7 @@ EXTERN void lpc43_usart3_setup(void);
*
****************************************************************************/
EXTERN void lpc43_setbaud(uintptr_t uartbase, uint32_t basefreq, uint32_t baud);
void lpc43_setbaud(uintptr_t uartbase, uint32_t basefreq, uint32_t baud);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/lpc43xx/lpc43_usbdev.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -68,12 +69,10 @@ extern "C" {
* If USB is supported and the board supports a pullup via GPIO (for USB software
* connect and disconnect), then the board software must provide lpc43_pullup.
* See include/nuttx/usb/usbdev.h for additional description of this method.
* Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be
* NULL.
*
************************************************************************************/
EXTERN int lpc43_usbpullup(FAR struct usbdev_s *dev, bool enable);
int lpc43_usbpullup(FAR struct usbdev_s *dev, bool enable);
/************************************************************************************
* Name: lpc43_usbsuspend
@@ -86,7 +85,7 @@ EXTERN int lpc43_usbpullup(FAR struct usbdev_s *dev, bool enable);
*
************************************************************************************/
EXTERN void lpc43_usbsuspend(FAR struct usbdev_s *dev, bool resume);
void lpc43_usbsuspend(FAR struct usbdev_s *dev, bool resume);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/sam34/sam_wdt.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Authors: Gregory Nutt <gnutt@nuttx.org>
* Bob Doiron
*
@@ -57,7 +57,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -84,7 +85,7 @@ extern "C" {
****************************************************************************/
#ifdef CONFIG_SAM34_WDT
EXTERN void sam_wdtinitialize(FAR const char *devpath);
void sam_wdtinitialize(FAR const char *devpath);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_adc.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -571,7 +571,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -593,8 +594,8 @@ extern "C" {
****************************************************************************/
struct adc_dev_s;
EXTERN struct adc_dev_s *stm32_adcinitialize(int intf, const uint8_t *chanlist,
int nchannels);
struct adc_dev_s *stm32_adcinitialize(int intf, const uint8_t *chanlist,
int nchannels);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_can.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -133,7 +134,7 @@ extern "C" {
****************************************************************************/
struct can_dev_s;
EXTERN FAR struct can_dev_s *stm32_caninitialize(int port);
FAR struct can_dev_s *stm32_caninitialize(int port);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_dac.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -107,7 +107,8 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -127,7 +128,7 @@ extern "C" {
****************************************************************************/
struct dac_dev_s;
EXTERN FAR struct dac_dev_s *stm32_dacinitialize(int intf);
FAR struct dac_dev_s *stm32_dacinitialize(int intf);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_eth.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -57,7 +57,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -82,7 +83,7 @@ extern "C" {
************************************************************************************/
#if STM32_NETHERNET > 1
EXTERN int stm32_ethinitialize(int intf);
int stm32_ethinitialize(int intf);
#endif
/************************************************************************************
@@ -106,7 +107,7 @@ EXTERN int stm32_ethinitialize(int intf);
************************************************************************************/
#ifdef CONFIG_STM32_PHYINIT
EXTERN int stm32_phy_boardinitialize(int intf);
int stm32_phy_boardinitialize(int intf);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_exti.h
*
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -84,30 +85,29 @@ extern "C" {
*
************************************************************************************/
EXTERN xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func);
xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func);
/****************************************************************************
/************************************************************************************
* Name: stm32_exti_alarm
*
* Description:
* Sets/clears EXTI alarm interrupt.
*
* Parameters:
* - rising/falling edge: enables interrupt on rising/falling edget
* - rising/falling edge: enables interrupt on rising/falling edges
* - event: generate event when set
* - func: when non-NULL, generate interrupt
*
* Returns:
* The previous value of the interrupt handler function pointer. This
* value may, for example, be used to restore the previous handler when
* multiple handlers are used.
* The previous value of the interrupt handler function pointer. This value may,
* for example, be used to restore the previous handler when multiple handlers are
* used.
*
****************************************************************************/
************************************************************************************/
#ifdef CONFIG_RTC_ALARM
EXTERN xcpt_t stm32_exti_alarm(bool risingedge, bool fallingedge, bool event,
xcpt_t func);
xcpt_t stm32_exti_alarm(bool risingedge, bool fallingedge, bool event, xcpt_t func);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_gpio.h
*
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011-2012, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Uros Platise <uros.platise@isotel.eu>
@@ -408,7 +408,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -436,7 +437,7 @@ EXTERN const uint32_t g_gpiobase[STM32_NGPIO_PORTS];
*
************************************************************************************/
EXTERN int stm32_configgpio(uint32_t cfgset);
int stm32_configgpio(uint32_t cfgset);
/************************************************************************************
* Name: stm32_unconfiggpio
@@ -457,7 +458,7 @@ EXTERN int stm32_configgpio(uint32_t cfgset);
*
************************************************************************************/
EXTERN int stm32_unconfiggpio(uint32_t cfgset);
int stm32_unconfiggpio(uint32_t cfgset);
/************************************************************************************
* Name: stm32_gpiowrite
@@ -467,7 +468,7 @@ EXTERN int stm32_unconfiggpio(uint32_t cfgset);
*
************************************************************************************/
EXTERN void stm32_gpiowrite(uint32_t pinset, bool value);
void stm32_gpiowrite(uint32_t pinset, bool value);
/************************************************************************************
* Name: stm32_gpioread
@@ -477,7 +478,7 @@ EXTERN void stm32_gpiowrite(uint32_t pinset, bool value);
*
************************************************************************************/
EXTERN bool stm32_gpioread(uint32_t pinset);
bool stm32_gpioread(uint32_t pinset);
/************************************************************************************
* Name: stm32_gpiosetevent
@@ -498,8 +499,8 @@ EXTERN bool stm32_gpioread(uint32_t pinset);
*
************************************************************************************/
EXTERN xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func);
xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func);
/************************************************************************************
* Function: stm32_dumpgpio
@@ -510,7 +511,7 @@ EXTERN xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallinge
************************************************************************************/
#ifdef CONFIG_DEBUG
EXTERN int stm32_dumpgpio(uint32_t pinset, const char *msg);
int stm32_dumpgpio(uint32_t pinset, const char *msg);
#else
# define stm32_dumpgpio(p,m)
#endif
@@ -526,7 +527,7 @@ EXTERN int stm32_dumpgpio(uint32_t pinset, const char *msg);
*
************************************************************************************/
EXTERN void stm32_gpioinit(void);
void stm32_gpioinit(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_lowputc.h
*
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -67,7 +68,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void stm32_lowsetup(void);
void stm32_lowsetup(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_pwm.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -332,7 +332,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -358,7 +359,7 @@ extern "C" {
*
************************************************************************************/
EXTERN FAR struct pwm_lowerhalf_s *stm32_pwminitialize(int timer);
FAR struct pwm_lowerhalf_s *stm32_pwminitialize(int timer);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_sdio.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -76,7 +77,7 @@ extern "C" {
****************************************************************************/
struct sdio_dev_s; /* See include/nuttx/sdio.h */
EXTERN FAR struct sdio_dev_s *sdio_initialize(int slotno);
FAR struct sdio_dev_s *sdio_initialize(int slotno);
/****************************************************************************
* Name: sdio_mediachange
@@ -97,7 +98,7 @@ EXTERN FAR struct sdio_dev_s *sdio_initialize(int slotno);
*
****************************************************************************/
EXTERN void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
/****************************************************************************
* Name: sdio_wrprotect
@@ -115,7 +116,7 @@ EXTERN void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot);
*
****************************************************************************/
EXTERN void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect);
void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_spi.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -136,19 +136,19 @@ uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
/****************************************************************************
/************************************************************************************
* Name: stm32_spi1/2/...register
*
* Description:
* If the board supports a card detect callback to inform the SPI-based
* MMC/SD drvier when an SD card is inserted or removed, then
* CONFIG_SPI_CALLBACK should be defined and the following function(s) must
* be implemented. These functiosn implements the registercallback method
* of the SPI interface (see include/nuttx/spi/spi.h for details)
* If the board supports a card detect callback to inform the SPI-based MMC/SD
* driver when an SD card is inserted or removed, then CONFIG_SPI_CALLBACK should
* be defined and the following function(s) must be implemented. These functions
* implements the registercallback method of the SPI interface (see
* include/nuttx/spi/spi.h for details)
*
* Input Parameters:
* dev - Device-specific state data
* callback - The funtion to call on the media change
* callback - The function to call on the media change
* arg - A caller provided value to return with the callback
*
* Returned Value:
@@ -158,33 +158,33 @@ int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
#ifdef CONFIG_SPI_CALLBACK
#ifdef CONFIG_STM32_SPI1
EXTERN int stm32_spi1register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_STM32_SPI2
EXTERN int stm32_spi2register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi2register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_STM32_SPI3
EXTERN int stm32_spi3register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi3register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_STM32_SPI4
EXTERN int stm32_spi4register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi4register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_STM32_SPI5
EXTERN int stm32_spi5register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi5register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#ifdef CONFIG_STM32_SPI6
EXTERN int stm32_spi6register(FAR struct spi_dev_s *dev,
spi_mediachange_t callback, void *arg);
int stm32_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
FAR void *arg);
#endif
#endif

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_uart.h
*
* Copyright (C) 2009, 2012-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -322,7 +322,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -331,21 +332,21 @@ extern "C" {
* Public Functions
************************************************************************************/
/****************************************************************************
/************************************************************************************
* Name: stm32_serial_dma_poll
*
* Description:
* Must be called periodically if any STM32 UART is configured for DMA.
* The DMA callback is triggered for each fifo size/2 bytes, but this can
* result in some bytes being transferred but not collected if the incoming
* data is not a whole multiple of half the FIFO size.
* Must be called periodically if any STM32 UART is configured for DMA. The DMA
* callback is triggered for each fifo size/2 bytes, but this can result in some
* bytes being transferred but not collected if the incoming data is not a whole
* multiple of half the FIFO size.
*
* May be safely called from either interrupt or thread context.
*
****************************************************************************/
************************************************************************************/
#ifdef SERIAL_HAVE_DMA
EXTERN void stm32_serial_dma_poll(void);
void stm32_serial_dma_poll(void);
#endif
#undef EXTERN

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/stm32/stm32_usbdev.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -68,12 +69,10 @@ extern "C" {
* If USB is supported and the board supports a pullup via GPIO (for USB software
* connect and disconnect), then the board software must provide stm32_pullup.
* See include/nuttx/usb/usbdev.h for additional description of this method.
* Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be
* NULL.
*
************************************************************************************/
EXTERN int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable);
int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable);
/************************************************************************************
* Name: stm32_usbsuspend
@@ -86,7 +85,7 @@ EXTERN int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable);
*
************************************************************************************/
EXTERN void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume);
void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/stm32/stm32_waste.h
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011, 2015 Uros Platise. All rights reserved.
* Author: Uros Platise <uros.platise@isotel.eu>
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -67,7 +68,7 @@ extern "C" {
* cannot be used for other purposes (yet).
**/
EXTERN void up_waste(void);
void up_waste(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/stm32/stm32_wdg.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -69,8 +70,8 @@ extern "C" {
* Name: stm32_iwdginitialize
*
* Description:
* Initialize the IWDG watchdog time. The watchdog timer is initializeed and
* registers as 'devpath. The initial state of the watchdog time is
* Initialize the IWDG watchdog time. The watchdog timer is initialized
* and registers as 'devpath. The initial state of the watchdog time is
* disabled.
*
* Input Parameters:
@@ -84,7 +85,7 @@ extern "C" {
****************************************************************************/
#ifdef CONFIG_STM32_IWDG
EXTERN void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq);
void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq);
#endif
/****************************************************************************
@@ -105,7 +106,7 @@ EXTERN void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq);
****************************************************************************/
#ifdef CONFIG_STM32_WWDG
EXTERN void stm32_wwdginitialize(FAR const char *devpath);
void stm32_wwdginitialize(FAR const char *devpath);
#endif
#undef EXTERN

View File

@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* SWI with SYS_ call number and six parameters */
#warning "REVISIT"
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,
uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/avr/include/avr32/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* SWI with SYS_ call number and six parameters */
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,
uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/avr/src/common/up_arch.h
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -69,16 +69,17 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/hc/src/common/up_arch.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -72,16 +72,17 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/hc/src/m9s12/m9s12_internal.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -208,7 +208,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -225,7 +226,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void hcs12_gpioirqinitialize(void);
void hcs12_gpioirqinitialize(void);
/************************************************************************************
* Name: hcs12_configgpio
@@ -235,7 +236,7 @@ EXTERN void hcs12_gpioirqinitialize(void);
*
************************************************************************************/
EXTERN int hcs12_configgpio(uint16_t cfgset);
int hcs12_configgpio(uint16_t cfgset);
/************************************************************************************
* Name: hcs12_gpiowrite
@@ -245,7 +246,7 @@ EXTERN int hcs12_configgpio(uint16_t cfgset);
*
************************************************************************************/
EXTERN void hcs12_gpiowrite(uint16_t pinset, bool value);
void hcs12_gpiowrite(uint16_t pinset, bool value);
/************************************************************************************
* Name: hcs12_gpioread
@@ -255,7 +256,7 @@ EXTERN void hcs12_gpiowrite(uint16_t pinset, bool value);
*
************************************************************************************/
EXTERN bool hcs12_gpioread(uint16_t pinset);
bool hcs12_gpioread(uint16_t pinset);
/************************************************************************************
* Name: hcs12_gpioirqenable
@@ -266,7 +267,7 @@ EXTERN bool hcs12_gpioread(uint16_t pinset);
************************************************************************************/
#ifdef CONFIG_GPIO_IRQ
EXTERN void hcs12_gpioirqenable(int irq);
void hcs12_gpioirqenable(int irq);
#else
# define hcs12_gpioirqenable(irq)
#endif
@@ -280,7 +281,7 @@ EXTERN void hcs12_gpioirqenable(int irq);
************************************************************************************/
#ifdef CONFIG_GPIO_IRQ
EXTERN void hcs12_gpioirqdisable(int irq);
void hcs12_gpioirqdisable(int irq);
#else
# define hcs12_gpioirqdisable(irq)
#endif
@@ -294,7 +295,7 @@ EXTERN void hcs12_gpioirqdisable(int irq);
************************************************************************************/
#ifdef CONFIG_DEBUG_GPIO
EXTERN int hcs12_dumpgpio(uint16_t pinset, const char *msg);
int hcs12_dumpgpio(uint16_t pinset, const char *msg);
#else
# define hcs12_dumpgpio(p,m)
#endif
@@ -319,7 +320,7 @@ EXTERN int hcs12_dumpgpio(uint16_t pinset, const char *msg);
************************************************************************************/
#if STM32_NTHERNET > 1
EXTERN int hcs12_ethinitialize(int intf);
int hcs12_ethinitialize(int intf);
#endif
/************************************************************************************
@@ -347,8 +348,8 @@ EXTERN int hcs12_ethinitialize(int intf);
*
************************************************************************************/
EXTERN void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void hcs12_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -84,7 +84,8 @@
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/include/mips32/irq.h
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -506,7 +506,8 @@ static inline void cp0_putcause(uint32_t cause)
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -525,7 +526,7 @@ extern "C" {
*
****************************************************************************/
EXTERN irqstate_t irqsave(void);
irqstate_t irqsave(void);
/****************************************************************************
* Name: irqrestore
@@ -542,7 +543,7 @@ EXTERN irqstate_t irqsave(void);
*
****************************************************************************/
EXTERN void irqrestore(irqstate_t irqtate);
void irqrestore(irqstate_t irqtate);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/include/mips32/syscall.h
*
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -202,7 +202,8 @@
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -215,7 +216,7 @@ extern "C" {
*
****************************************************************************/
EXTERN uintptr_t sys_call0(unsigned int nbr);
uintptr_t sys_call0(unsigned int nbr);
/****************************************************************************
* Name: up_syscall1
@@ -225,7 +226,7 @@ EXTERN uintptr_t sys_call0(unsigned int nbr);
*
****************************************************************************/
EXTERN uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1);
uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1);
/****************************************************************************
* Name: up_syscall2
@@ -235,7 +236,7 @@ EXTERN uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1);
*
****************************************************************************/
EXTERN uintptr_t sys_call2(unsigned int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t sys_call2(unsigned int nbr, uintptr_t parm1, uintptr_t parm2);
/****************************************************************************
* Name: up_syscall3
@@ -245,8 +246,8 @@ EXTERN uintptr_t sys_call2(unsigned int nbr, uintptr_t parm1, uintptr_t parm2);
*
****************************************************************************/
EXTERN uintptr_t sys_call3(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3);
uintptr_t sys_call3(unsigned int nbr, uintptr_t parm1, uintptr_t parm2
uintptr_t parm3);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/common/up_arch.h
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -69,16 +69,17 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/sh/src/common/up_internal.h
*
* Copyright (C) 2008-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -155,38 +155,38 @@ extern uint32_t g_idle_topstack;
/* Defined in files with the same name as the function */
extern void up_boot(void);
extern void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_dataabort(uint32_t *regs);
extern void up_decodeirq(uint32_t *regs);
extern uint32_t *up_doirq(int irq, uint32_t *regs);
extern void up_fullcontextrestore(uint32_t *regs) noreturn_function;
extern void up_irqinitialize(void);
extern void up_prefetchabort(uint32_t *regs);
extern int up_saveusercontext(uint32_t *regs);
extern void up_sigdeliver(void);
extern void up_syscall(uint32_t *regs);
extern int up_timerisr(int irq, uint32_t *regs);
extern void up_undefinedinsn(uint32_t *regs);
extern void up_lowputc(char ch);
extern void up_puts(const char *str);
extern void up_lowputs(const char *str);
void up_boot(void);
void up_copystate(uint32_t *dest, uint32_t *src);
void up_dataabort(uint32_t *regs);
void up_decodeirq(uint32_t *regs);
uint32_t *up_doirq(int irq, uint32_t *regs);
void up_fullcontextrestore(uint32_t *regs) noreturn_function;
void up_irqinitialize(void);
void up_prefetchabort(uint32_t *regs);
int up_saveusercontext(uint32_t *regs);
void up_sigdeliver(void);
void up_syscall(uint32_t *regs);
int up_timerisr(int irq, uint32_t *regs);
void up_undefinedinsn(uint32_t *regs);
void up_lowputc(char ch);
void up_puts(const char *str);
void up_lowputs(const char *str);
/* Defined in up_vectors.S */
extern void up_vectorundefinsn(void);
extern void up_vectorswi(void);
extern void up_vectorprefetch(void);
extern void up_vectordata(void);
extern void up_vectoraddrexcptn(void);
extern void up_vectorirq(void);
extern void up_vectorfiq(void);
void up_vectorundefinsn(void);
void up_vectorswi(void);
void up_vectorprefetch(void);
void up_vectordata(void);
void up_vectoraddrexcptn(void);
void up_vectorirq(void);
void up_vectorfiq(void);
/* Defined in up_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0
extern void up_earlyconsoleinit(void);
extern void up_consoleinit(void);
void up_earlyconsoleinit(void);
void up_consoleinit(void);
#else
# define up_earlyconsoleinit()
# define up_consoleinit()
@@ -195,24 +195,24 @@ extern void up_consoleinit(void);
/* Defined in drivers/lowconsole.c */
#ifdef CONFIG_DEV_LOWCONSOLE
extern void lowconsole_init(void);
void lowconsole_init(void);
#else
# define lowconsole_init()
#endif
/* Defined in up_watchdog.c */
extern void up_wdtinit(void);
void up_wdtinit(void);
/* Defined in up_timerisr.c */
extern void up_timer_initialize(void);
void up_timer_initialize(void);
/* Defined in board/up_lcd.c */
#ifdef CONFIG_LCD_CONSOLE
extern void up_lcdinit(void);
extern void up_lcdputc(char ch);
void up_lcdinit(void);
void up_lcdputc(char ch);
#else
# define up_lcdinit()
# define up_lcdputc(ch)
@@ -221,7 +221,7 @@ extern void up_lcdputc(char ch);
/* Defined in board/up_network.c */
#ifdef CONFIG_NET
extern void up_netinitialize(void);
void up_netinitialize(void);
#else
# define up_netinitialize()
#endif
@@ -229,8 +229,8 @@ extern void up_netinitialize(void);
/* USB */
#ifdef CONFIG_USBDEV
extern void up_usbinitialize(void);
extern void up_usbuninitialize(void);
void up_usbinitialize(void);
void up_usbuninitialize(void);
#else
# define up_usbinitialize()
# define up_usbuninitialize()
@@ -239,11 +239,10 @@ extern void up_usbuninitialize(void);
/* Defined in chip-specific logic */
#ifdef CONFIG_ARCH_STACKDUMP
extern void up_dumpstate(void);
void up_dumpstate(void);
#else
# define up_dumpstate()
#endif
#endif /* __ASSEMBLY__ */
#endif /* ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H */

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/include/i486/arch.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -435,13 +435,14 @@ static inline uint32_t up_getss()
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN void gdt_flush(uint32_t gdt_addr);
EXTERN void idt_flush(uint32_t idt_addr);
void gdt_flush(uint32_t gdt_addr);
void idt_flush(uint32_t idt_addr);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/include/i486/syscall.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* SWI with SYS_ call number and six parameters */
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1,
uintptr_t parm2, uintptr_t parm3,
uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/x86/src/common/up_arch.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -70,16 +70,17 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/************************************************************************************
* arch/x86/src/qemu/qemu_internal.h
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -73,7 +73,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@@ -92,7 +93,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void i486_clockconfig(void);
void i486_clockconfig(void);
/************************************************************************************
* Name: i486_lowsetup
@@ -104,7 +105,7 @@ EXTERN void i486_clockconfig(void);
*
************************************************************************************/
EXTERN void i486_lowsetup(void);
void i486_lowsetup(void);
/************************************************************************************
* Name: i486_gpioirqinitialize
@@ -115,7 +116,7 @@ EXTERN void i486_lowsetup(void);
************************************************************************************/
#ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqinitialize(void);
void i486_gpioirqinitialize(void);
#else
# define i486_gpioirqinitialize()
#endif
@@ -128,7 +129,7 @@ EXTERN void i486_gpioirqinitialize(void);
*
************************************************************************************/
EXTERN int i486_configgpio(uint16_t cfgset);
int i486_configgpio(uint16_t cfgset);
/************************************************************************************
* Name: i486_gpiowrite
@@ -138,7 +139,7 @@ EXTERN int i486_configgpio(uint16_t cfgset);
*
************************************************************************************/
EXTERN void i486_gpiowrite(uint16_t pinset, bool value);
void i486_gpiowrite(uint16_t pinset, bool value);
/************************************************************************************
* Name: i486_gpioread
@@ -148,7 +149,7 @@ EXTERN void i486_gpiowrite(uint16_t pinset, bool value);
*
************************************************************************************/
EXTERN bool i486_gpioread(uint16_t pinset);
bool i486_gpioread(uint16_t pinset);
/************************************************************************************
* Name: i486_gpioirqenable
@@ -159,7 +160,7 @@ EXTERN bool i486_gpioread(uint16_t pinset);
************************************************************************************/
#ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqenable(int irq);
void i486_gpioirqenable(int irq);
#else
# define i486_gpioirqenable(irq)
#endif
@@ -173,7 +174,7 @@ EXTERN void i486_gpioirqenable(int irq);
************************************************************************************/
#ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqdisable(int irq);
void i486_gpioirqdisable(int irq);
#else
# define i486_gpioirqdisable(irq)
#endif
@@ -187,7 +188,7 @@ EXTERN void i486_gpioirqdisable(int irq);
************************************************************************************/
#ifdef CONFIG_DEBUG_GPIO
EXTERN int i486_dumpgpio(uint16_t pinset, const char *msg);
int i486_dumpgpio(uint16_t pinset, const char *msg);
#else
# define i486_dumpgpio(p,m)
#endif
@@ -225,10 +226,10 @@ struct spi_dev_s;
enum spi_dev_e;
#ifdef CONFIG_I486_SPI
EXTERN void i486_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
EXTERN uint8_t i486_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
void i486_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
uint8_t i486_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
EXTERN int i486_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
int i486_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
#endif
@@ -250,10 +251,10 @@ EXTERN int i486_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool
struct spi_dev_s;
#ifdef CONFIG_I486_SPI
EXTERN void spi_flush(FAR struct spi_dev_s *dev);
void spi_flush(FAR struct spi_dev_s *dev);
#endif
#if defined(CONFIG_I486_SSP0) || defined(CONFIG_I486_SSP1)
EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
void ssp_flush(FAR struct spi_dev_s *dev);
#endif
/****************************************************************************
@@ -268,7 +269,7 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmainitilaize(void);
void i486_dmainitilaize(void);
#endif
/****************************************************************************
@@ -286,7 +287,7 @@ EXTERN void i486_dmainitilaize(void);
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN DMA_HANDLE i486_dmachannel(void);
DMA_HANDLE i486_dmachannel(void);
#endif
/****************************************************************************
@@ -303,7 +304,7 @@ EXTERN DMA_HANDLE i486_dmachannel(void);
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmafree(DMA_HANDLE handle);
void i486_dmafree(DMA_HANDLE handle);
#endif
/****************************************************************************
@@ -315,10 +316,8 @@ EXTERN void i486_dmafree(DMA_HANDLE handle);
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN int i486_dmarxsetup(DMA_HANDLE handle,
uint32_t control, uint32_t config,
uint32_t srcaddr, uint32_t destaddr,
size_t nbytes);
int i486_dmarxsetup(DMA_HANDLE handle, uint32_t control, uint32_t config,
uint32_t srcaddr, uint32_t destaddr, size_t nbytes);
#endif
/****************************************************************************
@@ -330,7 +329,7 @@ EXTERN int i486_dmarxsetup(DMA_HANDLE handle,
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN int i486_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
int i486_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
#endif
/****************************************************************************
@@ -344,7 +343,7 @@ EXTERN int i486_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
****************************************************************************/
#ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmastop(DMA_HANDLE handle);
void i486_dmastop(DMA_HANDLE handle);
#endif
/****************************************************************************
@@ -357,7 +356,7 @@ EXTERN void i486_dmastop(DMA_HANDLE handle);
#ifdef CONFIG_I486_GPDMA
#ifdef CONFIG_DEBUG_DMA
EXTERN void i486_dmasample(DMA_HANDLE handle, struct i486_dmaregs_s *regs);
void i486_dmasample(DMA_HANDLE handle, struct i486_dmaregs_s *regs);
#else
# define i486_dmasample(handle,regs)
#endif
@@ -373,8 +372,8 @@ EXTERN void i486_dmasample(DMA_HANDLE handle, struct i486_dmaregs_s *regs);
#ifdef CONFIG_I486_GPDMA
#ifdef CONFIG_DEBUG_DMA
EXTERN void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs,
const char *msg);
void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs,
const char *msg);
#else
# define i486_dmadump(handle,regs,msg)
#endif
@@ -386,58 +385,58 @@ EXTERN void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs,
* Description:
* These are the various ISR/IRQ vector address exported from
* qemu_vectors.S. These addresses need to have global scope so that they
* can be known to the interrupt initializeation logic in qemu_irq.c.
* can be known to the interrupt initialization logic in qemu_irq.c.
*
****************************************************************************/
EXTERN void vector_isr0(void);
EXTERN void vector_isr1(void);
EXTERN void vector_isr2(void);
EXTERN void vector_isr3(void);
EXTERN void vector_isr4(void);
EXTERN void vector_isr5(void);
EXTERN void vector_isr6(void);
EXTERN void vector_isr7(void);
EXTERN void vector_isr8(void);
EXTERN void vector_isr9(void);
EXTERN void vector_isr10(void);
EXTERN void vector_isr11(void);
EXTERN void vector_isr12(void);
EXTERN void vector_isr13(void);
EXTERN void vector_isr14(void);
EXTERN void vector_isr15(void);
EXTERN void vector_isr16(void);
EXTERN void vector_isr17(void);
EXTERN void vector_isr18(void);
EXTERN void vector_isr19(void);
EXTERN void vector_isr20(void);
EXTERN void vector_isr21(void);
EXTERN void vector_isr22(void);
EXTERN void vector_isr23(void);
EXTERN void vector_isr24(void);
EXTERN void vector_isr25(void);
EXTERN void vector_isr26(void);
EXTERN void vector_isr27(void);
EXTERN void vector_isr28(void);
EXTERN void vector_isr29(void);
EXTERN void vector_isr30(void);
EXTERN void vector_isr31(void);
EXTERN void vector_irq0(void);
EXTERN void vector_irq1(void);
EXTERN void vector_irq2(void);
EXTERN void vector_irq3(void);
EXTERN void vector_irq4(void);
EXTERN void vector_irq5(void);
EXTERN void vector_irq6(void);
EXTERN void vector_irq7(void);
EXTERN void vector_irq8(void);
EXTERN void vector_irq9(void);
EXTERN void vector_irq10(void);
EXTERN void vector_irq11(void);
EXTERN void vector_irq12(void);
EXTERN void vector_irq13(void);
EXTERN void vector_irq14(void);
EXTERN void vector_irq15(void);
void vector_isr0(void);
void vector_isr1(void);
void vector_isr2(void);
void vector_isr3(void);
void vector_isr4(void);
void vector_isr5(void);
void vector_isr6(void);
void vector_isr7(void);
void vector_isr8(void);
void vector_isr9(void);
void vector_isr10(void);
void vector_isr11(void);
void vector_isr12(void);
void vector_isr13(void);
void vector_isr14(void);
void vector_isr15(void);
void vector_isr16(void);
void vector_isr17(void);
void vector_isr18(void);
void vector_isr19(void);
void vector_isr20(void);
void vector_isr21(void);
void vector_isr22(void);
void vector_isr23(void);
void vector_isr24(void);
void vector_isr25(void);
void vector_isr26(void);
void vector_isr27(void);
void vector_isr28(void);
void vector_isr29(void);
void vector_isr30(void);
void vector_isr31(void);
void vector_irq0(void);
void vector_irq1(void);
void vector_irq2(void);
void vector_irq3(void);
void vector_irq4(void);
void vector_irq5(void);
void vector_irq6(void);
void vector_irq7(void);
void vector_irq8(void);
void vector_irq9(void);
void vector_irq10(void);
void vector_irq11(void);
void vector_irq12(void);
void vector_irq13(void);
void vector_irq14(void);
void vector_irq15(void);
#undef EXTERN
#if defined(__cplusplus)

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* arch/z16/include/z16f/irq.h
*
* Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2008, 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -220,22 +220,23 @@ struct xcptcontext
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
/* ZDS-II intrinsic functions (normally declared in zneo.h) */
EXTERN intrinsic void EI(void);
EXTERN intrinsic void DI(void);
EXTERN intrinsic void RI(unsigned short);
EXTERN intrinsic void SET_VECTOR(int,void (* func) (void));
EXTERN intrinsic unsigned short TDI(void);
intrinsic void EI(void);
intrinsic void DI(void);
intrinsic void RI(unsigned short);
intrinsic void SET_VECTOR(int,void (* func) (void));
intrinsic unsigned short TDI(void);
#ifndef __ZILOG__
EXTERN irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags);
irqstate_t irqsave(void);
void irqrestore(irqstate_t flags);
#endif
#undef EXTERN

View File

@@ -2,7 +2,7 @@
* arch/z80/include/ez80/io.h
* arch/chip/io.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -70,13 +70,14 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN void outp(uint16_t p, uint8_t c);
EXTERN uint8_t inp(uint16_t p);
void outp(uint16_t p, uint8_t c);
uint8_t inp(uint16_t p);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -2,7 +2,7 @@
* arch/ez80/include/ez80/irq.h
* arch/chip/irq.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -244,13 +244,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags);
irqstate_t irqsave(void);
void irqrestore(irqstate_t flags);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -2,7 +2,7 @@
* arch/z80/include/z80/io.h
* arch/chip/io.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -68,13 +68,14 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN void outp(char p, char c);
EXTERN char inp(char p);
void outp(char p, char c);
char inp(char p);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -2,7 +2,7 @@
* arch/z80/include/z180/irq.h
* arch/chip/irq.h
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -217,13 +217,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN irqstate_t irqsave(void) __naked;
EXTERN void irqrestore(irqstate_t flags) __naked;
irqstate_t irqsave(void) __naked;
void irqrestore(irqstate_t flags) __naked;
#undef EXTERN
#ifdef __cplusplus

View File

@@ -2,7 +2,7 @@
* arch/z8/include/z8/irq.h
* arch/chip/irq.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -350,13 +350,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags);
irqstate_t irqsave(void);
void irqrestore(irqstate_t flags);
#undef EXTERN
#ifdef __cplusplus

View File

@@ -2,7 +2,7 @@
* arch/z80/include/z80/io.h
* arch/chip/io.h
*
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -68,13 +68,14 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN void outp(char p, char c);
EXTERN char inp(char p);
void outp(char p, char c);
char inp(char p);
#undef EXTERN
#ifdef __cplusplus

Some files were not shown because too many files have changed in this diff Show More