RTEMS 6.1-rc7
Loading...
Searching...
No Matches
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 */
44{
45 uint32_t led_mask;
47
48#ifdef __cplusplus
49extern "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
56rtems_device_driver status_led_initialize(
59 void *
60);
61
62rtems_device_driver status_led_open(
65 void *
66);
67
68rtems_device_driver status_led_close(
71 void *
72);
73
74rtems_device_driver status_led_read(
77 void *
78);
79
80rtems_device_driver status_led_write(
83 void *
84);
85
86rtems_device_driver status_led_control(
89 void *
90);
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif
97/* end of include file */
98
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: status_led_device_driver.h:44