?? eeprom_24cxx.h
字號:
/****************************************************************************/
/* TEXAS INSTRUMENTS PROPRIETARY INFORMATION */
/* */
/* (c) Copyright, Texas Instruments Incorporated, 2006. */
/* All Rights Reserved. */
/* */
/* Property of Texas Instruments Incorporated. Restricted Rights - */
/* Use, duplication, or disclosure is subject to restrictions set */
/* forth in TI's program license agreement and associated documentation. */
/****************************************************************************/
/****************************************************************************/
/* eeeprom_24cXX.h. */
/* */
/* 24cXX-family EEPROM driver. */
/****************************************************************************/
#ifndef __EEPROM24CXX_H
#define __EEPROM24CXX_H
#include <stddef.h>
#include "common.h"
#include "i2c.h"
/****************************************************************************/
/* Driver declarations. */
/****************************************************************************/
#define EEWRITECYCLE 5000 /* max EEPROM write cycle time, microseconds */
typedef enum /* EEPROM driver completion codes */
{
EEPROM_FAIL, /* general failure */
EEPROM_PASS, /* normal completion */
EEPROM_ADDR, /* invalid address */
EEPROM_SEM, /* can't acquire i2c semaphore */
EEPROM_API, /* i2c API call error */
EEPROM_DEVICE, /* unknown EERPOM device type */
EEPROM_CLOSED /* device is closed, not available */
} EEPROM_CC;
typedef enum /* 24cXX device type */
{
EE_24C01,
EE_24C02,
EE_24C04,
EE_24C08,
EE_24C16,
EE_24C32,
EE_24C64,
EE_24MAX
} EE_TYPE;
typedef struct _eepromInitStruct
{
I2CPORT portNo; /* API i2c Port number */
EE_TYPE eeType; /* device type */
uint08 baseAddr; /* base i2c device address << 1 */
uint08 ttimeout; /* tenths of seconds operation timeout (25.5 sec max) */
} EEPROM_INITSTRUCT;
/****************************************************************************/
/* Driver functions. */
/****************************************************************************/
EEPROM_CC EEPROM_Open( const EEPROM_INITSTRUCT *pInitStruct );
EEPROM_CC EEPROM_GetData( BOOL mirror, uint16 offset, size_t numBytes, void *data );
EEPROM_CC EEPROM_PutData( BOOL mirror, uint16 offset, size_t numBytes, void *data );
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -