⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hw_fm31xxx_api.h

📁 1、基于韩国at2041芯片开发的Linux环境的DVR代码。 2、以原来代码进行了修改。 3、主要修改网络通讯出现异常问题处理 4、硬盘覆盖录像不起作用
💻 H
字号:
/* set tabstop=4 */
/********************************************************************************
 *                                                                              *
 * Copyright(C) 2004  Penta-Micro                                               *
 *                                                                              *
 * ALL RIGHT RESERVED                                                           *
 *                                                                              *
 * This software is the property of Penta-Micro and is furnished under          *
 * license by Penta-Micro. This software may be used only in accordance         *	
 * with the terms of said license. This copyright notice may not be             *
 * removed, modified or obliterated without the prior written permission        *
 * of Penta-Micro.                                                              *
 *                                                                              *
 * This software may not be copyed, transmitted, provided to or otherwise       *
 * made available to any other person, company, corporation	or other entity     *
 * except as specified in the terms of said license.                            *
 *                                                                              *
 * No right, title, ownership or other interest in the software is hereby       *
 * granted or transferred.                                                      *
 *                                                                              *
 * The information contained herein is subject to change without notice and     *
 * should not be construed as a commitment by Penta-Micro.                      *
 *                                                                              *
 ********************************************************************************
 
  MODULE NAME:  HW_FM31XXX_API.H
  
  REVISION HISTORY:
  
  Date       Ver Name                             Description
  ---------- --- --------------------- -----------------------------------------
 08/25/2005 1.0 JiGwanKang(xchannel)    Created 
  Modify
 ...............................................................................
 
  DESCRIPTION:
  
  This Module contains definition for NVRAM and RTC (for FM31xxx) function.
  
 ...............................................................................
*/    
 
#ifndef _HW_FM31XXX_API_H
#define _HW_FM31XXX_API_H


/** ************************************************************************* ** 
 ** includes
 ** ************************************************************************* **/
#include "typedef.h"

 
/** ************************************************************************* ** 
 ** defines
 ** ************************************************************************* **/
#define FM31xxx_NVRAM_ADDR	0x50
#define FM31xxx_RTC_ADDR		0x68

/* time data format for FM31xxx */
struct fm31xxx_st
{
	unsigned char rsvd1:1;   	/* not used */
	unsigned char sec10:3;       	/*  second range: 0 ~ 59 */
	unsigned char sec:4;

	unsigned char rsvd2:1;   	/* not used */
	unsigned char min10:3;    	/* minute range: 0 ~ 59 */
	unsigned char min:4;

	unsigned char rsvd3:2;   	/* not used */
	unsigned char hr10:2;		/* hour range: 0 ~ 23 */
	unsigned char hr:4;

	unsigned char rsvd4:5;   	/* not used */
	unsigned char day:3; 		/* day range: 1 ~ 7 */
	
	unsigned char rsvd5:2;   	/* not used */
	unsigned char date10:2;     	/* date range: 1 ~ 31 */
	unsigned char date:4;

	unsigned char rsvd6:3;   	/* not used */
	unsigned char month10:1;	/* month range: 1 ~ 12 */
	unsigned char month:4;

	unsigned char year10:4;     	/* year range: 00 ~ 99, when the overflow, check CF Flag(reg 0x00) */
	unsigned char year:4;
};

/** ************************************************************************* ** 
 ** typedefs
 ** ************************************************************************* **/
  
/** ************************************************************************* ** 
 ** function prototypes
 ** ************************************************************************* **/
RETURN	fm31xxx_open(void);
void	            fm31xxx_close(void);
RETURN 	fm31xxx_write_reg(UNS8 sub_addr, UNS8 data);
RETURN 	set_cur_time(struct tm *tmp);
RETURN 	get_cur_time(struct tm *tmp);
RETURN	set_nvram_para(S32 offset, S32 size, UNS32 *value);
S32		      get_nvram_para(S32 offset, S32 size);

#endif /* _HW_FM31XXX_API_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -