RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
riscv
niosv
niosvc10lp
include
status_led_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 _STATUS_LED_DRIVER_H
30
#define _STATUS_LED_DRIVER_H
31
32
/* Definitions */
33
/* IOCTL Definitions */
34
#define IOCTL_STATUS_LED_TURN_ON 0x00
35
#define IOCTL_STATUS_LED_TURN_OFF 0x01
36
37
#define STATUS_LED_1 0x01
38
#define STATUS_LED_2 0x02
39
#define STATUS_LED_3 0x04
40
#define STATUS_LED_4 0x08
41
42
/* Global Structure definitions */
43
typedef
struct
StatusLedControlStruct
44
{
45
uint32_t led_mask;
46
}status_led_control_t;
47
48
#ifdef __cplusplus
49
extern
"C"
{
50
#endif
51
52
#define STATUS_LED_DRIVER_TABLE_ENTRY \
53
{ status_led_initialize, status_led_open, status_led_close, \
54
status_led_read, status_led_write, status_led_control }
55
56
rtems_device_driver
status_led_initialize(
57
rtems_device_major_number
,
58
rtems_device_minor_number
,
59
void
*
60
);
61
62
rtems_device_driver
status_led_open(
63
rtems_device_major_number
,
64
rtems_device_minor_number
,
65
void
*
66
);
67
68
rtems_device_driver
status_led_close(
69
rtems_device_major_number
,
70
rtems_device_minor_number
,
71
void
*
72
);
73
74
rtems_device_driver
status_led_read(
75
rtems_device_major_number
,
76
rtems_device_minor_number
,
77
void
*
78
);
79
80
rtems_device_driver
status_led_write(
81
rtems_device_major_number
,
82
rtems_device_minor_number
,
83
void
*
84
);
85
86
rtems_device_driver
status_led_control(
87
rtems_device_major_number
,
88
rtems_device_minor_number
,
89
void
*
90
);
91
92
#ifdef __cplusplus
93
}
94
#endif
95
96
#endif
97
/* end of include file */
98
rtems_device_driver
rtems_status_code rtems_device_driver
This type shall be used in device driver entry declarations and definitions.
Definition
io.h:90
rtems_device_major_number
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition
io.h:103
rtems_device_minor_number
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition
io.h:115
StatusLedControlStruct
Definition
status_led_device_driver.h:44
Generated by
1.18.0