Clean up and review of header files for conformance to standards

This commit is contained in:
Gregory Nutt 2015-06-12 18:07:47 -06:00
parent 46148524a9
commit d6ce8220fd
2 changed files with 14 additions and 12 deletions

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/lpc214x/irq.h * arch/lpc214x/irq.h
* *
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2008, 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
@ -110,14 +110,15 @@ typedef void (*vic_vector_t)(uint32_t *regs);
#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
#ifndef CONFIG_VECTORED_INTERRUPTS #ifndef CONFIG_VECTORED_INTERRUPTS
EXTERN void up_attach_vector(int irq, int vector, vic_vector_t handler); void up_attach_vector(int irq, int vector, vic_vector_t handler);
EXTERN void up_detach_vector(int vector); void up_detach_vector(int vector);
#endif #endif
#undef EXTERN #undef EXTERN

View File

@ -2,6 +2,7 @@
* arch/lpc2378/irq.h * arch/lpc2378/irq.h
* *
* Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Copyright (C) 2010 Rommel Marcelo. All rights reserved.
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Rommel Marcelo * Author: Rommel Marcelo
* *
* This file is part of the NuttX RTOS and based on the lpc2148 port: * This file is part of the NuttX RTOS and based on the lpc2148 port:
@ -131,14 +132,15 @@ typedef void (*vic_vector_t)(uint32_t *regs);
#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
#ifndef CONFIG_VECTORED_INTERRUPTS #ifndef CONFIG_VECTORED_INTERRUPTS
EXTERN void up_attach_vector(int irq, int priority, vic_vector_t handler); void up_attach_vector(int irq, int priority, vic_vector_t handler);
EXTERN void up_detach_vector(int vector); void up_detach_vector(int vector);
#endif #endif
#undef EXTERN #undef EXTERN
@ -148,4 +150,3 @@ EXTERN void up_detach_vector(int vector);
#endif #endif
#endif /* __ARCH_LPC2378_IRQ_H */ #endif /* __ARCH_LPC2378_IRQ_H */