File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
components/testing/COMPONENT_FPGA_CI_TEST_SHIELD Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ uint8_t I2CTester::num_dev_addr_matches()
84
84
return num_correct;
85
85
}
86
86
87
+ uint8_t I2CTester::num_dev_addr_mismatches ()
88
+ {
89
+ uint8_t num_incorrect = 0 ;
90
+ read (TESTER_I2C_NUMBER_DEV_ADDR_MISMATCHES, &num_incorrect, sizeof (num_incorrect));
91
+ return num_incorrect;
92
+ }
93
+
87
94
void I2CTester::set_device_address (uint16_t addr)
88
95
{
89
96
uint16_t data = addr;
Original file line number Diff line number Diff line change @@ -96,6 +96,13 @@ class I2CTester: public MbedTester {
96
96
*/
97
97
uint8_t num_dev_addr_matches ();
98
98
99
+ /* *
100
+ * Get the number of times the device address has been sent incorrectly
101
+ *
102
+ * @return The number of times the device address has been sent incorrectly
103
+ */
104
+ uint8_t num_dev_addr_mismatches ();
105
+
99
106
/* *
100
107
* Set the I2C slave device address
101
108
*
Original file line number Diff line number Diff line change 194
194
#define TESTER_I2C_NUM_READS (0x018 + 0x00105000)
195
195
#define TESTER_I2C_FROM_SLAVE_CHECKSUM (0x01A + 0x00105000)
196
196
#define TESTER_I2C_FROM_SLAVE_CHECKSUM_SIZE 4
197
+ #define TESTER_I2C_NUMBER_DEV_ADDR_MISMATCHES (0x01E + 0x00105000)
You can’t perform that action at this time.
0 commit comments