RTEMS 6.1-rc6
Loading...
Searching...
No Matches
system_device_driver.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 *
5 * Copyright (C) 2024 Kevin Kirspel
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#ifndef _SYSTEM_DRIVER_H
30#define _SYSTEM_DRIVER_H
31
32/* Definitions */
33/* IOCTL Definitions */
34#define IOCTL_SYSTEM_SOFTWARE_VERSION 0x00
35#define IOCTL_SYSTEM_RESET 0x01
36
37#define VERSION_SIZE 20
38
39/* Global Structure definitions */
40typedef struct SystemControlStruct
41{
42 char version[VERSION_SIZE];
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49#define SYSTEM_DRIVER_TABLE_ENTRY \
50 { system_initialize, system_open, system_close, \
51 system_read, system_write, system_control }
52
53rtems_device_driver system_initialize(
56 void *
57);
58
59rtems_device_driver system_open(
62 void *
63);
64
65rtems_device_driver system_close(
68 void *
69);
70
71rtems_device_driver system_read(
74 void *
75);
76
77rtems_device_driver system_write(
80 void *
81);
82
83rtems_device_driver system_control(
86 void *
87);
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif
94/* end of include file */
95
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
Definition: system_device_driver.h:41