NXC
Version 1.2.1 r5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Groups
Pages
ex_i2cdeviceinfo.nxc
This is an example of how to use the
I2CDeviceInfo
function.
task main()
{
SetSensorLowspeed
(
S1
);
TextOut
(0,
LCD_LINE1
,
I2CDeviceInfo
(
S1
,
I2C_ADDR_DEFAULT
,
I2C_REG_DEVICE_ID
));
TextOut
(0,
LCD_LINE2
,
I2CDeviceInfo
(
S1
,
I2C_ADDR_DEFAULT
,
I2C_REG_VENDOR_ID
));
TextOut
(0,
LCD_LINE3
,
I2CDeviceInfo
(
S1
,
I2C_ADDR_DEFAULT
,
I2C_REG_VERSION
));
Wait
(
SEC_10
);
}
Generated by
1.8.2