1.1 --- a/pkg/devices/lib/i2c/include/i2c-jz4730.h Tue Feb 16 22:53:31 2021 +0100
1.2 +++ b/pkg/devices/lib/i2c/include/i2c-jz4730.h Wed Feb 17 00:48:47 2021 +0100
1.3 @@ -67,6 +67,12 @@
1.4 unsigned int read(uint8_t address, uint8_t buf[], unsigned int length);
1.5 unsigned int write(uint8_t address, uint8_t buf[], unsigned int length);
1.6
1.7 + // Statistics.
1.8 +
1.9 + unsigned int start_not_possible = 0, read_not_ready = 0, read_not_ready_clear = 0, read_not_ready_stx = 0,
1.10 + read_not_possible = 0, read_nack = 0, read_complete = 0,
1.11 + write_not_possible = 0, write_complete = 0, total_reads = 0;
1.12 +
1.13 protected:
1.14 void set_frequency();
1.15
1.16 @@ -144,4 +150,24 @@
1.17
1.18 unsigned int jz4730_i2c_write(void *i2c_channel, uint8_t address, uint8_t buf[], unsigned int length);
1.19
1.20 +unsigned int jz4730_i2c_start_not_possible(void *i2c_channel);
1.21 +
1.22 +unsigned int jz4730_i2c_read_not_ready(void *i2c_channel);
1.23 +
1.24 +unsigned int jz4730_i2c_read_not_ready_clear(void *i2c_channel);
1.25 +
1.26 +unsigned int jz4730_i2c_read_not_ready_stx(void *i2c_channel);
1.27 +
1.28 +unsigned int jz4730_i2c_read_not_possible(void *i2c_channel);
1.29 +
1.30 +unsigned int jz4730_i2c_read_nack(void *i2c_channel);
1.31 +
1.32 +unsigned int jz4730_i2c_read_complete(void *i2c_channel);
1.33 +
1.34 +unsigned int jz4730_i2c_write_not_possible(void *i2c_channel);
1.35 +
1.36 +unsigned int jz4730_i2c_write_complete(void *i2c_channel);
1.37 +
1.38 +unsigned int jz4730_i2c_total_reads(void *i2c_channel);
1.39 +
1.40 EXTERN_C_END