File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 35
35
*
36
36
* @{
37
37
*/
38
+
39
+ /**
40
+ * Indicates that an unspecified error has occurred in the transfer. This usually means
41
+ * either an internal error in the Mbed MCU's I2C module, or something like an arbitration loss.
42
+ * Does not indicate a NACK.
43
+ */
38
44
#define I2C_EVENT_ERROR (1 << 1)
45
+
46
+ /**
47
+ * Indicates that the slave did not respond to the address byte of the transfer.
48
+ */
39
49
#define I2C_EVENT_ERROR_NO_SLAVE (1 << 2)
50
+
51
+ /**
52
+ * Indicates that the transfer completed successfully.
53
+ */
40
54
#define I2C_EVENT_TRANSFER_COMPLETE (1 << 3)
55
+
56
+ /**
57
+ * Indicates that a NACK was received after the address byte, but before the requested number of bytes
58
+ * could be transferred.
59
+ *
60
+ * Note: Not every manufacturer HAL is able to make a distinction between this flag and #I2C_EVENT_ERROR_NO_SLAVE.
61
+ * On a NACK, you might conceivably get one or both of these flags.
62
+ */
41
63
#define I2C_EVENT_TRANSFER_EARLY_NACK (1 << 4)
64
+
65
+ /**
66
+ * Use this macro to request all possible I2C events.
67
+ */
42
68
#define I2C_EVENT_ALL (I2C_EVENT_ERROR | I2C_EVENT_TRANSFER_COMPLETE | I2C_EVENT_ERROR_NO_SLAVE | I2C_EVENT_TRANSFER_EARLY_NACK)
43
69
44
70
/**@}*/
You can’t perform that action at this time.
0 commit comments