mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-19 10:57:50 +08:00

Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
66 lines
1.2 KiB
C
66 lines
1.2 KiB
C
/**
|
|
* @file
|
|
*
|
|
* @ingroup demo
|
|
*
|
|
* @brief USB system initialization.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved.
|
|
*
|
|
* embedded brains GmbH
|
|
* Obere Lagerstr. 30
|
|
* 82178 Puchheim
|
|
* Germany
|
|
* <rtems@embedded-brains.de>
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.com/license/LICENSE.
|
|
*/
|
|
|
|
#include <machine/rtems-bsd-sysinit.h>
|
|
|
|
#include <bsp.h>
|
|
|
|
#ifdef USB_SYSINIT_INIT
|
|
|
|
#if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H)
|
|
#define NEED_USB_OHCI
|
|
#elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_POWERPC_QORIQ_BSP_H)
|
|
#define NEED_USB_EHCI
|
|
#endif
|
|
|
|
#if defined(LIBBSP_POWERPC_QORIQ_BSP_H)
|
|
#define NEED_SDHC
|
|
#endif
|
|
|
|
SYSINIT_NEED_FREEBSD_CORE;
|
|
SYSINIT_NEED_USB_CORE;
|
|
#ifdef NEED_USB_OHCI
|
|
SYSINIT_NEED_USB_OHCI;
|
|
#endif
|
|
#ifdef NEED_USB_EHCI
|
|
SYSINIT_NEED_USB_EHCI;
|
|
#endif
|
|
SYSINIT_NEED_USB_MASS_STORAGE;
|
|
#ifdef NEED_SDHC
|
|
SYSINIT_NEED_SDHC;
|
|
#endif
|
|
|
|
const char *const _bsd_nexus_devices [] = {
|
|
#ifdef NEED_USB_OHCI
|
|
"ohci",
|
|
#endif
|
|
#ifdef NEED_USB_EHCI
|
|
"ehci",
|
|
#endif
|
|
#ifdef NEED_SDHC
|
|
"sdhci",
|
|
#endif
|
|
NULL
|
|
};
|
|
|
|
#endif /* USB_SYSINIT_INIT */
|