source: rtems/cpukit/include/rtems/confdefs/iodrivers.h @ a78495ed

5
Last change on this file since a78495ed was 7b6596f5, checked in by Sebastian Huber <sebastian.huber@…>, on 02/20/20 at 12:22:54

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.

  • Property mode set to 100644
File size: 5.2 KB
Line 
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/**
4 * @file
5 *
6 * @ingroup RTEMSApplicationConfiguration
7 *
8 * @brief Evaluate IO Driver Configuration Options
9 */
10
11/*
12 * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 *    notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 *    notice, this list of conditions and the following disclaimer in the
21 *    documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36#ifndef _RTEMS_CONFDEFS_IODRIVERS_H
37#define _RTEMS_CONFDEFS_IODRIVERS_H
38
39#ifndef __CONFIGURATION_TEMPLATE_h
40#error "Do not include this file directly, use <rtems/confdefs.h> instead"
41#endif
42
43#ifdef CONFIGURE_INIT
44
45#include <rtems/ioimpl.h>
46
47#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
48  #if defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) \
49    || defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)
50    #error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER, CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER, and CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER are mutually exclusive"
51  #endif
52
53  #include <rtems/console.h>
54#endif
55
56#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
57  #include <rtems/btimer.h>
58#endif
59
60#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
61  #include <rtems/rtc.h>
62#endif
63
64#ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
65  #include <rtems/watchdogdrv.h>
66#endif
67
68#ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
69  #include <rtems/framebuffer.h>
70#endif
71
72#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
73  #include <rtems/devnull.h>
74#endif
75
76#ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
77  #include <rtems/devzero.h>
78#endif
79
80#ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
81  #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
82    #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
83  #endif
84
85  #include <libchip/ide_ctrl.h>
86#endif
87
88#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
89  #include <libchip/ata.h>
90#endif
91
92#ifndef CONFIGURE_MAXIMUM_DRIVERS
93  #define CONFIGURE_MAXIMUM_DRIVERS
94#endif
95
96#ifdef __cplusplus
97extern "C" {
98#endif
99
100rtems_driver_address_table
101_IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = {
102  #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS
103    CONFIGURE_BSP_PREREQUISITE_DRIVERS,
104  #endif
105  #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
106    CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS,
107  #endif
108  #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
109    CONSOLE_DRIVER_TABLE_ENTRY,
110  #endif
111  #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
112    RTC_DRIVER_TABLE_ENTRY,
113  #endif
114  #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
115    WATCHDOG_DRIVER_TABLE_ENTRY,
116  #endif
117  #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
118    DEVNULL_DRIVER_TABLE_ENTRY,
119  #endif
120  #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
121    DEVZERO_DRIVER_TABLE_ENTRY,
122  #endif
123  #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
124    IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
125  #endif
126  #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
127    ATA_DRIVER_TABLE_ENTRY,
128  #endif
129  #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
130    FRAME_BUFFER_DRIVER_TABLE_ENTRY,
131  #endif
132  #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
133    CONFIGURE_APPLICATION_EXTRA_DRIVERS,
134  #endif
135  #if defined(CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER) \
136    || ( !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) \
137      && !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) \
138      && !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) \
139      && !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) \
140      && !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) \
141      && !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) \
142      && !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) \
143      && !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) )
144    { NULL, NULL, NULL, NULL, NULL, NULL }
145  #endif
146};
147
148const size_t _IO_Number_of_drivers =
149  RTEMS_ARRAY_SIZE( _IO_Driver_address_table );
150
151#ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
152  #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY
153    #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY
154  #endif
155
156  rtems_task_priority rtems_ata_driver_task_priority
157    = CONFIGURE_ATA_DRIVER_TASK_PRIORITY;
158#endif
159
160#ifdef __cplusplus
161}
162#endif
163
164#endif /* CONFIGURE_INIT */
165
166#endif /* _RTEMS_CONFDEFS_IODRIVERS_H */
Note: See TracBrowser for help on using the repository browser.