File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
components/testing/COMPONENT_FPGA_CI_TEST_SHIELD Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,16 @@ uint8_t I2CTester::state_num()
7979
8080uint8_t I2CTester::num_dev_addr_matches ()
8181{
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;
8592}
8693
8794void 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 {
9696 */
9797 uint8_t num_dev_addr_matches ();
9898
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+
99106 /* *
100107 * Set the I2C slave device address
101108 *
Original file line number Diff line number Diff line change 194194#define TESTER_I2C_NUM_READS (0x018 + 0x00105000)
195195#define TESTER_I2C_FROM_SLAVE_CHECKSUM (0x01A + 0x00105000)
196196#define TESTER_I2C_FROM_SLAVE_CHECKSUM_SIZE 4
197+ #define TESTER_I2C_NUMBER_DEV_ADDR_MISMATCHES (0x01E + 0x00105000)
198+ #define TESTER_I2C_NUMBER_DEV_ADDR_MISMATCHES_SIZE 1
You can’t perform that action at this time.
0 commit comments