[riot-notifications] [RIOT-OS/RIOT] usbus: Add automated test (#12267)

Martine Lenders notifications at github.com
Tue Sep 17 22:45:52 CEST 2019


miri64 commented on this pull request.



> +USEMODULE += embunit
+USEMODULE += usbus
+FEATURES_PROVIDED += periph_usbdev
+
+# USB device vendor and product ID
+# pid.codes test VID/PID, not globally unique
+USB_VID ?= 1209
+USB_PID ?= 0001
+
+CFLAGS += -DUSB_CONFIG_VID=0x$(USB_VID) -DUSB_CONFIG_PID=0x$(USB_PID)
+
+include $(RIOTBASE)/Makefile.include
+
+.PHONY: usb_id_check
+usb_id_check:
+	@if [ $(USB_VID) = $(DEFAULT_VID) -o $(USB_PID) = $(DEFAULT_PID) ] ; then \

`-o` is a bash-ism (and Murdock complains about it.
```suggestion
	@if [ $(USB_VID) = $(DEFAULT_VID) ] || [ $(USB_PID) = $(DEFAULT_PID) ] ; then \
```

> +
+/**
+ * @brief Test control request phases
+ */
+typedef enum {
+    TEST_REQ_PHASE_IDLE,
+    TEST_REQ_PHASE_START_GET,
+    TEST_REQ_PHASE_START_SET,
+    TEST_REQ_PHASE_OUTDATA,
+    TEST_REQ_PHASE_INDATA,
+    TEST_REQ_PHASE_OUTACK,
+    TEST_REQ_PHASE_INACK,
+} test_req_phase_t;
+
+testphase_t phase = TESTPHASE_START;
+test_req_phase_t req_phase = TESTPHASE_START;

```suggestion
test_req_phase_t req_phase = TEST_REQ_PHASE_IDLE;
```
?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12267#pullrequestreview-289535428
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/6dc6c031/attachment.htm>


More information about the notifications mailing list