Rename all use of up_boardinitialize(). Should not use common microprocessing naming convention but rather the microprocessor-specific naming conventioni

This commit is contained in:
Gregory Nutt 2015-02-28 07:14:37 -06:00
parent 429863f348
commit c29995fd85
10 changed files with 72 additions and 60 deletions

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/avr/src/at32uc3/at32uc3_internal.h * arch/avr/src/at32uc3/at32uc3_internal.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
@ -165,7 +165,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
@ -182,7 +183,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_clkinitialize(void); void up_clkinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: usart_reset * Name: usart_reset
@ -192,7 +193,7 @@ EXTERN void up_clkinitialize(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void usart_reset(uintptr_t usart_base); void usart_reset(uintptr_t usart_base);
/**************************************************************************** /****************************************************************************
* Name: usart_configure * Name: usart_configure
@ -215,18 +216,18 @@ void usart_configure(uintptr_t usart_base, uint32_t baud, unsigned int parity,
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_consoleinit(void); void up_consoleinit(void);
/**************************************************************************** /****************************************************************************
* Name: up_boardinit * Name: at32uc3_boardinitialize
* *
* Description: * Description:
* This function must be provided by the board-specific logic in the * This function must be provided by the board-specific logic in the
* directory configs/<board-name>/up_boot.c. * directory configs/<board-name>/src.
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_boardinitialize(void); void at32uc3_boardinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: at32uc3_configgpio * Name: at32uc3_configgpio
@ -236,7 +237,7 @@ EXTERN void up_boardinitialize(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN int at32uc3_configgpio(uint16_t cfgset); int at32uc3_configgpio(uint16_t cfgset);
/**************************************************************************** /****************************************************************************
* Name: at32uc3_gpiowrite * Name: at32uc3_gpiowrite
@ -246,7 +247,7 @@ EXTERN int at32uc3_configgpio(uint16_t cfgset);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void at32uc3_gpiowrite(uint16_t pinset, bool value); void at32uc3_gpiowrite(uint16_t pinset, bool value);
/**************************************************************************** /****************************************************************************
* Name: at32uc3_gpioread * Name: at32uc3_gpioread
@ -256,7 +257,7 @@ EXTERN void at32uc3_gpiowrite(uint16_t pinset, bool value);
* *
****************************************************************************/ ****************************************************************************/
EXTERN bool at32uc3_gpioread(uint16_t pinset); bool at32uc3_gpioread(uint16_t pinset);
/**************************************************************************** /****************************************************************************
* Name: gpio_irqinitialize * Name: gpio_irqinitialize
@ -277,7 +278,7 @@ EXTERN bool at32uc3_gpioread(uint16_t pinset);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR32_GPIOIRQ #ifdef CONFIG_AVR32_GPIOIRQ
EXTERN void weak_function gpio_irqinitialize(void); void weak_function gpio_irqinitialize(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -295,7 +296,7 @@ EXTERN void weak_function gpio_irqinitialize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR32_GPIOIRQ #ifdef CONFIG_AVR32_GPIOIRQ
EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr); int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -313,7 +314,7 @@ EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR32_GPIOIRQ #ifdef CONFIG_AVR32_GPIOIRQ
EXTERN void gpio_irqenable(int irq); void gpio_irqenable(int irq);
#endif #endif
/***************************************************************************** /*****************************************************************************
@ -331,7 +332,7 @@ EXTERN void gpio_irqenable(int irq);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR32_GPIOIRQ #ifdef CONFIG_AVR32_GPIOIRQ
EXTERN void gpio_irqdisable(int irq); void gpio_irqdisable(int irq);
#endif #endif
#undef EXTERN #undef EXTERN

View File

@ -101,7 +101,7 @@ void up_lowinit(void)
/* Perform board-level initialization */ /* Perform board-level initialization */
up_boardinitialize(); at32uc3_boardinitialize();
} }

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/avr/src/at90usb/at90usb_internal.h * arch/avr/src/at90usb/at90usb_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
@ -71,7 +71,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,11 +85,11 @@ extern "C" {
* Name: up_clkinit * Name: up_clkinit
* *
* Description: * Description:
* Initialiaze clock/PLL settings per the definitions in the board.h file. * Initialize clock/PLL settings per the definitions in the board.h file.
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_clkinitialize(void); void up_clkinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: usart1_reset * Name: usart1_reset
@ -98,7 +99,7 @@ EXTERN void up_clkinitialize(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void usart1_reset(void); void usart1_reset(void);
/**************************************************************************** /****************************************************************************
* Name: usart1_configure * Name: usart1_configure
@ -108,30 +109,30 @@ EXTERN void usart1_reset(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void usart1_configure(void); void usart1_configure(void);
/**************************************************************************** /****************************************************************************
* Name: up_consoleinit * Name: up_consoleinit
* *
* Description: * Description:
* Initialize a console for debug output. This function is called very * Initialize a console for debug output. This function is called very
* early in the initializeation sequence to configure the serial console * early in the initialization sequence to configure the serial console
* uart (only). * UART (only).
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_consoleinit(void); void up_consoleinit(void);
/**************************************************************************** /****************************************************************************
* Name: up_boardinit * Name: at90usb_boardinitialize
* *
* Description: * Description:
* This function must be provided by the board-specific logic in the * This function must be provided by the board-specific logic in the
* directory configs/<board-name>/up_boot.c. * directory configs/<board-name>/src/.
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_boardinitialize(void); void at90usb_boardinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: gpio_irqinitialize * Name: gpio_irqinitialize
@ -150,7 +151,7 @@ EXTERN void up_boardinitialize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void weak_function gpio_irqinitialize(void); void weak_function gpio_irqinitialize(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -166,7 +167,7 @@ EXTERN void weak_function gpio_irqinitialize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr); int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -182,7 +183,7 @@ EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void gpio_irqenable(int irq); void gpio_irqenable(int irq);
#endif #endif
/***************************************************************************** /*****************************************************************************
@ -198,7 +199,7 @@ EXTERN void gpio_irqenable(int irq);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void gpio_irqdisable(int irq); void gpio_irqdisable(int irq);
#endif #endif
#undef EXTERN #undef EXTERN

View File

@ -1,7 +1,7 @@
/************************************************************************** /**************************************************************************
* arch/avr/src/at90usb/at90usb_lowinit.c * arch/avr/src/at90usb/at90usb_lowinit.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-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
@ -148,7 +148,5 @@ void up_lowinit(void)
/* Perform board-level initialization */ /* Perform board-level initialization */
up_boardinitialize(); at90usb_boardinitialize();
} }

