Added compile flag to replace TF with simple loopback for transport testing

sipo
Ondřej Hruška 7 years ago
parent 04e32860f7
commit a63f040271
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 6
      gex.mk
  2. 17
      tasks/task_msg.c

@ -115,5 +115,9 @@ GEX_SRC_DIR += \
endif
ifeq '$(DISABLE_TEST_UNIT)' '1'
GEX_CDEFS += -DDISABLE_TEST_UNIT
GEX_CDEFS += -DDISABLE_TEST_UNIT=1
endif
ifeq '$(CDC_LOOPBACK_TEST)' '1'
GEX_CDEFS += -DCDC_LOOPBACK_TEST=1
endif

@ -83,14 +83,19 @@ void TaskMsgJob(const void *argument)
}
else {
assert_param(slot.msg.len > 0 && slot.msg.len <= MSG_QUE_SLOT_SIZE); // check the len is within bounds
TF_Accept(comm, slot.msg.data, slot.msg.len);
#if CDC_LOOPBACK_TEST
TF_WriteImpl(comm, slot.msg.data, slot.msg.len);
#else
TF_Accept(comm, slot.msg.data, slot.msg.len);
#endif
}
#if USE_STACK_MONITOR
uint32_t count;
count = (uint32_t) uxQueueMessagesWaiting(queMsgJobHandle)+1;
msgQueHighWaterMark = MAX(msgQueHighWaterMark, count);
#endif
#if USE_STACK_MONITOR
uint32_t count;
count = (uint32_t) uxQueueMessagesWaiting(queMsgJobHandle)+1;
msgQueHighWaterMark = MAX(msgQueHighWaterMark, count);
#endif
}
}

Loading…
Cancel
Save