mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[tests] fix SEND_I2C_ERRORS for some test progs
This commit is contained in:
@@ -85,6 +85,7 @@ static inline void main_periodic_task( void ) {
|
||||
});
|
||||
RunOnceEvery(256,
|
||||
{
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -96,6 +97,7 @@ static inline void main_periodic_task( void ) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
|
||||
@@ -81,6 +81,7 @@ static inline void main_periodic_task( void ) {
|
||||
LED_PERIODIC();
|
||||
});
|
||||
RunOnceEvery(256, {
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -92,6 +93,7 @@ static inline void main_periodic_task( void ) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
|
||||
@@ -155,6 +155,7 @@ static void test_baro_start(void) {all_led_green();}
|
||||
static void test_baro_periodic(void) {
|
||||
RunOnceEvery(2, {baro_periodic();});
|
||||
RunOnceEvery(100,{
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -166,6 +167,7 @@ static void test_baro_periodic(void) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
@@ -200,6 +202,7 @@ static void test_bldc_periodic(void) {
|
||||
i2c1_transmit(0x58, 1, NULL);
|
||||
|
||||
RunOnceEvery(100,{
|
||||
uint16_t i2c1_queue_full_cnt = i2c1.errors->queue_full_cnt;
|
||||
uint16_t i2c1_ack_fail_cnt = i2c1.errors->ack_fail_cnt;
|
||||
uint16_t i2c1_miss_start_stop_cnt = i2c1.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c1_arb_lost_cnt = i2c1.errors->arb_lost_cnt;
|
||||
@@ -211,6 +214,7 @@ static void test_bldc_periodic(void) {
|
||||
uint32_t i2c1_last_unexpected_event = i2c1.errors->last_unexpected_event;
|
||||
const uint8_t _bus1 = 1;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c1_queue_full_cnt,
|
||||
&i2c1_ack_fail_cnt,
|
||||
&i2c1_miss_start_stop_cnt,
|
||||
&i2c1_arb_lost_cnt,
|
||||
|
||||
@@ -62,6 +62,7 @@ static inline void main_periodic_task( void ) {
|
||||
RunOnceEvery(256, {DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);});
|
||||
RunOnceEvery(256,
|
||||
{
|
||||
uint16_t i2c1_queue_full_cnt = i2c1.errors->queue_full_cnt;
|
||||
uint16_t i2c1_ack_fail_cnt = i2c1.errors->ack_fail_cnt;
|
||||
uint16_t i2c1_miss_start_stop_cnt = i2c1.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c1_arb_lost_cnt = i2c1.errors->arb_lost_cnt;
|
||||
@@ -73,6 +74,7 @@ static inline void main_periodic_task( void ) {
|
||||
uint32_t i2c1_last_unexpected_event = i2c1.errors->last_unexpected_event;
|
||||
const uint8_t _bus1 = 1;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c1_queue_full_cnt,
|
||||
&i2c1_ack_fail_cnt,
|
||||
&i2c1_miss_start_stop_cnt,
|
||||
&i2c1_arb_lost_cnt,
|
||||
|
||||
@@ -78,6 +78,7 @@ static inline void main_periodic_task( void ) {
|
||||
RunOnceEvery(256, {DOWNLINK_SEND_ALIVE(DefaultChannel, DefaultDevice, 16, MD5SUM);});
|
||||
RunOnceEvery(256,
|
||||
{
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -89,6 +90,7 @@ static inline void main_periodic_task( void ) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
|
||||
@@ -159,6 +159,7 @@ static inline void main_report(void) {
|
||||
},
|
||||
{
|
||||
#ifdef USE_I2C2
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -170,6 +171,7 @@ static inline void main_report(void) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
|
||||
@@ -80,6 +80,7 @@ static inline void main_periodic_task( void ) {
|
||||
});
|
||||
#ifdef USE_I2C2
|
||||
RunOnceEvery(111, {
|
||||
uint16_t i2c2_queue_full_cnt = i2c2.errors->queue_full_cnt;
|
||||
uint16_t i2c2_ack_fail_cnt = i2c2.errors->ack_fail_cnt;
|
||||
uint16_t i2c2_miss_start_stop_cnt = i2c2.errors->miss_start_stop_cnt;
|
||||
uint16_t i2c2_arb_lost_cnt = i2c2.errors->arb_lost_cnt;
|
||||
@@ -91,6 +92,7 @@ static inline void main_periodic_task( void ) {
|
||||
uint32_t i2c2_last_unexpected_event = i2c2.errors->last_unexpected_event;
|
||||
const uint8_t _bus2 = 2;
|
||||
DOWNLINK_SEND_I2C_ERRORS(DefaultChannel, DefaultDevice,
|
||||
&i2c2_queue_full_cnt,
|
||||
&i2c2_ack_fail_cnt,
|
||||
&i2c2_miss_start_stop_cnt,
|
||||
&i2c2_arb_lost_cnt,
|
||||
|
||||
Reference in New Issue
Block a user