View File

@ -71,7 +71,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
@ -88,7 +89,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_clkinitialize(void); void up_clkinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: usart0_reset and usart1_reset * Name: usart0_reset and usart1_reset
@ -98,8 +99,8 @@ EXTERN void up_clkinitialize(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void usart0_reset(void); void usart0_reset(void);
EXTERN void usart1_reset(void); void usart1_reset(void);
/**************************************************************************** /****************************************************************************
* Name: usart0_configure and usart1_configure * Name: usart0_configure and usart1_configure
@ -109,8 +110,8 @@ EXTERN void usart1_reset(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void usart0_configure(void); void usart0_configure(void);
EXTERN void usart1_configure(void); void usart1_configure(void);
/**************************************************************************** /****************************************************************************
* Name: up_consoleinit * Name: up_consoleinit
@ -122,18 +123,18 @@ EXTERN void usart1_configure(void);
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_consoleinit(void); void up_consoleinit(void);
/**************************************************************************** /****************************************************************************
* Name: up_boardinit * Name: atmega_boardinitialize
* *
* Description: * Description:
* This function must be provided by the board-specific logic in the * This function must be provided by the board-specific logic in the
* directory configs/<board-name>/up_boot.c. * directory configs/<board-name>/src.
* *
****************************************************************************/ ****************************************************************************/
EXTERN void up_boardinitialize(void); void atmega_boardinitialize(void);
/**************************************************************************** /****************************************************************************
* Name: gpio_irqinitialize * Name: gpio_irqinitialize
@ -152,7 +153,7 @@ EXTERN void up_boardinitialize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void weak_function gpio_irqinitialize(void); void weak_function gpio_irqinitialize(void);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -168,7 +169,7 @@ EXTERN void weak_function gpio_irqinitialize(void);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr); int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
#endif #endif
/**************************************************************************** /****************************************************************************
@ -184,7 +185,7 @@ EXTERN int gpio_irqattach(int irq, xcpt_t newisr, xcpt_t *oldisr);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void gpio_irqenable(int irq); void gpio_irqenable(int irq);
#endif #endif
/***************************************************************************** /*****************************************************************************
@ -200,7 +201,7 @@ EXTERN void gpio_irqenable(int irq);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_AVR_GPIOIRQ #ifdef CONFIG_AVR_GPIOIRQ
EXTERN void gpio_irqdisable(int irq); void gpio_irqdisable(int irq);
#endif #endif
#undef EXTERN #undef EXTERN

View File

@ -1,7 +1,7 @@
/************************************************************************** /**************************************************************************
* arch/avr/src/atmega/atmega_lowinit.c * arch/avr/src/atmega/atmega_lowinit.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-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
@ -153,7 +153,7 @@ void up_lowinit(void)
/* Perform board-level initialization */ /* Perform board-level initialization */
up_boardinitialize(); atmega_boardinitialize();
} }

