diff options
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/rtems/clockdrv.h | 49 | ||||
-rw-r--r-- | cpukit/include/rtems/console.h | 155 | ||||
-rw-r--r-- | cpukit/include/rtems/framebuffer.h | 168 | ||||
-rw-r--r-- | cpukit/include/rtems/rtc.h | 115 | ||||
-rw-r--r-- | cpukit/include/rtems/watchdogdrv.h | 71 |
5 files changed, 558 insertions, 0 deletions
diff --git a/cpukit/include/rtems/clockdrv.h b/cpukit/include/rtems/clockdrv.h new file mode 100644 index 0000000000..5d7a92c515 --- /dev/null +++ b/cpukit/include/rtems/clockdrv.h @@ -0,0 +1,49 @@ +/** + * @file + * + * @brief Clock Driver for all Boards + * + * This file describes the Clock Driver for all boards. + */ + +/* + * COPYRIGHT (c) 1989-2011. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_CLOCKDRV_H +#define _RTEMS_CLOCKDRV_H + +#include <rtems/io.h> /* rtems_device_driver */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* variables */ + +extern volatile uint32_t Clock_driver_ticks; + +/* default clock driver entry */ + +#define CLOCK_DRIVER_TABLE_ENTRY \ + { Clock_initialize, NULL, NULL, NULL, NULL, NULL } + +rtems_device_driver Clock_initialize( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +void Clock_exit(void); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/console.h b/cpukit/include/rtems/console.h new file mode 100644 index 0000000000..dbd749c60a --- /dev/null +++ b/cpukit/include/rtems/console.h @@ -0,0 +1,155 @@ +/** + * @file + * + * @brief Console Driver for all Boards + * + * This file describes the Console Device Driver for all boards. + * This driver provides support for the standard C Library. + */ + +/* + * COPYRIGHT (c) 1989-2011. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_CONSOLE_H +#define _RTEMS_CONSOLE_H + +#include <rtems/io.h> /* rtems_device_driver */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This macro defines the standard name for the console device + * that is available to applications. + */ +#define CONSOLE_DEVICE_NAME "/dev/console" + +/** + * This macro defines the standard device driver table entry for + * a console device driver. + */ +#define CONSOLE_DRIVER_TABLE_ENTRY \ + { console_initialize, console_open, console_close, \ + console_read, console_write, console_control } + +/** + * @brief Console initialization entry point. + * + * This method initializes the console device driver. + * + * @param[in] major is the device driver major number. + * @param[in] minor is the device driver minor number. + * @param[in] arg is the parameters to this call. + * + * @retval RTEMS_SUCCESSFUL The device driver is successfully initialized. + */ +rtems_device_driver console_initialize( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Console open entry point. + * + * This method opens a specific device supported by the + * console device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @retval RTEMS_SUCCESSFUL The device driver is successfully opened. + */ +rtems_device_driver console_open( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Console close entry point. + * + * This method closes a specific device supported by the + * console device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @retval RTEMS_SUCCESSFUL The device driver is successfully closed. + */ +rtems_device_driver console_close( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Console read entry point. + * + * This method reads from a specific device supported by the + * console device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @retval RTEMS_SUCCESSFUL The device is successfully read from. + */ +rtems_device_driver console_read( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Console write entry point. + * + * This method writes to a specific device supported by the + * console device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @retval RTEMS_SUCCESSFUL The device is successfully written. + */ +rtems_device_driver console_write( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Console IO control entry point. + * + * This method performs an IO Control operation on a + * specific device supported by the console device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @retval RTEMS_SUCCESSFUL the device driver IO control operation is + * successfully performed. + */ +rtems_device_driver console_control( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/framebuffer.h b/cpukit/include/rtems/framebuffer.h new file mode 100644 index 0000000000..ab1e5c73bd --- /dev/null +++ b/cpukit/include/rtems/framebuffer.h @@ -0,0 +1,168 @@ +/** + * @file rtems/framebuffer.h + * + * @brief Frame Buffer Device Driver for all Boards + * + * This file describes the Frame Buffer Device Driver for all boards. + */ + +/* + * COPYRIGHT (c) 1989-2011. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef __RTEMS_FRAMEBUFFER_h__ +#define __RTEMS_FRAMEBUFFER_h__ + +#include <rtems/io.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This macro defines the standard name for the frame buffer device + * that is available to applications. + */ +#define FRAMEBUFFER_DEVICE_NAME "/dev/fb" + +/** + * @brief Standard device file path of first frame buffer device. + * + * This device is the default frame buffer device for the Microwindows Screen + * Driver. + */ +#define FRAMEBUFFER_DEVICE_0_NAME "/dev/fb0" + +/** + * This macro defines the standard device driver table entry for + * a frame buffer device driver. + */ +#define FRAME_BUFFER_DRIVER_TABLE_ENTRY \ + { frame_buffer_initialize, frame_buffer_open, frame_buffer_close, \ + frame_buffer_read, frame_buffer_write, frame_buffer_control } + +/** + * @brief Frame Buffer Initialization Entry Point + * + * This method initializes the frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device driver is successfully initialized. + */ +rtems_device_driver frame_buffer_initialize( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Frame Buffer Open Entry Point + * + * This method opens a specific device supported by the + * frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device driver is successfully opened. + */ +rtems_device_driver frame_buffer_open( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Frame Buffer Close Entry Point + * + * This method closes a specific device supported by the + * frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device is successfully closed. + */ +rtems_device_driver frame_buffer_close( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Frame Buffer Read Entry Point + * + * This method reads from a specific device supported by the + * frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device is successfully read from. + */ +rtems_device_driver frame_buffer_read( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Frame Buffer Write Entry Point + * + * This method writes to a specific device supported by the + * frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device is successfully written. + */ +rtems_device_driver frame_buffer_write( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +/** + * @brief Frame Buffer IO Control Entry Point + * + * This method performs an IO Control operation on a + * specific device supported by the frame buffer device driver. + * + * @param[in] major is the device driver major number + * @param[in] minor is the device driver minor number + * @param[in] arg is the parameters to this call + * + * @return This method returns RTEMS_SUCCESSFUL when + * the device driver IO control operation is + * successfully performed. + */ +rtems_device_driver frame_buffer_control( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg +); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/rtc.h b/cpukit/include/rtems/rtc.h new file mode 100644 index 0000000000..27b9e453c5 --- /dev/null +++ b/cpukit/include/rtems/rtc.h @@ -0,0 +1,115 @@ +/** + * @file + * + * @brief Real-Time Clock Driver Interface + * + * Real-time clock driver interface. + */ + +/* + * COPYRIGHT (c) 1989-2001. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_RTC_H +#define _RTEMS_RTC_H + +#include <rtems.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup rtems_rtc Real-Time Clock Driver Interface + * + * This driver interface provides support to read and set the real-time clock + * and to initialize the time of day for the system. + */ +/**@{**/ + +/** + * Device file name path. + */ +#define RTC_DEVICE_NAME "/dev/rtc" + +/** + * Device driver table entry. + */ +#define RTC_DRIVER_TABLE_ENTRY \ + { rtc_initialize, rtc_open, rtc_close, \ + rtc_read, rtc_write, rtc_control } + +/** + * Initializes the real-time clock device and sets the time of day for the + * system. + * + * If the real-time clock provides an invalid time of day value the system time + * of day must remain untouched. + */ +rtems_device_driver rtc_initialize( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** + * Opens the real-time clock device. + */ +rtems_device_driver rtc_open( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** + * Closes the real-time clock device. + */ +rtems_device_driver rtc_close( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** + * Reads the real-time clock value. + * + * The value will be returned in a @ref rtems_time_of_day structure. + */ +rtems_device_driver rtc_read( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** + * Sets the real-time clock value. + * + * The value will be set from a @ref rtems_time_of_day structure. + */ +rtems_device_driver rtc_write( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** + * Controls the real-time clock. + */ +rtems_device_driver rtc_control( + rtems_device_major_number, + rtems_device_minor_number, + void * +); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/cpukit/include/rtems/watchdogdrv.h b/cpukit/include/rtems/watchdogdrv.h new file mode 100644 index 0000000000..3e2ee4d6fe --- /dev/null +++ b/cpukit/include/rtems/watchdogdrv.h @@ -0,0 +1,71 @@ +/** + * @file rtems/watchdogdrv.h + * + * This file describes the Watchdog Driver for all boards. + * A watchdog is a hardware device that will reset the board + * if not touched in a specific way at a regular interval. + * It is a simple, yet important, part of many embedded systems. + */ + +/* + * + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_WATCHDOGDRV_H +#define _RTEMS_WATCHDOGDRV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This macro defines the watchdog device driver entry points. + */ +#define WATCHDOG_DRIVER_TABLE_ENTRY \ + { Watchdog_initialize, NULL, NULL, NULL, NULL, Watchdog_control } + +/** + * @brief Watchdog Driver Initialization + * + * This method initializes the watchdog hardware device. The device + * should be initialized as DISABLED since BSP initialization may + * take longer than the timeout period for the watchdog. + * + * @param[in] major is the watchdog device major number + * @param[in] minor is the watchdog device minor number + * @param[in] arguments points to device driver arguments + */ +rtems_device_driver Watchdog_initialize( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arguments +); + +/** + * @brief Watchdog Driver IO Control + * + * This method implements the IO Control device driver entry + * point for the watchdog hardware device. + * + * @param[in] major is the watchdog device major number + * @param[in] minor is the watchdog device minor number + * @param[in] arguments points to device driver arguments + */ +rtems_device_driver Watchdog_control( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arguments +); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ |