|
发表于 2014-3-13 16:57:07
|
显示全部楼层
本帖最后由 wdluo 于 2014-3-13 16:59 编辑
纬图的USB-I2C适配器支持SMBUS和PMBUS协议
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- int32_t WINAPI VII_ScanDevice(uint8_t NeedInit=1);
- int32_t WINAPI VII_OpenDevice(int32_t DevType,int32_t DevIndex,int32_t Reserved);
- int32_t WINAPI VII_CloseDevice(int32_t DevType,int32_t DevIndex);
- int32_t WINAPI VII_ReadBoardInfo(int32_t DevType,int32_t DevIndex,PVII_BOARD_INFO pInfo);
- int32_t WINAPI VII_TimeConfig(int32_t DevType, int32_t DevIndex, int32_t I2CIndex, PVII_TIME_CONFIG pTimeConfig);
- int32_t WINAPI VII_InitI2C(int32_t DevType, int32_t DevIndex, int32_t I2CIndex, PVII_INIT_CONFIG pInitConfig);
- int32_t WINAPI VII_WriteBytes(int32_t DevType,int32_t DevIndex,int32_t I2CIndex,uint16_t Addr,uint32_t SubAddr,uint8_t *pWriteData,uint16_t Len);
- int32_t WINAPI VII_ReadBytes(int32_t DevType,int32_t DevIndex,int32_t I2CIndex,uint16_t Addr,uint32_t SubAddr,uint8_t *pReadData,uint16_t Len);
- int32_t WINAPI SMBUS_ScanDevice(uint8_t NeedInit=1);
- int32_t WINAPI SMBUS_OpenDevice(int32_t DevType,int32_t DevIndex,int32_t Reserved);
- int32_t WINAPI SMBUS_CloseDevice(int32_t DevType,int32_t DevIndex);
- int32_t WINAPI SMBUS_HardInit(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint32_t ClockSpeed, uint8_t OwnAddr);
- int32_t WINAPI SMBUS_QuickCommand(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr);
- int32_t WINAPI SMBUS_WriteByte(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t Data,uint8_t PEC);
- int32_t WINAPI SMBUS_ReadByte(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t *pData,uint8_t PEC);
- int32_t WINAPI SMBUS_WriteByteProtocol(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint8_t Data,uint8_t PEC);
- int32_t WINAPI SMBUS_WriteWordProtocol(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint16_t Data,uint8_t PEC);
- int32_t WINAPI SMBUS_ReadByteProtocol(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode, uint8_t *pData,uint8_t PEC);
- int32_t WINAPI SMBUS_ReadWordProtocol(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode, uint16_t *pData,uint8_t PEC);
- int32_t WINAPI SMBUS_ProcessCall(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint16_t WriteData, uint16_t *pReadData,uint8_t PEC);
- int32_t WINAPI SMBUS_BlockWrite(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint8_t *pData,uint8_t ByteCount,uint8_t PEC);
- int32_t WINAPI SMBUS_BlockRead(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint8_t *pData,uint8_t *pByteCount,uint8_t PEC);
- int32_t WINAPI SMBUS_BlockProcessCall(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t SlaveAddr,uint8_t CommandCode,uint8_t *pWriteData,uint8_t WriteByteCount,uint8_t *pReadData,uint8_t *pReadByteCount,uint8_t PEC);
- int32_t WINAPI SMBUS_GetAlert(int32_t DevType,int32_t DevIndex,int32_t SMBUSIndex,uint8_t *pAlertFlag);
- #ifdef __cplusplus
- }
- #endif
复制代码
下面这个是PC端接口函数定义的截图:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|