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 00a9f8fdc3
commit be0fb09250
52 changed files with 551 additions and 531 deletions
+6 -5
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/imx/imx_cspi.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -167,7 +167,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -195,10 +196,10 @@ extern "C" {
* for example, will bind the SPI driver to the SPI MMC/SD driver). * 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); 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); uint8_t imx_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA #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 #endif
#undef EXTERN #undef EXTERN
+99 -111
View File
@@ -1,7 +1,7 @@
/************************************************************************ /**********************************************************************************************
* arch/arm/src/lpc31xx/lpc31_cgudrvr.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* References: * References:
@@ -35,14 +35,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************************/ **********************************************************************************************/
#ifndef __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H #ifndef __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H
#define __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H #define __ARCH_ARM_SRC_LPC31XX_LPC31_CGUDRVR_H
/************************************************************************ /**********************************************************************************************
* Included Files * Included Files
************************************************************************/ **********************************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -52,9 +52,9 @@
#include "up_arch.h" #include "up_arch.h"
#include "lpc31_cgu.h" #include "lpc31_cgu.h"
/************************************************************************ /**********************************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************/ **********************************************************************************************/
/* Maps a valid, x, relative to a base value, b, and converts that to a bit position */ /* 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 #define FDCNDX_INVALID -1 /* Indicates an invalid fractional
* divider index */ * divider index */
/************************************************************************ /**********************************************************************************************
* Public Types * Public Types**********************
************************************************************************/ ************************************************************************/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -422,7 +423,7 @@ struct lpc31_subdomainconfig_s
uint32_t clkset; /* Bitset of all clocks in the sub-domain */ 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. * configuration of every clock domain.
*/ */
@@ -524,35 +525,35 @@ struct lpc31_pllconfig_s
uint32_t mdec; /* PLL M-divider value: 0-0x1ffff */ uint32_t mdec; /* PLL M-divider value: 0-0x1ffff */
}; };
/************************************************************************ /**********************************************************************************************
* Public Data * Public Data
************************************************************************/ **********************************************************************************************/
/* This array is managed by the chip-specific logic and provides the /* This array is managed by the chip-specific logic and provides the programmed frequency of
* programmed frequency of every input source * every input source
*/ */
EXTERN uint32_t g_boardfreqin[CGU_NFREQIN]; EXTERN uint32_t g_boardfreqin[CGU_NFREQIN];
/* This instance of the lpc31_clkinit_s structure provides the initial, /* This instance of the lpc31_clkinit_s structure provides the initial, default clock
* default clock configuration for the board. Every board must provide * configuration for the board. Every board must provide an implementation of g_boardclks.
* an implementation of g_boardclks. This rather complex structure is * This rather complex structure is used by the boot-up logic to configure initial lpc31xx
* used by the boot-up logic to configure initial lpc31xx clocking. * clocking.
*/ */
EXTERN const struct lpc31_clkinit_s g_boardclks; EXTERN const struct lpc31_clkinit_s g_boardclks;
/************************************************************************ /**********************************************************************************************
* Inline Functions * Inline Functions
************************************************************************/ **********************************************************************************************/
/************************************************************************ /**********************************************************************************************
* Name: lpc31_getbasefreq * Name: lpc31_getbasefreq
* *
* Description: * Description:
* Return the base frequency associated with a clock domain * Return the base frequency associated with a clock domain
* *
************************************************************************/ **********************************************************************************************/
static inline uint32_t lpc31_getbasefreq(enum lpc31_domainid_e dmnid) 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]; return g_boardfreqin[ndx];
} }
/************************************************************************ /**********************************************************************************************
* Name: lpc31_enableclock * Name: lpc31_enableclock
* *
* Description: * Description:
* Enable the specified clock * Enable the specified clock
* *
************************************************************************/ **********************************************************************************************/
static inline void lpc31_enableclock(enum lpc31_clockid_e clkid) 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); putreg32(regval, address);
} }
/************************************************************************ /**********************************************************************************************
* Name: lpc31_disableclock * Name: lpc31_disableclock
* *
* Description: * Description:
* Disable the specified clock * Disable the specified clock
* *
************************************************************************/ **********************************************************************************************/
static inline void lpc31_disableclock(enum lpc31_clockid_e clkid) 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); putreg32(regval, address);
} }
/************************************************************************ /**********************************************************************************************
* Public Functions * Public Functions
************************************************************************/ **********************************************************************************************/
/**************************************************************************** /**************************************************************************************************
* Name: lpc31_defclk * Name: lpc31_defclk
* *
* Description: * Description:
* Enable the specified clock if it is one of the default clocks needed * Enable the specified clock if it is one of the default clocks needed by the board.
* by the board.
* *
****************************************************************************/ **************************************************************************************************/
EXTERN bool lpc31_defclk(enum lpc31_clockid_e clkid); bool lpc31_defclk(enum lpc31_clockid_e clkid);
/**************************************************************************** /**************************************************************************************************
* Name: lpc31_resetclks * Name: lpc31_resetclks
* *
* Description: * Description:
* Put all clocks into a known, initial state * Put all clocks into a known, initial state
* *
****************************************************************************/ **************************************************************************************************/
EXTERN void lpc31_resetclks(void); void lpc31_resetclks(void);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_clkinit * Name: lpc31_clkinit
* *
* Description: * Description:
* Initialize all clock domains based on board-specific clock * Initialize all clock domains based on board-specific clock configuration data
* configuration data
* *
************************************************************************/ **********************************************************************************************/
EXTERN void lpc31_clkinit(const struct lpc31_clkinit_s* cfg); void lpc31_clkinit(const struct lpc31_clkinit_s* cfg);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_fdivinit * Name: lpc31_fdivinit
* *
* Description: * Description:
* Enable and configure (or disable) a fractional divider. For * Enable and configure (or disable) a fractional divider. For internal us only... see
* internal us only... see lpc31_setfdiv() the externally usable * lpc31_setfdiv() the externally usable function.
* function.
* *
************************************************************************/ **********************************************************************************************/
EXTERN uint32_t lpc31_fdivinit(int fdcndx, uint32_t lpc31_fdivinit(int fdcndx, const struct lpc31_fdivconfig_s *fdiv, bool enable);
const struct lpc31_fdivconfig_s *fdiv,
bool enable);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_setfdiv * Name: lpc31_setfdiv
* *
* Description: * Description:
* Set/reset subdomain frequency containing the specified clock using * Set/reset subdomain frequency containing the specified clock using the provided divider
* the provided divider settings * settings
* *
************************************************************************/ **********************************************************************************************/
EXTERN void lpc31_setfdiv(enum lpc31_domainid_e dmnid, void lpc31_setfdiv(enum lpc31_domainid_e dmnid, enum lpc31_clockid_e clkid,
enum lpc31_clockid_e clkid, const struct lpc31_fdivconfig_s *fdiv);
const struct lpc31_fdivconfig_s *fdiv);
/**************************************************************************** /**************************************************************************************************
* Name: lpc31_pllconfig * Name: lpc31_pllconfig
* *
* Description: * Description:
* Re-onfigure the PLL according to the provided selections. * 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 * Name: lpc31_hp0pllconfig
* *
* Description: * Description:
* Configure the HP0 PLL according to the board.h default selections. * Configure the HP0 PLL according to the board.h default selections.
* *
************************************************************************/ **********************************************************************************************/
EXTERN void lpc31_hp0pllconfig(void); void lpc31_hp0pllconfig(void);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_hp1pllconfig * Name: lpc31_hp1pllconfig
* *
* Description: * Description:
* Configure the HP1 PLL according to the board.h default selections. * Configure the HP1 PLL according to the board.h default selections.
* *
************************************************************************/ **********************************************************************************************/
EXTERN void lpc31_hp1pllconfig(void); void lpc31_hp1pllconfig(void);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_softreset * Name: lpc31_softreset
* *
* Description: * Description:
* Perform a soft reset on the specified module. * 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 * Name: lpc31_clkdomain
* *
* Description: * Description:
* Given a clock ID, return the ID of the domain in which the clock * Given a clock ID, return the ID of the domain in which the clock resides.
* 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 * Name: lpc31_esrndx
* *
* Description: * Description:
* Given a clock ID, return the index of the corresponding ESR * Given a clock ID, return the index of the corresponding ESR register (or ESRNDX_INVALID
* register (or ESRNDX_INVALID if there is no ESR associated with * if there is no ESR associated with this clock ID). Indexing of ESRs differs slightly
* this clock ID). Indexing of ESRs differs slightly from the clock * from the clock ID: There are 92 clock IDs but only 89 ESR regisers. There are no ESR
* ID: There are 92 clock IDs but only 89 ESR regisers. There are no * registers for :
* ESR registers for :
* *
* *
* CLKID_I2SRXBCK0 Clock ID 87: I2SRX_BCK0 * 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 * 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 * Name: lpc31_bcrndx
* *
* Description: * Description:
* Only 5 of the 12 domains have an associated BCR register. This * Only 5 of the 12 domains have an associated BCR register. This function returns the
* function returns the index to the associated BCR register (if any) * index to the associated BCR register (if any) or BCRNDX_INVALID otherwise.
* or BCRNDX_INVALID otherwise.
* *
************************************************************************/ **********************************************************************************************/
EXTERN int lpc31_bcrndx(enum lpc31_domainid_e dmnid); int lpc31_bcrndx(enum lpc31_domainid_e dmnid);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_fdcndx * Name: lpc31_fdcndx
* *
* Description: * Description:
* Given a clock ID and its domain ID, return the index of the * Given a clock ID and its domain ID, return the index of the corresponding fractional
* corresponding fractional divider register (or FDCNDX_INVALID if * divider register (or FDCNDX_INVALID if there is no fractional divider associated with
* there is no fractional divider associated with this clock). * this clock).
* *
************************************************************************/ **********************************************************************************************/
EXTERN int lpc31_fdcndx(enum lpc31_clockid_e clkid, int lpc31_fdcndx(enum lpc31_clockid_e clkid, enum lpc31_domainid_e dmnid);
enum lpc31_domainid_e dmnid);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_selectfreqin * Name: lpc31_selectfreqin
* *
* Description: * Description:
* Set the base frequency source selection for with a clock domain * Set the base frequency source selection for with a clock domain
* *
************************************************************************/ **********************************************************************************************/
EXTERN void lpc31_selectfreqin(enum lpc31_domainid_e dmnid, void lpc31_selectfreqin(enum lpc31_domainid_e dmnid, uint32_t finsel);
uint32_t finsel);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_clkfreq * Name: lpc31_clkfreq
* *
* Description: * Description:
* Given a clock ID and its domain ID, return the frequency of the * Given a clock ID and its domain ID, return the frequency of the clock.
* clock.
* *
************************************************************************/ **********************************************************************************************/
EXTERN uint32_t lpc31_clkfreq(enum lpc31_clockid_e clkid, uint32_t lpc31_clkfreq(enum lpc31_clockid_e clkid, enum lpc31_domainid_e dmnid);
enum lpc31_domainid_e dmnid);
/************************************************************************ /**********************************************************************************************
* Name: lpc31_enableexten * Name: lpc31_enableexten
* *
* Description: * Description:
* Enable external enabling for the specified possible clocks. * 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 * Name: lpc31_disableexten
* *
* Description: * Description:
* Disable external enabling for the specified possible clocks. * 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 #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+8 -7
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/lpc43/chip/lpc43_spifi.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -249,7 +249,8 @@ struct spifi_driver_s
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -258,12 +259,12 @@ extern "C" {
* Public Functions * 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); uint32_t options, uint32_t mhz);
EXTERN int32_t spifi_program(struct spifi_dev_s *dev, const uint8_t *source, int32_t spifi_program(struct spifi_dev_s *dev, const uint8_t *source,
struct spifi_operands_s *opers); struct spifi_operands_s *opers);
EXTERN int32_t spifi_erase(struct spifi_dev_s *dev, int32_t spifi_erase(struct spifi_dev_s *dev,
struct spifi_operands_s *opers); struct spifi_operands_s *opers);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+4 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/lpc43xx/lpc43_cgu.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -80,7 +81,7 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN void lpc43_clockconfig(void); void lpc43_clockconfig(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/lpc43xx/lpc43_dac.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+12 -13
View File
@@ -109,7 +109,8 @@ struct lpc43_dmaregs_s
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -129,7 +130,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN void lpc43_dmainitilaize(void); void lpc43_dmainitilaize(void);
/**************************************************************************** /****************************************************************************
* Name: lpc43_dmachannel * 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 * 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 * Name: lpc43_dmasetup
@@ -170,10 +171,8 @@ EXTERN void lpc43_dmafree(DMA_HANDLE handle);
* *
****************************************************************************/ ****************************************************************************/
EXTERN int lpc43_dmarxsetup(DMA_HANDLE handle, int lpc43_dmarxsetup(DMA_HANDLE handle, uint32_t control, uint32_t config,
uint32_t control, uint32_t config, uint32_t srcaddr, uint32_t destaddr, size_t nbytes);
uint32_t srcaddr, uint32_t destaddr,
size_t nbytes);
/**************************************************************************** /****************************************************************************
* Name: lpc43_dmastart * 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 * 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 * Name: lpc43_dmasample
@@ -206,7 +205,7 @@ EXTERN void lpc43_dmastop(DMA_HANDLE handle);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_DEBUG_DMA #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 #else
# define lpc43_dmasample(handle,regs) # define lpc43_dmasample(handle,regs)
#endif #endif
@@ -220,8 +219,8 @@ EXTERN void lpc43_dmasample(DMA_HANDLE handle, struct lpc43_dmaregs_s *regs);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_DEBUG_DMA #ifdef CONFIG_DEBUG_DMA
EXTERN void lpc43_dmadump(DMA_HANDLE handle, const struct lpc43_dmaregs_s *regs, void lpc43_dmadump(DMA_HANDLE handle, const struct lpc43_dmaregs_s *regs,
const char *msg); const char *msg);
#else #else
# define lpc43_dmadump(handle,regs,msg) # define lpc43_dmadump(handle,regs,msg)
#endif #endif
+7 -6
View File
@@ -1,7 +1,7 @@
/******************************************************************************************** /********************************************************************************************
* arch/arm/src/lpc43xx/lpc43_gpio.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -252,7 +252,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * 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 * 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 * Function: lpc43_gpio_dump
@@ -310,7 +311,7 @@ EXTERN bool lpc43_gpio_read(uint16_t gpiocfg);
********************************************************************************************/ ********************************************************************************************/
#ifdef CONFIG_DEBUG #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 #else
# define lpc43_gpio_dump(p,m) # define lpc43_gpio_dump(p,m)
#endif #endif
+4 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/lpc43xx/lpc43_irq.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -81,7 +82,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN void lpc43_clrpend(int irq); void lpc43_clrpend(int irq);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+5 -4
View File
@@ -1,7 +1,7 @@
/******************************************************************************************** /********************************************************************************************
* arch/arm/src/lpc43xx/lpc43_pinconfig.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -230,7 +230,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * Function: lpc43_pin_dump
@@ -264,7 +265,7 @@ EXTERN int lpc43_pin_config(uint32_t pinconf);
********************************************************************************************/ ********************************************************************************************/
#ifdef CONFIG_DEBUG #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 #else
# define lpc43_pin_dump(p,m) # define lpc43_pin_dump(p,m)
#endif #endif
+4 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/lpc43xx/lpc43_rgu.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -81,7 +82,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN void lpc43_softreset(void); void lpc43_softreset(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+21 -24
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/lpc43xx/lpc43_spi.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * 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, void lpc43_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
bool selected); uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
EXTERN uint8_t lpc43_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA #ifdef CONFIG_SPI_CMDDATA
EXTERN int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, int lpc43_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
bool cmd);
#endif #endif
/**************************************************************************** /************************************************************************************
* Name: spi_flush * Name: spi_flush
* *
* Description: * Description:
* Flush and discard any words left in the RX fifo. This can be called * Flush and discard any words left in the RX fifo. This can be called from
* from spiselect after a device is deselected (if you worry about such * spiselect after a device is deselected (if you worry about such things).
* things).
* *
* Input Parameters: * Input Parameters:
* dev - Device-specific state data * 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: * Returned Value:
* None * None
* *
****************************************************************************/ ************************************************************************************/
EXTERN void spi_flush(FAR struct spi_dev_s *dev); void spi_flush(FAR struct spi_dev_s *dev);
/**************************************************************************** /************************************************************************************
* Name: lpc43_spi/spiregister * Name: lpc43_spi/spiregister
* *
* Description: * Description:
* If the board supports a card detect callback to inform the SPI-based * If the board supports a card detect callback to inform the SPI-based MMC/SD
* MMC/SD drvier when an SD card is inserted or removed, then * driver when an SD card is inserted or removed, then CONFIG_SPI_CALLBACK should
* CONFIG_SPI_CALLBACK should be defined and the following function(s) must * be defined and the following function(s) must must be implemented. These
* must be implemented. These functiosn implements the registercallback * functions implements the registercallback method of the SPI interface (see
* method of the SPI interface (see include/nuttx/spi/spi.h for details) * include/nuttx/spi/spi.h for details)
* *
* Input Parameters: * Input Parameters:
* dev - Device-specific state data * 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 * arg - A caller provided value to return with the callback
* *
* Returned Value: * Returned Value:
* 0 on success; negated errno on failure. * 0 on success; negated errno on failure.
* *
****************************************************************************/ ************************************************************************************/
#ifdef CONFIG_SPI_CALLBACK #ifdef CONFIG_SPI_CALLBACK
EXTERN int lpc43_spiregister(FAR struct spi_dev_s *dev, int lpc43_spiregister(FAR struct spi_dev_s *dev, spi_mediachange_t callback, void *arg);
spi_mediachange_t callback, void *arg);
#endif #endif
#undef EXTERN #undef EXTERN
+18 -17
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/lpc43xx/lpc43_ssp.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -98,7 +99,7 @@ extern "C" {
* port - Port number (0=SSP0, 1=SSP1) * port - Port number (0=SSP0, 1=SSP1)
* *
* Returned Value: * 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 #ifdef CONFIG_LPC43_SSP0
EXTERN void lpc43_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); 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); uint8_t lpc43_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA #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
#endif #endif
#ifdef CONFIG_LPC43_SSP1 #ifdef CONFIG_LPC43_SSP1
EXTERN void lpc43_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); 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); uint8_t lpc43_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA #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
#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) #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 #endif
/**************************************************************************** /****************************************************************************
@@ -160,14 +161,14 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
* *
* Description: * Description:
* If the board supports a card detect callback to inform the SPI-based * 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 * 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) * method of the SPI interface (see include/nuttx/spi/spi.h for details)
* *
* Input Parameters: * Input Parameters:
* dev - Device-specific state data * 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 * arg - A caller provided value to return with the callback
* *
* Returned Value: * Returned Value:
@@ -177,13 +178,13 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
#ifdef CONFIG_SPI_CALLBACK #ifdef CONFIG_SPI_CALLBACK
#ifdef CONFIG_LPC43_SSP0 #ifdef CONFIG_LPC43_SSP0
EXTERN int lpc43_ssp0register(FAR struct spi_dev_s *dev, int lpc43_ssp0register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_LPC43_SSP1 #ifdef CONFIG_LPC43_SSP1
EXTERN int lpc43_ssp1register(FAR struct spi_dev_s *dev, int lpc43_ssp1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#endif #endif
+13 -12
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/lpc43xx/lpc43_uart.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * Name: lpc43_usart0_reset, lpc43_uart1_reset, lpc43_usart2_reset, and
@@ -92,16 +93,16 @@ EXTERN void lpc43_lowsetup(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_LPC43_USART0 #ifdef CONFIG_LPC43_USART0
EXTERN void lpc43_usart0_reset(void); void lpc43_usart0_reset(void);
#endif #endif
#ifdef CONFIG_LPC43_UART1 #ifdef CONFIG_LPC43_UART1
EXTERN void lpc43_uart1_reset(void); void lpc43_uart1_reset(void);
#endif #endif
#ifdef CONFIG_LPC43_USART2 #ifdef CONFIG_LPC43_USART2
EXTERN void lpc43_usart2_reset(void); void lpc43_usart2_reset(void);
#endif #endif
#ifdef CONFIG_LPC43_USART3 #ifdef CONFIG_LPC43_USART3
EXTERN void lpc43_usart3_reset(void); void lpc43_usart3_reset(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -118,19 +119,19 @@ EXTERN void lpc43_usart3_reset(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_LPC43_USART0 #ifdef CONFIG_LPC43_USART0
EXTERN void lpc43_usart0_setup(void); void lpc43_usart0_setup(void);
#endif #endif
#ifdef CONFIG_LPC43_UART1 #ifdef CONFIG_LPC43_UART1
EXTERN void lpc43_uart1_setup(void); void lpc43_uart1_setup(void);
#endif #endif
#ifdef CONFIG_LPC43_USART2 #ifdef CONFIG_LPC43_USART2
EXTERN void lpc43_usart2_setup(void); void lpc43_usart2_setup(void);
#endif #endif
#ifdef CONFIG_LPC43_USART3 #ifdef CONFIG_LPC43_USART3
EXTERN void lpc43_usart3_setup(void); void lpc43_usart3_setup(void);
#endif #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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+5 -6
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/lpc43xx/lpc43_usbdev.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -68,12 +69,10 @@ extern "C" {
* If USB is supported and the board supports a pullup via GPIO (for USB software * 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. * connect and disconnect), then the board software must provide lpc43_pullup.
* See include/nuttx/usb/usbdev.h for additional description of this method. * 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 * 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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/sam34/sam_wdt.h * 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> * Authors: Gregory Nutt <gnutt@nuttx.org>
* Bob Doiron * Bob Doiron
* *
@@ -57,7 +57,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -84,7 +85,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SAM34_WDT #ifdef CONFIG_SAM34_WDT
EXTERN void sam_wdtinitialize(FAR const char *devpath); void sam_wdtinitialize(FAR const char *devpath);
#endif #endif
#undef EXTERN #undef EXTERN
+5 -4
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_adc.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -571,7 +571,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -593,8 +594,8 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct adc_dev_s; struct adc_dev_s;
EXTERN struct adc_dev_s *stm32_adcinitialize(int intf, const uint8_t *chanlist, struct adc_dev_s *stm32_adcinitialize(int intf, const uint8_t *chanlist,
int nchannels); int nchannels);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+4 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_can.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -133,7 +134,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct can_dev_s; 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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_dac.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -107,7 +107,8 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -127,7 +128,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct dac_dev_s; 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 #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_eth.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -57,7 +57,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -82,7 +83,7 @@ extern "C" {
************************************************************************************/ ************************************************************************************/
#if STM32_NETHERNET > 1 #if STM32_NETHERNET > 1
EXTERN int stm32_ethinitialize(int intf); int stm32_ethinitialize(int intf);
#endif #endif
/************************************************************************************ /************************************************************************************
@@ -106,7 +107,7 @@ EXTERN int stm32_ethinitialize(int intf);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_STM32_PHYINIT #ifdef CONFIG_STM32_PHYINIT
EXTERN int stm32_phy_boardinitialize(int intf); int stm32_phy_boardinitialize(int intf);
#endif #endif
#undef EXTERN #undef EXTERN
+12 -12
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_exti.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -84,30 +85,29 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func); bool event, xcpt_t func);
/**************************************************************************** /************************************************************************************
* Name: stm32_exti_alarm * Name: stm32_exti_alarm
* *
* Description: * Description:
* Sets/clears EXTI alarm interrupt. * Sets/clears EXTI alarm interrupt.
* *
* Parameters: * Parameters:
* - rising/falling edge: enables interrupt on rising/falling edget * - rising/falling edge: enables interrupt on rising/falling edges
* - event: generate event when set * - event: generate event when set
* - func: when non-NULL, generate interrupt * - func: when non-NULL, generate interrupt
* *
* Returns: * Returns:
* The previous value of the interrupt handler function pointer. This * The previous value of the interrupt handler function pointer. This value may,
* value may, for example, be used to restore the previous handler when * for example, be used to restore the previous handler when multiple handlers are
* multiple handlers are used. * used.
* *
****************************************************************************/ ************************************************************************************/
#ifdef CONFIG_RTC_ALARM #ifdef CONFIG_RTC_ALARM
EXTERN xcpt_t stm32_exti_alarm(bool risingedge, bool fallingedge, bool event, xcpt_t stm32_exti_alarm(bool risingedge, bool fallingedge, bool event, xcpt_t func);
xcpt_t func);
#endif #endif
#undef EXTERN #undef EXTERN
+11 -10
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_gpio.h * 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. * Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* Uros Platise <uros.platise@isotel.eu> * Uros Platise <uros.platise@isotel.eu>
@@ -408,7 +408,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * 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 * 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 * 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 * 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, xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge,
bool event, xcpt_t func); bool event, xcpt_t func);
/************************************************************************************ /************************************************************************************
* Function: stm32_dumpgpio * Function: stm32_dumpgpio
@@ -510,7 +511,7 @@ EXTERN xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallinge
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
EXTERN int stm32_dumpgpio(uint32_t pinset, const char *msg); int stm32_dumpgpio(uint32_t pinset, const char *msg);
#else #else
# define stm32_dumpgpio(p,m) # define stm32_dumpgpio(p,m)
#endif #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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_lowputc.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -67,7 +68,7 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN void stm32_lowsetup(void); void stm32_lowsetup(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_pwm.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -332,7 +332,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+6 -5
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_sdio.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -76,7 +77,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct sdio_dev_s; /* See include/nuttx/sdio.h */ 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 * 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 * 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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+20 -20
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_spi.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * 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); int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif #endif
/**************************************************************************** /************************************************************************************
* Name: stm32_spi1/2/...register * Name: stm32_spi1/2/...register
* *
* Description: * Description:
* If the board supports a card detect callback to inform the SPI-based * If the board supports a card detect callback to inform the SPI-based MMC/SD
* MMC/SD drvier when an SD card is inserted or removed, then * driver when an SD card is inserted or removed, then CONFIG_SPI_CALLBACK should
* CONFIG_SPI_CALLBACK should be defined and the following function(s) must * be defined and the following function(s) must be implemented. These functions
* be implemented. These functiosn implements the registercallback method * implements the registercallback method of the SPI interface (see
* of the SPI interface (see include/nuttx/spi/spi.h for details) * include/nuttx/spi/spi.h for details)
* *
* Input Parameters: * Input Parameters:
* dev - Device-specific state data * 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 * arg - A caller provided value to return with the callback
* *
* Returned Value: * 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_SPI_CALLBACK
#ifdef CONFIG_STM32_SPI1 #ifdef CONFIG_STM32_SPI1
EXTERN int stm32_spi1register(FAR struct spi_dev_s *dev, int stm32_spi1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_STM32_SPI2 #ifdef CONFIG_STM32_SPI2
EXTERN int stm32_spi2register(FAR struct spi_dev_s *dev, int stm32_spi2register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_STM32_SPI3 #ifdef CONFIG_STM32_SPI3
EXTERN int stm32_spi3register(FAR struct spi_dev_s *dev, int stm32_spi3register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_STM32_SPI4 #ifdef CONFIG_STM32_SPI4
EXTERN int stm32_spi4register(FAR struct spi_dev_s *dev, int stm32_spi4register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_STM32_SPI5 #ifdef CONFIG_STM32_SPI5
EXTERN int stm32_spi5register(FAR struct spi_dev_s *dev, int stm32_spi5register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#ifdef CONFIG_STM32_SPI6 #ifdef CONFIG_STM32_SPI6
EXTERN int stm32_spi6register(FAR struct spi_dev_s *dev, int stm32_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback,
spi_mediachange_t callback, void *arg); FAR void *arg);
#endif #endif
#endif #endif
+10 -9
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_uart.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -322,7 +322,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -331,21 +332,21 @@ extern "C" {
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
/**************************************************************************** /************************************************************************************
* Name: stm32_serial_dma_poll * Name: stm32_serial_dma_poll
* *
* Description: * Description:
* Must be called periodically if any STM32 UART is configured for DMA. * Must be called periodically if any STM32 UART is configured for DMA. The DMA
* The DMA callback is triggered for each fifo size/2 bytes, but this can * callback is triggered for each fifo size/2 bytes, but this can result in some
* result in some bytes being transferred but not collected if the incoming * bytes being transferred but not collected if the incoming data is not a whole
* data is not a whole multiple of half the FIFO size. * multiple of half the FIFO size.
* *
* May be safely called from either interrupt or thread context. * May be safely called from either interrupt or thread context.
* *
****************************************************************************/ ************************************************************************************/
#ifdef SERIAL_HAVE_DMA #ifdef SERIAL_HAVE_DMA
EXTERN void stm32_serial_dma_poll(void); void stm32_serial_dma_poll(void);
#endif #endif
#undef EXTERN #undef EXTERN
+5 -6
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_usbdev.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -68,12 +69,10 @@ extern "C" {
* If USB is supported and the board supports a pullup via GPIO (for USB software * 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. * connect and disconnect), then the board software must provide stm32_pullup.
* See include/nuttx/usb/usbdev.h for additional description of this method. * 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 * 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 #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+4 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/stm32/stm32_waste.h * 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> * Author: Uros Platise <uros.platise@isotel.eu>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -67,7 +68,7 @@ extern "C" {
* cannot be used for other purposes (yet). * cannot be used for other purposes (yet).
**/ **/
EXTERN void up_waste(void); void up_waste(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+7 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/stm32/stm32_wdg.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -69,8 +70,8 @@ extern "C" {
* Name: stm32_iwdginitialize * Name: stm32_iwdginitialize
* *
* Description: * Description:
* Initialize the IWDG watchdog time. The watchdog timer is initializeed and * Initialize the IWDG watchdog time. The watchdog timer is initialized
* registers as 'devpath. The initial state of the watchdog time is * and registers as 'devpath. The initial state of the watchdog time is
* disabled. * disabled.
* *
* Input Parameters: * Input Parameters:
@@ -84,7 +85,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_STM32_IWDG #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 #endif
/**************************************************************************** /****************************************************************************
@@ -105,7 +106,7 @@ EXTERN void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_STM32_WWDG #ifdef CONFIG_STM32_WWDG
EXTERN void stm32_wwdginitialize(FAR const char *devpath); void stm32_wwdginitialize(FAR const char *devpath);
#endif #endif
#undef EXTERN #undef EXTERN
+5 -5
View File
@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* SWI with SYS_ call number and six parameters */ /* SWI with SYS_ call number and six parameters */
#warning "REVISIT" #warning "REVISIT"
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm2, uintptr_t parm3, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */ /* SWI with SYS_ call number and no parameters */
+6 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/avr/include/avr32/syscall.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* SWI with SYS_ call number and six parameters */ /* SWI with SYS_ call number and six parameters */
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm2, uintptr_t parm3, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */ /* SWI with SYS_ call number and no parameters */
+6 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/avr/src/common/up_arch.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -69,16 +69,17 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* Atomic modification of registers */ /* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits); void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits); void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+6 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/hc/src/common/up_arch.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -72,16 +72,17 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* Atomic modification of registers */ /* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits); void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits); void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+13 -12
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/hc/src/m9s12/m9s12_internal.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -208,7 +208,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -225,7 +226,7 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN void hcs12_gpioirqinitialize(void); void hcs12_gpioirqinitialize(void);
/************************************************************************************ /************************************************************************************
* Name: hcs12_configgpio * 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 * 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 * 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 * Name: hcs12_gpioirqenable
@@ -266,7 +267,7 @@ EXTERN bool hcs12_gpioread(uint16_t pinset);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_GPIO_IRQ #ifdef CONFIG_GPIO_IRQ
EXTERN void hcs12_gpioirqenable(int irq); void hcs12_gpioirqenable(int irq);
#else #else
# define hcs12_gpioirqenable(irq) # define hcs12_gpioirqenable(irq)
#endif #endif
@@ -280,7 +281,7 @@ EXTERN void hcs12_gpioirqenable(int irq);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_GPIO_IRQ #ifdef CONFIG_GPIO_IRQ
EXTERN void hcs12_gpioirqdisable(int irq); void hcs12_gpioirqdisable(int irq);
#else #else
# define hcs12_gpioirqdisable(irq) # define hcs12_gpioirqdisable(irq)
#endif #endif
@@ -294,7 +295,7 @@ EXTERN void hcs12_gpioirqdisable(int irq);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_DEBUG_GPIO #ifdef CONFIG_DEBUG_GPIO
EXTERN int hcs12_dumpgpio(uint16_t pinset, const char *msg); int hcs12_dumpgpio(uint16_t pinset, const char *msg);
#else #else
# define hcs12_dumpgpio(p,m) # define hcs12_dumpgpio(p,m)
#endif #endif
@@ -319,7 +320,7 @@ EXTERN int hcs12_dumpgpio(uint16_t pinset, const char *msg);
************************************************************************************/ ************************************************************************************/
#if STM32_NTHERNET > 1 #if STM32_NTHERNET > 1
EXTERN int hcs12_ethinitialize(int intf); int hcs12_ethinitialize(int intf);
#endif #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); 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); uint8_t hcs12_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+2 -1
View File
@@ -84,7 +84,8 @@
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
+5 -4
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/include/mips32/irq.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * 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 #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -525,7 +526,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN irqstate_t irqsave(void); irqstate_t irqsave(void);
/**************************************************************************** /****************************************************************************
* Name: irqrestore * Name: irqrestore
@@ -542,7 +543,7 @@ EXTERN irqstate_t irqsave(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void irqrestore(irqstate_t irqtate); void irqrestore(irqstate_t irqtate);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+8 -7
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/include/mips32/syscall.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -202,7 +202,8 @@
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #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 * 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 * 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 * 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 sys_call3(unsigned int nbr, uintptr_t parm1, uintptr_t parm2
uintptr_t parm2, uintptr_t parm3); uintptr_t parm3);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+6 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/mips/src/common/up_arch.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -69,16 +69,17 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* Atomic modification of registers */ /* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits); void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits); void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+35 -36
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/sh/src/common/up_internal.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * 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 */ /* Defined in files with the same name as the function */
extern void up_boot(void); void up_boot(void);
extern void up_copystate(uint32_t *dest, uint32_t *src); void up_copystate(uint32_t *dest, uint32_t *src);
extern void up_dataabort(uint32_t *regs); void up_dataabort(uint32_t *regs);
extern void up_decodeirq(uint32_t *regs); void up_decodeirq(uint32_t *regs);
extern uint32_t *up_doirq(int irq, uint32_t *regs); uint32_t *up_doirq(int irq, uint32_t *regs);
extern void up_fullcontextrestore(uint32_t *regs) noreturn_function; void up_fullcontextrestore(uint32_t *regs) noreturn_function;
extern void up_irqinitialize(void); void up_irqinitialize(void);
extern void up_prefetchabort(uint32_t *regs); void up_prefetchabort(uint32_t *regs);
extern int up_saveusercontext(uint32_t *regs); int up_saveusercontext(uint32_t *regs);
extern void up_sigdeliver(void); void up_sigdeliver(void);
extern void up_syscall(uint32_t *regs); void up_syscall(uint32_t *regs);
extern int up_timerisr(int irq, uint32_t *regs); int up_timerisr(int irq, uint32_t *regs);
extern void up_undefinedinsn(uint32_t *regs); void up_undefinedinsn(uint32_t *regs);
extern void up_lowputc(char ch); void up_lowputc(char ch);
extern void up_puts(const char *str); void up_puts(const char *str);
extern void up_lowputs(const char *str); void up_lowputs(const char *str);
/* Defined in up_vectors.S */ /* Defined in up_vectors.S */
extern void up_vectorundefinsn(void); void up_vectorundefinsn(void);
extern void up_vectorswi(void); void up_vectorswi(void);
extern void up_vectorprefetch(void); void up_vectorprefetch(void);
extern void up_vectordata(void); void up_vectordata(void);
extern void up_vectoraddrexcptn(void); void up_vectoraddrexcptn(void);
extern void up_vectorirq(void); void up_vectorirq(void);
extern void up_vectorfiq(void); void up_vectorfiq(void);
/* Defined in up_serial.c */ /* Defined in up_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0 #if CONFIG_NFILE_DESCRIPTORS > 0
extern void up_earlyconsoleinit(void); void up_earlyconsoleinit(void);
extern void up_consoleinit(void); void up_consoleinit(void);
#else #else
# define up_earlyconsoleinit() # define up_earlyconsoleinit()
# define up_consoleinit() # define up_consoleinit()
@@ -195,24 +195,24 @@ extern void up_consoleinit(void);
/* Defined in drivers/lowconsole.c */ /* Defined in drivers/lowconsole.c */
#ifdef CONFIG_DEV_LOWCONSOLE #ifdef CONFIG_DEV_LOWCONSOLE
extern void lowconsole_init(void); void lowconsole_init(void);
#else #else
# define lowconsole_init() # define lowconsole_init()
#endif #endif
/* Defined in up_watchdog.c */ /* Defined in up_watchdog.c */
extern void up_wdtinit(void); void up_wdtinit(void);
/* Defined in up_timerisr.c */ /* Defined in up_timerisr.c */
extern void up_timer_initialize(void); void up_timer_initialize(void);
/* Defined in board/up_lcd.c */ /* Defined in board/up_lcd.c */
#ifdef CONFIG_LCD_CONSOLE #ifdef CONFIG_LCD_CONSOLE
extern void up_lcdinit(void); void up_lcdinit(void);
extern void up_lcdputc(char ch); void up_lcdputc(char ch);
#else #else
# define up_lcdinit() # define up_lcdinit()
# define up_lcdputc(ch) # define up_lcdputc(ch)
@@ -221,7 +221,7 @@ extern void up_lcdputc(char ch);
/* Defined in board/up_network.c */ /* Defined in board/up_network.c */
#ifdef CONFIG_NET #ifdef CONFIG_NET
extern void up_netinitialize(void); void up_netinitialize(void);
#else #else
# define up_netinitialize() # define up_netinitialize()
#endif #endif
@@ -229,8 +229,8 @@ extern void up_netinitialize(void);
/* USB */ /* USB */
#ifdef CONFIG_USBDEV #ifdef CONFIG_USBDEV
extern void up_usbinitialize(void); void up_usbinitialize(void);
extern void up_usbuninitialize(void); void up_usbuninitialize(void);
#else #else
# define up_usbinitialize() # define up_usbinitialize()
# define up_usbuninitialize() # define up_usbuninitialize()
@@ -239,11 +239,10 @@ extern void up_usbuninitialize(void);
/* Defined in chip-specific logic */ /* Defined in chip-specific logic */
#ifdef CONFIG_ARCH_STACKDUMP #ifdef CONFIG_ARCH_STACKDUMP
extern void up_dumpstate(void); void up_dumpstate(void);
#else #else
# define up_dumpstate() # define up_dumpstate()
#endif #endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H */ #endif /* ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H */
+5 -4
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/x86/include/i486/arch.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -435,13 +435,14 @@ static inline uint32_t up_getss()
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN void gdt_flush(uint32_t gdt_addr); void gdt_flush(uint32_t gdt_addr);
EXTERN void idt_flush(uint32_t idt_addr); void idt_flush(uint32_t idt_addr);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+6 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/x86/include/i486/syscall.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -68,17 +68,17 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* SWI with SYS_ call number and six parameters */ /* SWI with SYS_ call number and six parameters */
EXTERN uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t sys_call6(unsigned int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm2, uintptr_t parm3, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
uintptr_t parm6);
/* SWI with SYS_ call number and no parameters */ /* SWI with SYS_ call number and no parameters */
+6 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/x86/src/common/up_arch.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -70,16 +70,17 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* Atomic modification of registers */ /* Atomic modification of registers */
EXTERN void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits); void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
EXTERN void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits); void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
EXTERN void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+76 -77
View File
@@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/x86/src/qemu/qemu_internal.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -73,7 +73,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -92,7 +93,7 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN void i486_clockconfig(void); void i486_clockconfig(void);
/************************************************************************************ /************************************************************************************
* Name: i486_lowsetup * Name: i486_lowsetup
@@ -104,7 +105,7 @@ EXTERN void i486_clockconfig(void);
* *
************************************************************************************/ ************************************************************************************/
EXTERN void i486_lowsetup(void); void i486_lowsetup(void);
/************************************************************************************ /************************************************************************************
* Name: i486_gpioirqinitialize * Name: i486_gpioirqinitialize
@@ -115,7 +116,7 @@ EXTERN void i486_lowsetup(void);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_GPIO_IRQ #ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqinitialize(void); void i486_gpioirqinitialize(void);
#else #else
# define i486_gpioirqinitialize() # define i486_gpioirqinitialize()
#endif #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 * 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 * 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 * Name: i486_gpioirqenable
@@ -159,7 +160,7 @@ EXTERN bool i486_gpioread(uint16_t pinset);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_GPIO_IRQ #ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqenable(int irq); void i486_gpioirqenable(int irq);
#else #else
# define i486_gpioirqenable(irq) # define i486_gpioirqenable(irq)
#endif #endif
@@ -173,7 +174,7 @@ EXTERN void i486_gpioirqenable(int irq);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_GPIO_IRQ #ifdef CONFIG_GPIO_IRQ
EXTERN void i486_gpioirqdisable(int irq); void i486_gpioirqdisable(int irq);
#else #else
# define i486_gpioirqdisable(irq) # define i486_gpioirqdisable(irq)
#endif #endif
@@ -187,7 +188,7 @@ EXTERN void i486_gpioirqdisable(int irq);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_DEBUG_GPIO #ifdef CONFIG_DEBUG_GPIO
EXTERN int i486_dumpgpio(uint16_t pinset, const char *msg); int i486_dumpgpio(uint16_t pinset, const char *msg);
#else #else
# define i486_dumpgpio(p,m) # define i486_dumpgpio(p,m)
#endif #endif
@@ -225,10 +226,10 @@ struct spi_dev_s;
enum spi_dev_e; enum spi_dev_e;
#ifdef CONFIG_I486_SPI #ifdef CONFIG_I486_SPI
EXTERN void i486_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); 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); uint8_t i486_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA #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
#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; struct spi_dev_s;
#ifdef CONFIG_I486_SPI #ifdef CONFIG_I486_SPI
EXTERN void spi_flush(FAR struct spi_dev_s *dev); void spi_flush(FAR struct spi_dev_s *dev);
#endif #endif
#if defined(CONFIG_I486_SSP0) || defined(CONFIG_I486_SSP1) #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 #endif
/**************************************************************************** /****************************************************************************
@@ -268,7 +269,7 @@ EXTERN void ssp_flush(FAR struct spi_dev_s *dev);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmainitilaize(void); void i486_dmainitilaize(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -286,7 +287,7 @@ EXTERN void i486_dmainitilaize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
EXTERN DMA_HANDLE i486_dmachannel(void); DMA_HANDLE i486_dmachannel(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -303,7 +304,7 @@ EXTERN DMA_HANDLE i486_dmachannel(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmafree(DMA_HANDLE handle); void i486_dmafree(DMA_HANDLE handle);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -315,10 +316,8 @@ EXTERN void i486_dmafree(DMA_HANDLE handle);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
EXTERN int i486_dmarxsetup(DMA_HANDLE handle, int i486_dmarxsetup(DMA_HANDLE handle, uint32_t control, uint32_t config,
uint32_t control, uint32_t config, uint32_t srcaddr, uint32_t destaddr, size_t nbytes);
uint32_t srcaddr, uint32_t destaddr,
size_t nbytes);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -330,7 +329,7 @@ EXTERN int i486_dmarxsetup(DMA_HANDLE handle,
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #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 #endif
/**************************************************************************** /****************************************************************************
@@ -344,7 +343,7 @@ EXTERN int i486_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
EXTERN void i486_dmastop(DMA_HANDLE handle); void i486_dmastop(DMA_HANDLE handle);
#endif #endif
/**************************************************************************** /****************************************************************************
@@ -357,7 +356,7 @@ EXTERN void i486_dmastop(DMA_HANDLE handle);
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
#ifdef CONFIG_DEBUG_DMA #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 #else
# define i486_dmasample(handle,regs) # define i486_dmasample(handle,regs)
#endif #endif
@@ -373,8 +372,8 @@ EXTERN void i486_dmasample(DMA_HANDLE handle, struct i486_dmaregs_s *regs);
#ifdef CONFIG_I486_GPDMA #ifdef CONFIG_I486_GPDMA
#ifdef CONFIG_DEBUG_DMA #ifdef CONFIG_DEBUG_DMA
EXTERN void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs, void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs,
const char *msg); const char *msg);
#else #else
# define i486_dmadump(handle,regs,msg) # define i486_dmadump(handle,regs,msg)
#endif #endif
@@ -386,58 +385,58 @@ EXTERN void i486_dmadump(DMA_HANDLE handle, const struct i486_dmaregs_s *regs,
* Description: * Description:
* These are the various ISR/IRQ vector address exported from * These are the various ISR/IRQ vector address exported from
* qemu_vectors.S. These addresses need to have global scope so that they * 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); void vector_isr0(void);
EXTERN void vector_isr1(void); void vector_isr1(void);
EXTERN void vector_isr2(void); void vector_isr2(void);
EXTERN void vector_isr3(void); void vector_isr3(void);
EXTERN void vector_isr4(void); void vector_isr4(void);
EXTERN void vector_isr5(void); void vector_isr5(void);
EXTERN void vector_isr6(void); void vector_isr6(void);
EXTERN void vector_isr7(void); void vector_isr7(void);
EXTERN void vector_isr8(void); void vector_isr8(void);
EXTERN void vector_isr9(void); void vector_isr9(void);
EXTERN void vector_isr10(void); void vector_isr10(void);
EXTERN void vector_isr11(void); void vector_isr11(void);
EXTERN void vector_isr12(void); void vector_isr12(void);
EXTERN void vector_isr13(void); void vector_isr13(void);
EXTERN void vector_isr14(void); void vector_isr14(void);
EXTERN void vector_isr15(void); void vector_isr15(void);
EXTERN void vector_isr16(void); void vector_isr16(void);
EXTERN void vector_isr17(void); void vector_isr17(void);
EXTERN void vector_isr18(void); void vector_isr18(void);
EXTERN void vector_isr19(void); void vector_isr19(void);
EXTERN void vector_isr20(void); void vector_isr20(void);
EXTERN void vector_isr21(void); void vector_isr21(void);
EXTERN void vector_isr22(void); void vector_isr22(void);
EXTERN void vector_isr23(void); void vector_isr23(void);
EXTERN void vector_isr24(void); void vector_isr24(void);
EXTERN void vector_isr25(void); void vector_isr25(void);
EXTERN void vector_isr26(void); void vector_isr26(void);
EXTERN void vector_isr27(void); void vector_isr27(void);
EXTERN void vector_isr28(void); void vector_isr28(void);
EXTERN void vector_isr29(void); void vector_isr29(void);
EXTERN void vector_isr30(void); void vector_isr30(void);
EXTERN void vector_isr31(void); void vector_isr31(void);
EXTERN void vector_irq0(void); void vector_irq0(void);
EXTERN void vector_irq1(void); void vector_irq1(void);
EXTERN void vector_irq2(void); void vector_irq2(void);
EXTERN void vector_irq3(void); void vector_irq3(void);
EXTERN void vector_irq4(void); void vector_irq4(void);
EXTERN void vector_irq5(void); void vector_irq5(void);
EXTERN void vector_irq6(void); void vector_irq6(void);
EXTERN void vector_irq7(void); void vector_irq7(void);
EXTERN void vector_irq8(void); void vector_irq8(void);
EXTERN void vector_irq9(void); void vector_irq9(void);
EXTERN void vector_irq10(void); void vector_irq10(void);
EXTERN void vector_irq11(void); void vector_irq11(void);
EXTERN void vector_irq12(void); void vector_irq12(void);
EXTERN void vector_irq13(void); void vector_irq13(void);
EXTERN void vector_irq14(void); void vector_irq14(void);
EXTERN void vector_irq15(void); void vector_irq15(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+10 -9
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/z16/include/z16f/irq.h * 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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -220,22 +220,23 @@ struct xcptcontext
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
/* ZDS-II intrinsic functions (normally declared in zneo.h) */ /* ZDS-II intrinsic functions (normally declared in zneo.h) */
EXTERN intrinsic void EI(void); intrinsic void EI(void);
EXTERN intrinsic void DI(void); intrinsic void DI(void);
EXTERN intrinsic void RI(unsigned short); intrinsic void RI(unsigned short);
EXTERN intrinsic void SET_VECTOR(int,void (* func) (void)); intrinsic void SET_VECTOR(int,void (* func) (void));
EXTERN intrinsic unsigned short TDI(void); intrinsic unsigned short TDI(void);
#ifndef __ZILOG__ #ifndef __ZILOG__
EXTERN irqstate_t irqsave(void); irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags); void irqrestore(irqstate_t flags);
#endif #endif
#undef EXTERN #undef EXTERN
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/z80/include/ez80/io.h * arch/z80/include/ez80/io.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -70,13 +70,14 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN void outp(uint16_t p, uint8_t c); void outp(uint16_t p, uint8_t c);
EXTERN uint8_t inp(uint16_t p); uint8_t inp(uint16_t p);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/ez80/include/ez80/irq.h * arch/ez80/include/ez80/irq.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -244,13 +244,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN irqstate_t irqsave(void); irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags); void irqrestore(irqstate_t flags);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/z80/include/z80/io.h * arch/z80/include/z80/io.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -68,13 +68,14 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN void outp(char p, char c); void outp(char p, char c);
EXTERN char inp(char p); char inp(char p);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/z80/include/z180/irq.h * arch/z80/include/z180/irq.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -217,13 +217,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN irqstate_t irqsave(void) __naked; irqstate_t irqsave(void) __naked;
EXTERN void irqrestore(irqstate_t flags) __naked; void irqrestore(irqstate_t flags) __naked;
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/z8/include/z8/irq.h * arch/z8/include/z8/irq.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -350,13 +350,14 @@ struct xcptcontext
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN irqstate_t irqsave(void); irqstate_t irqsave(void);
EXTERN void irqrestore(irqstate_t flags); void irqrestore(irqstate_t flags);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -4
View File
@@ -2,7 +2,7 @@
* arch/z80/include/z80/io.h * arch/z80/include/z80/io.h
* arch/chip/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> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -68,13 +68,14 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN void outp(char p, char c); void outp(char p, char c);
EXTERN char inp(char p); char inp(char p);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus

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