diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-20 13:22:54 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-25 07:18:38 +0100 |
commit | 7b6596f56fe9e453047a446ca34ec050cf23cbc6 (patch) | |
tree | ba583f87668e3f668c5cefb80f1b939604094bc7 /cpukit/include/rtems/confdefs | |
parent | config: Add <rtems/confdefs/console.h> (diff) | |
download | rtems-7b6596f56fe9e453047a446ca34ec050cf23cbc6.tar.bz2 |
config: Add <rtems/confdefs/iodrivers.h>
Remove all comments and copyrightable content from the moved content.
Use BSD-2-Clause license for new file.
Update #3053.
Update #3875.
Diffstat (limited to 'cpukit/include/rtems/confdefs')
-rw-r--r-- | cpukit/include/rtems/confdefs/iodrivers.h | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/cpukit/include/rtems/confdefs/iodrivers.h b/cpukit/include/rtems/confdefs/iodrivers.h new file mode 100644 index 0000000000..aaa027dc0f --- /dev/null +++ b/cpukit/include/rtems/confdefs/iodrivers.h @@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSApplicationConfiguration + * + * @brief Evaluate IO Driver Configuration Options + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _RTEMS_CONFDEFS_IODRIVERS_H +#define _RTEMS_CONFDEFS_IODRIVERS_H + +#ifndef __CONFIGURATION_TEMPLATE_h +#error "Do not include this file directly, use <rtems/confdefs.h> instead" +#endif + +#ifdef CONFIGURE_INIT + +#include <rtems/ioimpl.h> + +#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + #if defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) \ + || defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER) + #error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER, CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER, and CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER are mutually exclusive" + #endif + + #include <rtems/console.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER + #include <rtems/btimer.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER + #include <rtems/rtc.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER + #include <rtems/watchdogdrv.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER + #include <rtems/framebuffer.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER + #include <rtems/devnull.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER + #include <rtems/devzero.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER + #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER + #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER + #endif + + #include <libchip/ide_ctrl.h> +#endif + +#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER + #include <libchip/ata.h> +#endif + +#ifndef CONFIGURE_MAXIMUM_DRIVERS + #define CONFIGURE_MAXIMUM_DRIVERS +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +rtems_driver_address_table +_IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = { + #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS + CONFIGURE_BSP_PREREQUISITE_DRIVERS, + #endif + #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS + CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + CONSOLE_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER + RTC_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER + WATCHDOG_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER + DEVNULL_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER + DEVZERO_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER + IDE_CONTROLLER_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER + ATA_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER + FRAME_BUFFER_DRIVER_TABLE_ENTRY, + #endif + #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS + CONFIGURE_APPLICATION_EXTRA_DRIVERS, + #endif + #if defined(CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER) \ + || ( !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) \ + && !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) ) + { NULL, NULL, NULL, NULL, NULL, NULL } + #endif +}; + +const size_t _IO_Number_of_drivers = + RTEMS_ARRAY_SIZE( _IO_Driver_address_table ); + +#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER + #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY + #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY + #endif + + rtems_task_priority rtems_ata_driver_task_priority + = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* CONFIGURE_INIT */ + +#endif /* _RTEMS_CONFDEFS_IODRIVERS_H */ |