📄 lh7a404_rtc_driver.h
字号:
/***********************************************************************
* $Workfile: lh7a404_rtc_driver.h $
* $Revision: 1.0 $
* $Author: WellsK $
* $Date: Jun 30 2003 17:16:46 $
*
* Project: LH7A404 RTC driver
*
* Description:
* This file contains driver support for the RTC module on the
* LH7A404
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh7a404/include/lh7a404_rtc_driver.h-arc $
*
* Rev 1.0 Jun 30 2003 17:16:46 WellsK
* Initial revision.
*
*
***********************************************************************
* SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
* OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
* AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES,
* SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
*
* SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY
* FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A
* SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
* FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
*
* COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
**********************************************************************/
#ifndef LH7A404_RTC_DRIVER_H
#define LH7A404_RTC_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "lh7a404_rtc.h"
/***********************************************************************
* RTC device configuration commands (IOCTL commands and arguments)
**********************************************************************/
/* RTC device commands (IOCTL commands) */
typedef enum {
RTC_SET_CLOCK, /* Set the RTC load value, arg = load value */
RTC_SET_MATCH, /* Set the RTC match value, arg = match value */
RTC_ENABLE_MATCH_INT, /* Enable or disable the RTC match interrupt,
arg = 1 to enable, arg = 0 to disable */
RTC_CLEAR_MATCH_INT, /* Clear a pending RTC match interrupt, no
arguments */
RTC_GET_STATUS /* Get a RTC status, use an argument type of
RTC_IOCTL_STS_T as the argument to return the
correct status */
} RTC_IOCTL_CMD_T;
/* RTC device arguments for RTC_GET_STATUS command (IOCTL arguments) */
typedef enum {
RTC_LOAD, /* Returns the RTC load value */
RTC_CURRENT, /* Returns the current RTC value */
RTC_MATCH, /* Returns the RTC match value */
RTC_INT_PENDING_ST /* Returns the RTC interrupt pending status,
(1 = interrupt pending, 0 = interrupt not
pending) */
} RTC_IOCTL_STS_T;
/***********************************************************************
* RTC driver API functions
**********************************************************************/
/* Open the RTC */
INT_32 rtc_open(void *ipbase, INT_32 arg);
/* Close the RTC */
STATUS rtc_close(INT_32 devid);
/* RTC configuration block */
STATUS rtc_ioctl(INT_32 devid,
INT_32 cmd,
INT_32 arg);
/* RTC read function (stub only) */
INT_32 rtc_read(INT_32 devid,
void *buffer,
INT_32 max_bytes);
/* RTC write function (stub only) */
INT_32 rtc_write(INT_32 devid,
void *buffer,
INT_32 n_bytes);
#ifdef __cplusplus
}
#endif
#endif /* LH7A404_RTC_DRIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -