Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:00

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /*
0004  *
0005  * Copyright (C) 2024 Kevin Kirspel
0006  *
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions
0009  * are met:
0010  * 1. Redistributions of source code must retain the above copyright
0011  *    notice, this list of conditions and the following disclaimer.
0012  * 2. Redistributions in binary form must reproduce the above copyright
0013  *    notice, this list of conditions and the following disclaimer in the
0014  *    documentation and/or other materials provided with the distribution.
0015  *
0016  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
0017  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0018  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0019  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
0020  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0021  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
0022  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0023  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
0024  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
0025  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0026  * SUCH DAMAGE.
0027  */
0028 
0029 #ifndef _STATUS_LED_DRIVER_H
0030 #define _STATUS_LED_DRIVER_H
0031 
0032 /* Definitions */
0033 /* IOCTL Definitions */
0034 #define IOCTL_STATUS_LED_TURN_ON                 0x00
0035 #define IOCTL_STATUS_LED_TURN_OFF                0x01
0036 
0037 #define STATUS_LED_1                             0x01
0038 #define STATUS_LED_2                             0x02
0039 #define STATUS_LED_3                             0x04
0040 #define STATUS_LED_4                             0x08
0041 
0042 /* Global Structure definitions */
0043 typedef struct StatusLedControlStruct
0044 {
0045   uint32_t led_mask;
0046 }status_led_control_t;
0047 
0048 #ifdef __cplusplus
0049 extern "C" {
0050 #endif
0051 
0052 #define STATUS_LED_DRIVER_TABLE_ENTRY \
0053   { status_led_initialize, status_led_open, status_led_close, \
0054     status_led_read, status_led_write, status_led_control }
0055 
0056 rtems_device_driver status_led_initialize(
0057   rtems_device_major_number,
0058   rtems_device_minor_number,
0059   void *
0060 );
0061 
0062 rtems_device_driver status_led_open(
0063   rtems_device_major_number,
0064   rtems_device_minor_number,
0065   void *
0066 );
0067 
0068 rtems_device_driver status_led_close(
0069   rtems_device_major_number,
0070   rtems_device_minor_number,
0071   void *
0072 );
0073 
0074 rtems_device_driver status_led_read(
0075   rtems_device_major_number,
0076   rtems_device_minor_number,
0077   void *
0078 );
0079 
0080 rtems_device_driver status_led_write(
0081   rtems_device_major_number,
0082   rtems_device_minor_number,
0083   void *
0084 );
0085 
0086 rtems_device_driver status_led_control(
0087   rtems_device_major_number,
0088   rtems_device_minor_number,
0089   void *
0090 );
0091 
0092 #ifdef __cplusplus
0093 }
0094 #endif
0095 
0096 #endif
0097 /* end of include file */
0098