?? dev_i2c_main.h
字號:
/*=========================================================================== Copyright 2000, 2001 Holley Communications. All rights reserved.*//***************************************************************************** * * DEV_I2C_MAIN.H - DEV_I2C_MAIN.C File: Internal Definitions * * PURPOSE: * To provide definitions used within the DEV_I2C_MAIN.C file. * * HISTORY: * V 1.00 - Oct 27, 1997 - E.Schmidt * Creation * - Apr 22, 1998 - G.Catt * Moved the internal function prototypes here. * - May 04, 1998 - G.Catt * Ported to the CDMA+ board. * - May 06, 1998 - G.Catt * Updated the function names. * - May 13, 1998 - G.Catt * Added protocol bit and timeout values. * - May 20, 1998 - G.Catt * Added I2C bus operation definitions. * Added i2c_txdevaddr () prototype. * * NOTE: * * *****************************************************************************/#ifndef DEV_I2C_MAIN_H#define DEV_I2C_MAIN_H#include "main_config.h"#ifndef HOST_BUILD/* I2C Protocol Bit Definitions */#define DEV_I2C_BIT_RDWRNOT 0x01 /* Read/write* control bit position *//* Timeout Values ( * 2.5 us/count) */#define DEV_I2C_TIMEOUT_SCLRLS 100 /* SCL release (250 us) *//* I2C Bus States */enum dev_i2cebusstates{ DEV_I2C_BUS_IDLE, /* No activity on the bus */ DEV_I2C_BUS_BUSY /* Activity on the bus */};/* DEV_I2C Bus Operations */enum dev_i2cebusoperations{ DEV_I2C_READ, /* Read from device */ DEV_I2C_WRITE /* Write to device */};/* Internal function prototypes */Bool dev_i2c_busstate ( void );void dev_i2c_txstartbit ( void );void dev_i2c_txstopbit ( void );Int16 dev_i2c_rxdatabit ( void );Int16 dev_i2c_rxackbit ( void );Int16 dev_i2c_wait4sclrls ( void );#if BOARD_PHOENIXInt16 dev_i2c_txdevaddr ( Byte deviceaddr );Int16 dev_i2c_txdatabyte ( Byte data, Bool Last );void dev_i2c_txdatabit( Byte bit );Int16 dev_i2c_rxdatabyte( Bool Last );#elseInt16 dev_i2c_txdevaddr ( Byte deviceaddr, Bool operation );Int16 dev_i2c_txdatabyte ( Byte data );Int16 dev_i2c_txdatabit ( Byte bit );#endif#endif#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -