File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
components/testing/COMPONENT_FPGA_CI_TEST_SHIELD Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,16 @@ uint8_t I2CTester::state_num()
79
79
80
80
uint8_t I2CTester::num_dev_addr_matches ()
81
81
{
82
- uint8_t num_correct = 0 ;
83
- read (TESTER_I2C_NUMBER_DEV_ADDR_MATCHES, &num_correct, sizeof (num_correct));
84
- return num_correct;
82
+ uint8_t num_dev_addr_matches = 0 ;
83
+ read (TESTER_I2C_NUMBER_DEV_ADDR_MATCHES, &num_dev_addr_matches, sizeof (num_dev_addr_matches));
84
+ return num_dev_addr_matches;
85
+ }
86
+
87
+ uint8_t I2CTester::num_dev_addr_mismatches ()
88
+ {
89
+ uint8_t num_dev_addr_mismatches = 0 ;
90
+ read (TESTER_I2C_NUMBER_DEV_ADDR_MISMATCHES, &num_dev_addr_mismatches, sizeof (num_dev_addr_mismatches));
91
+ return num_dev_addr_mismatches;
85
92
}
86
93
87
94
void I2CTester::set_device_address (uint16_t 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