📄 lh79520_rtc_driver.h
字号:
/***********************************************************************
* $Workfile: lh79520_rtc_driver.h $
* $Revision: 1.0 $
* $Author: LiJ $
* $Date: Jul 07 2003 16:41:00 $
*
* Project: LH79520 RTC driver
*
* Description:
* This file contains driver support for the RTC module on the
* LH79520
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh79520/include/lh79520_rtc_driver.h-arc $
*
* Rev 1.0 Jul 07 2003 16:41:00 LiJ
* 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 LH79520_RTC_DRIVER_H
#define LH79520_RTC_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "lh79520_rtc.h"
/***********************************************************************
* RTC device configuration commands (IOCTL commands and arguments)
**********************************************************************/
/* RTC device commands (IOCTL commands) */
typedef enum {
RTC_START, /* Start the RTC timer, arg = start load value */
RTC_SET_TIME_MS, /* Set the RTC time out, arg = mili second to
time out */
RTC_ENABLE_MATCH_INT, /* Enable RTC time out interruption, no arg */
RTC_DISABLE_MATCH_INT, /* Disable RTC time out interrupt, no arg */
RTC_CLEAR_MATCH_INT, /* Clear the RTC time out intrrupt bit, no arg */
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_GET_LOAD, /* Returns the RTC load value */
RTC_GET_CURRENT, /* Returns the current RTC value */
RTC_GET_MATCH, /* Returns the RTC match value */
GET_INT_PENDING /* Returns the RTC interrupt pending status, (1 =
interrupt pending, 0 = interrupt not
pending) */
} RTC_IOCTL_STS_T;
/***********************************************************************
* RTC device configuration structure
**********************************************************************/
/* RTC device configuration structure */
typedef struct
{
INT_32 init; /* Device initialized flag */
RTC_REGS_T *regptr; /* Pointer to RTC registers */
} RTC_CFG_T;
/***********************************************************************
* RTC driver 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 /* LH79520_RTC_DRIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -