Eliminated sam3u_internal.h. Use separate header files instead. More renaming from sam3u_ to sam_ to make room in the namespce for the sam4l_

This commit is contained in:
Gregory Nutt
2013-06-02 13:04:40 -06:00
parent ea73fceb34
commit ca8d55d856
13 changed files with 297 additions and 293 deletions
+4 -2
View File
@@ -114,7 +114,7 @@ IDEs
on the command line.
Startup files will probably cause you some headaches. The NuttX startup file
is arch/arm/src/sam3u/sam3u_vectors.S. You may need to build NuttX
is arch/arm/src/sam3u/sam_vectors.S. You may need to build NuttX
one time from the Cygwin command line in order to obtain the pre-built
startup object needed by RIDE.
@@ -261,12 +261,14 @@ SAM3U-EK-specific Configuration Options
CONFIG_ARCH_CHIP_name - For use in C code to identify the exact
chip:
CONFIG_ARCH_CHIP_SAM34
CONFIG_ARCH_CHIP_SAM3U
CONFIG_ARCH_CHIP_AT91SAM3U4
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
hence, the board that supports the particular chip or SoC.
CONFIG_ARCH_BOARD=sam3u_ek (for the SAM3U-EK development board)
CONFIG_ARCH_BOARD=sam3u-ek (for the SAM3U-EK development board)
CONFIG_ARCH_BOARD_name - For use in C code
+5 -6
View File
@@ -42,7 +42,6 @@
************************************************************************************/
#include <nuttx/config.h>
#include "sam3u_internal.h"
#ifndef __ASSEMBLY__
# include <stdint.h>
@@ -144,7 +143,7 @@ extern "C" {
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: sam3u_boardinitialize
* Name: sam_boardinitialize
*
* Description:
* All SAM3U architectures must provide the following entry point. This entry point
@@ -153,7 +152,7 @@ extern "C" {
*
************************************************************************************/
EXTERN void sam3u_boardinitialize(void);
void sam_boardinitialize(void);
/************************************************************************************
* Name: up_buttoninit
@@ -166,7 +165,7 @@ EXTERN void sam3u_boardinitialize(void);
************************************************************************************/
#ifdef CONFIG_ARCH_BUTTONS
EXTERN void up_buttoninit(void);
void up_buttoninit(void);
/************************************************************************************
* Name: up_buttons
@@ -179,7 +178,7 @@ EXTERN void up_buttoninit(void);
*
************************************************************************************/
EXTERN uint8_t up_buttons(void);
uint8_t up_buttons(void);
/************************************************************************************
* Name: up_irqbutton
@@ -193,7 +192,7 @@ EXTERN uint8_t up_buttons(void);
************************************************************************************/
#ifdef CONFIG_GPIOA_IRQ
EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
#endif
#endif /* CONFIG_ARCH_BUTTONS */
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/sam3uek_eval/src/sam3uek_internal.h
* arch/arm/src/board/sam3uek_internal.n
* configs/sam3uek_eval/src/sam3u-ek.h
*
* Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -34,8 +33,8 @@
*
************************************************************************************/
#ifndef __CONFIGS_SAM3U_EK_SRC_SAM3UEK_INTERNAL_H
#define __CONFIGS_SAM3U_EK_SRC_SAM3UEK_INTERNAL_H
#ifndef __CONFIGS_SAM3U_EK_SRC_SAM3U_EK_H
#define __CONFIGS_SAM3U_EK_SRC_SAM3U_EK_H
/************************************************************************************
* Included Files
@@ -49,6 +48,8 @@
#include <arch/irq.h>
#include <nuttx/irq.h>
#include "chip/sam_pinmap.h"
/************************************************************************************
* Definitions
************************************************************************************/
@@ -191,27 +192,27 @@
************************************************************************************/
/************************************************************************************
* Name: sam3u_spiinitialize
* Name: sam_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the SAM3U-EK board.
*
************************************************************************************/
extern void weak_function sam3u_spiinitialize(void);
extern void weak_function sam_spiinitialize(void);
/************************************************************************************
* Name: sam3u_usbinitialize
* Name: sam_usbinitialize
*
* Description:
* Called to setup USB-related GPIO pins for the SAM3U-EK board.
*
************************************************************************************/
extern void weak_function sam3u_usbinitialize(void);
extern void weak_function sam_usbinitialize(void);
/****************************************************************************
* Name: sam3u_hsmciinit
* Name: sam_hsmciinit
*
* Description:
* Initialize HSMCI support
@@ -219,13 +220,21 @@ extern void weak_function sam3u_usbinitialize(void);
****************************************************************************/
#ifdef CONFIG_SAM34_HSMCI
extern int weak_function sam3u_hsmciinit(void);
extern int weak_function sam_hsmciinit(void);
#else
# define sam3u_hsmciinit()
# define sam_hsmciinit()
#endif
/****************************************************************************
* Name: sam3u_cardinserted
* Name: up_ledinit
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void);
#endif
/****************************************************************************
* Name: sam_cardinserted
*
* Description:
* Check if a card is inserted into the selected HSMCI slot
@@ -233,13 +242,13 @@ extern int weak_function sam3u_hsmciinit(void);
****************************************************************************/
#ifdef CONFIG_SAM34_HSMCI
extern bool sam3u_cardinserted(unsigned char slot);
extern bool sam_cardinserted(unsigned char slot);
#else
# define sam3u_cardinserted(slot) (false)
# define sam_cardinserted(slot) (false)
#endif
/****************************************************************************
* Name: sam3u_writeprotected
* Name: sam_writeprotected
*
* Description:
* Check if a card is inserted into the selected HSMCI slot
@@ -247,11 +256,11 @@ extern bool sam3u_cardinserted(unsigned char slot);
****************************************************************************/
#ifdef CONFIG_SAM34_HSMCI
extern bool sam3u_writeprotected(unsigned char slot);
extern bool sam_writeprotected(unsigned char slot);
#else
# define sam3u_writeprotected(slot) (false)
# define sam_writeprotected(slot) (false)
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_SAM3U_EK_SRC_SAM3UEK_INTERNAL_H */
#endif /* __CONFIGS_SAM3U_EK_SRC_SAM3U_EK_H */
+12 -13
View File
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/sam3u-ek/src/up_boot.c
* arch/arm/src/board/up_boot.c
*
* Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -45,7 +44,7 @@
#include <arch/board/board.h>
#include "up_arch.h"
#include "sam3uek_internal.h"
#include "sam3u-ek.h"
/************************************************************************************
* Definitions
@@ -60,7 +59,7 @@
************************************************************************************/
/************************************************************************************
* Name: sam3u_boardinitialize
* Name: sam_boardinitialize
*
* Description:
* All SAM3U architectures must provide the following entry point. This entry point
@@ -69,28 +68,28 @@
*
************************************************************************************/
void sam3u_boardinitialize(void)
void sam_boardinitialize(void)
{
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* sam3u_spiinitialize() has been brought into the link.
* sam_spiinitialize() has been brought into the link.
*/
#ifdef CONFIG_SAM34_SPI
if (sam3u_spiinitialize)
if (sam_spiinitialize)
{
sam3u_spiinitialize();
sam_spiinitialize();
}
#endif
/* Initialize USB if 1) USBDEV is selected, 2) the USB controller is not
* disabled, and 3) the weak function sam3u_usbinitialize() has been brought
* disabled, and 3) the weak function sam_usbinitialize() has been brought
* into the build.
*/
#if defined(CONFIG_USBDEV) && defined(CONFIG_SAM34_USB)
if (sam3u_usbinitialize)
if (sam_usbinitialize)
{
sam3u_usbinitialize();
sam_usbinitialize();
}
#endif
@@ -101,13 +100,13 @@ void sam3u_boardinitialize(void)
#endif
/* Setup SD card-related PIOs if 1) HSMCI is selected and 2) the weak
* function sam3u_hsmciinit() has been brought into the build.
* function sam_hsmciinit() has been brought into the build.
*/
#ifdef CONFIG_SAM34_HSMCI
if (sam3u_hsmciinit)
if (sam_hsmciinit)
{
sam3u_hsmciinit();
sam_hsmciinit();
}
#endif
}
+8 -8
View File
@@ -46,8 +46,8 @@
#include <arch/irq.h>
#include <arch/board/board.h>
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_gpio.h"
#include "sam3u-ek.h"
#ifdef CONFIG_ARCH_BUTTONS
@@ -93,9 +93,9 @@ static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler, xcpt_t *store)
/* Configure the interrupt */
sam3u_gpioirq(irq);
sam_gpioirq(irq);
(void)irq_attach(irq, irqhandler);
sam3u_gpioirqenable(irq);
sam_gpioirqenable(irq);
irqrestore(flags);
/* Return the old button handler (so that it can be restored) */
@@ -121,8 +121,8 @@ static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler, xcpt_t *store)
void up_buttoninit(void)
{
(void)sam3u_configgpio(GPIO_BUTTON1);
(void)sam3u_configgpio(GPIO_BUTTON2);
(void)sam_configgpio(GPIO_BUTTON1);
(void)sam_configgpio(GPIO_BUTTON2);
}
/************************************************************************************
@@ -140,8 +140,8 @@ uint8_t up_buttons(void)
{
uint8_t retval;
retval = sam3u_gpioread(GPIO_BUTTON1) ? 0 : GPIO_BUTTON1;
retval |= sam3u_gpioread(GPIO_BUTTON2) ? 0 : GPIO_BUTTON2;
retval = sam_gpioread(GPIO_BUTTON1) ? 0 : GPIO_BUTTON1;
retval |= sam_gpioread(GPIO_BUTTON2) ? 0 : GPIO_BUTTON2;
return retval;
}
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -49,8 +49,8 @@
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_gpio.h"
#include "sam3u-ek.h"
#ifdef CONFIG_ARCH_LEDS
@@ -144,7 +144,7 @@ static void up_setled(uint16_t pinset, uint8_t state)
return;
}
sam3u_gpiowrite(pinset, polarity);
sam_gpiowrite(pinset, polarity);
}
/****************************************************************************
@@ -168,9 +168,9 @@ static void up_setleds(uint8_t state)
void up_ledinit(void)
{
(void)sam3u_configgpio(GPIO_LED0);
(void)sam3u_configgpio(GPIO_LED1);
(void)sam3u_configgpio(GPIO_LED2);
(void)sam_configgpio(GPIO_LED0);
(void)sam_configgpio(GPIO_LED1);
(void)sam_configgpio(GPIO_LED2);
}
/****************************************************************************
+13 -14
View File
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/sam3u-ek/src/up_mmcsd.c
* arch/arm/src/board/up_mmcsd.c
*
* Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -43,8 +42,8 @@
#include <stdbool.h>
#include <debug.h>
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_gpio.h"
#include "sam3u-ek.h"
#ifdef CONFIG_SAM34_HSMCI
@@ -55,7 +54,7 @@
/* This needs to be extended. The card detect GPIO must be configured as an interrupt.
* when the interrupt indicating that a card has been inserted or removed is received,
* this function must call sio_mediachange() to handle that event. See
* arch/arm/src/sam3u/sam3u_internal.h for more information.
* arch/arm/src/sam3u/sam_hsmci.h for more information.
*/
#ifdef GPIO_MCI_CD
@@ -71,7 +70,7 @@
************************************************************************************/
/************************************************************************************
* Name: sam3u_hsmciinit
* Name: sam_hsmciinit
*
* Description:
* Initialize HSMCI support. This function is called very early in board
@@ -79,31 +78,31 @@
*
************************************************************************************/
int sam3u_hsmciinit(void)
int sam_hsmciinit(void)
{
#ifdef GPIO_MCI_CD
sam3u_configgpio(GPIO_MCI_CD);
sam_configgpio(GPIO_MCI_CD);
#endif
#ifdef GPIO_MCI_WP
sam3u_configgpio(GPIO_MCI_WP);
sam_configgpio(GPIO_MCI_WP);
#endif
return OK;
}
/************************************************************************************
* Name: sam3u_cardinserted
* Name: sam_cardinserted
*
* Description:
* Check if a card is inserted into the selected HSMCI slot
*
************************************************************************************/
bool sam3u_cardinserted(unsigned char slot)
bool sam_cardinserted(unsigned char slot)
{
if (slot == 0)
{
#ifdef GPIO_MCI_CD
bool inserted = sam3u_gpioread(GPIO_MCI_CD);
bool inserted = sam_gpioread(GPIO_MCI_CD);
fvdbg("inserted: %s\n", inserted ? "NO" : "YES");
return !inserted;
#else
@@ -114,19 +113,19 @@ bool sam3u_cardinserted(unsigned char slot)
}
/************************************************************************************
* Name: sam3u_writeprotected
* Name: sam_writeprotected
*
* Description:
* Check if a card is inserted into the selected HSMCI slot
*
************************************************************************************/
bool sam3u_writeprotected(unsigned char slot)
bool sam_writeprotected(unsigned char slot)
{
if (slot == 0)
{
#ifdef GPIO_MCI_WP
bool protected = sam3u_gpioread(GPIO_MCI_WP);
bool protected = sam_gpioread(GPIO_MCI_WP);
fvdbg("protected: %s\n", inserted ? "YES" : "NO");
return protected;
#else
+3 -4
View File
@@ -1,6 +1,5 @@
/****************************************************************************
* config/sam3u-ek/src/up_nsh.c
* arch/arm/src/board/up_nsh.c
*
* Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -48,8 +47,8 @@
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_hsmci.h"
#include "sam3u-ek.h"
#ifdef CONFIG_SAM34_HSMCI
@@ -152,7 +151,7 @@ int nsh_archinitialize(void)
/* Then inform the HSMCI driver if there is or is not a card in the slot. */
sdio_mediachange(sdio, sam3u_cardinserted(0));
sdio_mediachange(sdio, sam_cardinserted(0));
#endif
return OK;
}
+19 -20
View File
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/sam3u-ek/src/up_spi.c
* arch/arm/src/board/up_spi.c
*
* Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -50,8 +49,9 @@
#include "up_arch.h"
#include "chip.h"
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_gpio.h"
#include "sam_spi.h"
#include "sam3u-ek.h"
#ifdef CONFIG_SAM34_SPI
@@ -86,14 +86,14 @@
************************************************************************************/
/************************************************************************************
* Name: sam3u_spiinitialize
* Name: sam_spiinitialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the SAM3U10E-EVAL board.
*
************************************************************************************/
void weak_function sam3u_spiinitialize(void)
void weak_function sam_spiinitialize(void)
{
/* The ZigBee module connects used NPCS0. However, there is not yet any
* ZigBee support.
@@ -102,36 +102,35 @@ void weak_function sam3u_spiinitialize(void)
/* The touchscreen connects using NPCS2 (PC14). */
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
sam3u_configgpio(GPIO_TSC_NPCS2);
sam_configgpio(GPIO_TSC_NPCS2);
#endif
}
/****************************************************************************
* Name: sam3u_spicsnumber, sam3u_spiselect, sam3u_spistatus, and
* sam3u_spicmddata
* Name: sam_spicsnumber, sam_spiselect, sam_spistatus, and sam_spicmddata
*
* Description:
* These external functions must be provided by board-specific logic. They
* include:
*
* o sam3u_spicsnumbe and sam3u_spiselect which are helper functions to
* o sam_spicsnumber and sam_spiselect which are helper functions to
* manage the board-specific aspects of the unique SAM3U chip select
* architecture.
* o sam3u_spistatus and sam3u_spicmddata: Implementations of the status
* o sam_spistatus and sam_spicmddata: Implementations of the status
* and cmddata methods of the SPI interface defined by struct spi_ops_
* (see include/nuttx/spi.h). All other methods including
* up_spiinitialize()) are provided by common SAM3U logic.
*
* To use this common SPI logic on your board:
*
* 1. Provide logic in sam3u_boardinitialize() to configure SPI chip select
* 1. Provide logic in sam_boardinitialize() to configure SPI chip select
* pins.
* 2. Provide sam3u_spicsnumber(), sam3u_spiselect() and sam3u_spistatus()
* 2. Provide sam_spicsnumber(), sam_spiselect() and sam_spistatus()
* functions in your board-specific logic. These functions will perform
* chip selection and status operations using GPIOs in the way your board
* is configured.
* 2. If CONFIG_SPI_CMDDATA is defined in the NuttX configuration, provide
* sam3u_spicmddata() functions in your board-specific logic. This
* sam_spicmddata() functions in your board-specific logic. This
* function will perform cmd/data selection operations using GPIOs in
* the way your board is configured.
* 3. Add a call to up_spiinitialize() in your low level application
@@ -144,7 +143,7 @@ void weak_function sam3u_spiinitialize(void)
****************************************************************************/
/****************************************************************************
* Name: sam3u_spicsnumber
* Name: sam_spicsnumber
*
* Description:
* The SAM3U has 4 CS registers for controlling device features. This
@@ -161,7 +160,7 @@ void weak_function sam3u_spiinitialize(void)
*
****************************************************************************/
int sam3u_spicsnumber(enum spi_dev_e devid)
int sam_spicsnumber(enum spi_dev_e devid)
{
int cs = -EINVAL;
@@ -179,7 +178,7 @@ int sam3u_spicsnumber(enum spi_dev_e devid)
}
/****************************************************************************
* Name: sam3u_spiselect
* Name: sam_spiselect
*
* Description:
* PIO chip select pins may be programmed by the board specific logic in
@@ -203,7 +202,7 @@ int sam3u_spicsnumber(enum spi_dev_e devid)
*
****************************************************************************/
void sam3u_spiselect(enum spi_dev_e devid, bool selected)
void sam_spiselect(enum spi_dev_e devid, bool selected)
{
/* The touchscreen chip select is implemented as a GPIO OUTPUT that must
* be controlled by this function. This is because the ADS7843E driver
@@ -216,13 +215,13 @@ void sam3u_spiselect(enum spi_dev_e devid, bool selected)
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_ADS7843E)
if (devid == SPIDEV_TOUCHSCREEN)
{
sam3u_gpiowrite(GPIO_TSC_NPCS2, !selected);
sam_gpiowrite(GPIO_TSC_NPCS2, !selected);
}
#endif
}
/****************************************************************************
* Name: sam3u_spistatus
* Name: sam_spistatus
*
* Description:
* Return status information associated with the SPI device.
@@ -235,7 +234,7 @@ void sam3u_spiselect(enum spi_dev_e devid, bool selected)
*
****************************************************************************/
uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
uint8_t sam_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
return 0;
}
+9 -9
View File
@@ -50,8 +50,8 @@
#include <nuttx/input/touchscreen.h>
#include <nuttx/input/ads7843e.h>
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam_gpio.h"
#include "sam3u-ek.h"
/****************************************************************************
* Pre-Processor Definitions
@@ -165,11 +165,11 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable)
ivdbg("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable);
if (enable)
{
sam3u_gpioirqenable(SAM_TCS_IRQ);
sam_gpioirqenable(SAM_TCS_IRQ);
}
else
{
sam3u_gpioirqdisable(SAM_TCS_IRQ);
sam_gpioirqdisable(SAM_TCS_IRQ);
}
}
@@ -186,7 +186,7 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state)
/* REVISIT: This might need to be inverted */
bool busy = sam3u_gpioread(GPIO_TCS_BUSY);
bool busy = sam_gpioread(GPIO_TCS_BUSY);
#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE)
if (busy != last)
{
@@ -201,7 +201,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
{
/* REVISIT: This might need to be inverted */
bool pendown = sam3u_gpioread(GPIO_TCS_IRQ);
bool pendown = sam_gpioread(GPIO_TCS_IRQ);
ivdbg("pendown:%d\n", pendown);
return pendown;
}
@@ -238,12 +238,12 @@ int arch_tcinitialize(int minor)
/* Configure and enable the ADS7843E interrupt pin as an input */
(void)sam3u_configgpio(GPIO_TCS_BUSY);
(void)sam3u_configgpio(GPIO_TCS_IRQ);
(void)sam_configgpio(GPIO_TCS_BUSY);
(void)sam_configgpio(GPIO_TCS_IRQ);
/* Configure the PIO interrupt */
sam3u_gpioirq(GPIO_TCS_IRQ);
sam_gpioirq(GPIO_TCS_IRQ);
/* Get an instance of the SPI interface */
+9 -11
View File
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/sam3u-ek/src/up_usbdev.c
* arch/arm/src/board/up_usbdev.c
*
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -49,8 +48,7 @@
#include <nuttx/usb/usbdev_trace.h>
#include "up_arch.h"
#include "sam3u_internal.h"
#include "sam3uek_internal.h"
#include "sam3u-ek.h"
/************************************************************************************
* Definitions
@@ -65,46 +63,46 @@
************************************************************************************/
/************************************************************************************
* Name: sam3u_usbinitialize
* Name: sam_usbinitialize
*
* Description:
* Called to setup USB-related GPIO pins for the SAM3U-EK board.
*
************************************************************************************/
void sam3u_usbinitialize(void)
void sam_usbinitialize(void)
{
}
/************************************************************************************
* Name: sam3u_usbpullup
* Name: sam_usbpullup
*
* Description:
* If USB is supported and the board supports a pullup via GPIO (for USB software
* connect and disconnect), then the board software must provide sam3u_pullup.
* connect and disconnect), then the board software must provide sam_pullup.
* See include/nuttx/usb/usbdev.h for additional description of this method.
* Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be
* NULL.
*
************************************************************************************/
int sam3u_usbpullup(FAR struct usbdev_s *dev, bool enable)
int sam_usbpullup(FAR struct usbdev_s *dev, bool enable)
{
return 0;
}
/************************************************************************************
* Name: sam3u_usbsuspend
* Name: sam_usbsuspend
*
* Description:
* Board logic must provide the sam3u_usbsuspend logic if the USBDEV driver is
* Board logic must provide the sam_usbsuspend logic if the USBDEV driver is
* used. This function is called whenever the USB enters or leaves suspend mode.
* This is an opportunity for the board logic to shutdown clocks, power, etc.
* while the USB is suspended.
*
************************************************************************************/
void sam3u_usbsuspend(FAR struct usbdev_s *dev, bool resume)
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
{
ulldbg("resume: %d\n", resume);
}
+3 -3
View File
@@ -48,9 +48,9 @@
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>
#include "sam3u_internal.h"
#include "sam_hsmci.h"
#ifdef CONFIG_SAM34_SDIO
#ifdef CONFIG_SAM34_HSMCI
/****************************************************************************
* Pre-Processor Definitions
@@ -149,4 +149,4 @@ int usbmsc_archinitialize(void)
return OK;
}
#endif /* CONFIG_SAM34_SDIO */
#endif /* CONFIG_SAM34_HSMCI */