View File

@ -146,7 +146,7 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs);
* including up_spiinitialize()) are provided by common LPC17xx logic. To use * including up_spiinitialize()) are provided by common LPC17xx logic. To use
* this common SPI logic on your board: * this common SPI logic on your board:
* *
* 1. Provide logic in up_boardinitialize() to configure SPI chip select * 1. Provide logic in <arch>_boardinitialize() to configure SPI chip select
* pins. * pins.
* 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific * 2. Provide avr_spiselect() and avr_spistatus() functions in your board-specific
* logic. These functions will perform chip selection and status operations * logic. These functions will perform chip selection and status operations

View File

@ -88,7 +88,7 @@ extern uint32_t g_idle_topstack;
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
@ -102,7 +102,7 @@ extern uint32_t g_idle_topstack;
* *
************************************************************************************/ ************************************************************************************/
extern void up_copystate(uint32_t *dest, uint32_t *src); void up_copystate(uint32_t *dest, uint32_t *src);
/************************************************************************************ /************************************************************************************
* Name: up_fullcontextrestore * Name: up_fullcontextrestore
@ -112,7 +112,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src);
* *
************************************************************************************/ ************************************************************************************/
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
/************************************************************************************ /************************************************************************************
* Name: up_switchcontext * Name: up_switchcontext
@ -122,7 +122,7 @@ extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
* *
************************************************************************************/ ************************************************************************************/
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
/************************************************************************************ /************************************************************************************
* Name: up_doirq * Name: up_doirq
@ -132,7 +132,7 @@ extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
* *
************************************************************************************/ ************************************************************************************/
extern uint32_t *up_doirq(int irq, uint32_t *regs); uint32_t *up_doirq(int irq, uint32_t *regs);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_AVR_SRC_AVR32_AVR32_INTERNAL_H */ #endif /* __ARCH_AVR_SRC_AVR32_AVR32_INTERNAL_H */

View File

@ -179,6 +179,17 @@ extern uint32_t _ebss; /* End+1 of .bss */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/****************************************************************************
* Name: x86_boardinitialize
*
* Description:
* This function must be provided by the board-specific logic in the
* directory configs/<board-name>/src/.
*
****************************************************************************/
void x86_boardinitialize(void);
/* 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); extern void up_boot(void);

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/x86/src/qemu/qemu_lowsetup.c * arch/x86/src/qemu/qemu_lowsetup.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Copyright (C) 2011-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
@ -135,6 +135,6 @@ void up_lowsetup(void)
/* Now perform board-specific initializations */ /* Now perform board-specific initializations */
up_boardinitialize(); x86_boardinitialize();
} }