Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Total I2C Abuse: More...
Go to the source code of this file.
Functions | |
void | init_i2c_abuse_test (void) |
static void | i2c_abuse_send_transaction (uint8_t _init) |
void | event_i2c_abuse_test (void) |
void | periodic_50Hz_i2c_abuse_test (void) |
Variables | |
struct i2c_transaction | i2c_test1 |
struct i2c_transaction | i2c_test2 |
volatile uint8_t | i2c_abuse_test_counter = 0 |
volatile uint32_t | i2c_abuse_test_bitrate = 1000 |
Total I2C Abuse:
-all transaction types: T1 T2 T3 T4 R1 R2 R3 R4 T1R1 T2R1 T1R2 T1R3 T1R4 T1R5 T2R5 -all bitrates: 1k (way too slow) to 1M (way to fast) -occasional Short circuit (simulate bus capacitance or EMI errors) -variable bus load: from empty to full stack
-Connect LED to MosFet that pulls-down the SCL and SDA lines
Definition in file i2c_abuse_test.c.
void event_i2c_abuse_test | ( | void | ) |
Definition at line 180 of file i2c_abuse_test.c.
References i2c_abuse_send_transaction(), i2c_abuse_test_bitrate, i2c_abuse_test_counter, i2c_idle(), i2c_setbitrate(), i2c_submit(), i2c_test1, i2c_test2, I2CTransFailed, I2CTransRx, I2CTransSuccess, LED_OFF, LED_ON, LED_TOGGLE, i2c_transaction::len_r, i2c_transaction::slave_addr, i2c_transaction::status, and i2c_transaction::type.
|
static |
Definition at line 60 of file i2c_abuse_test.c.
References i2c_transaction::buf, i2c_submit(), i2c_test1, I2CTransRx, I2CTransTx, I2CTransTxRx, i2c_transaction::len_r, i2c_transaction::len_w, i2c_transaction::slave_addr, and i2c_transaction::type.
Referenced by event_i2c_abuse_test().
void init_i2c_abuse_test | ( | void | ) |
Definition at line 45 of file i2c_abuse_test.c.
References i2c_abuse_test_bitrate, i2c_abuse_test_counter, i2c_test1, i2c_test2, I2CTransSuccess, i2c_transaction::slave_addr, and i2c_transaction::status.
void periodic_50Hz_i2c_abuse_test | ( | void | ) |
Definition at line 226 of file i2c_abuse_test.c.
volatile uint32_t i2c_abuse_test_bitrate = 1000 |
Definition at line 43 of file i2c_abuse_test.c.
Referenced by event_i2c_abuse_test(), and init_i2c_abuse_test().
volatile uint8_t i2c_abuse_test_counter = 0 |
Definition at line 42 of file i2c_abuse_test.c.
Referenced by event_i2c_abuse_test(), and init_i2c_abuse_test().
struct i2c_transaction i2c_test1 |
Definition at line 39 of file i2c_abuse_test.c.
Referenced by event_i2c_abuse_test(), i2c_abuse_send_transaction(), and init_i2c_abuse_test().
struct i2c_transaction i2c_test2 |
Definition at line 40 of file i2c_abuse_test.c.
Referenced by event_i2c_abuse_test(), and init_i2c_abuse_test().