![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
IO-based I2C functions with PCF8574 to proof my HW is correctly wired. Working on my LPC4088
my_i2c.h@0:b0247e85bf0e, 2014-12-07 (annotated)
- Committer:
- karelv
- Date:
- Sun Dec 07 13:56:12 2014 +0000
- Revision:
- 0:b0247e85bf0e
IO-based I2C function, to show my HW is correctly wired
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
karelv | 0:b0247e85bf0e | 1 | #ifndef __MY_I2C_H__ |
karelv | 0:b0247e85bf0e | 2 | #define __MY_I2C_H__ |
karelv | 0:b0247e85bf0e | 3 | |
karelv | 0:b0247e85bf0e | 4 | bool my_i2cStart (unsigned char slaveAddress); |
karelv | 0:b0247e85bf0e | 5 | bool my_i2cStop (); |
karelv | 0:b0247e85bf0e | 6 | bool my_i2cRepeatedStart (unsigned char slaveAddress); |
karelv | 0:b0247e85bf0e | 7 | bool my_i2cWrite (unsigned char data); |
karelv | 0:b0247e85bf0e | 8 | unsigned char my_i2cReadByte (); |
karelv | 0:b0247e85bf0e | 9 | unsigned char my_i2cReadAck (); |
karelv | 0:b0247e85bf0e | 10 | unsigned char my_i2cReadNak (); |
karelv | 0:b0247e85bf0e | 11 | unsigned char my_i2cRead (unsigned char ack); |
karelv | 0:b0247e85bf0e | 12 | void my_i2cWriteByte (unsigned char byte); |
karelv | 0:b0247e85bf0e | 13 | bool my_i2cGetAck (); |
karelv | 0:b0247e85bf0e | 14 | |
karelv | 0:b0247e85bf0e | 15 | #endif // __MY_I2C_H__ |