Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USBUS: Initial work towards an USB stack #10916

Merged
merged 3 commits into from
Jun 5, 2019
Merged

Conversation

bergzand
Copy link
Member

@bergzand bergzand commented Jan 31, 2019

Contribution description

USBUS (Universal Serial Bus Unified Stack) is a generic USB stack specific for RIOT-os. It is a newly written USB stack making use of the usbdev module proposed in #9830. The idea is to have a single message/event based thread handling all the usb work.

Modularity is achieved by allowing different endpoint modules to register themselves with their specific settings. On startup, each module requiring USB endpoints have to request endpoints from USBUS and add a callback for handling the messages. Examples of modules that could be created are: USB CDC ACM (serial over USB), USB HID (sensors over USB) and USB CDC EEM (ethernet over USB).

Testing procedure

Run the examples/usbus_minimal on a samr21-xpro board. Plugging in the second (TARGET USB) in an USB host device (your desktop) should cause it to show up in the usb device listing with something like:

% lsusb  -d 046d:5678 -v

Bus 003 Device 018: ID 046d:5678 Logitech, Inc. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0x5678 
  bcdDevice            0.00
  iManufacturer           3 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength            9
    bNumInterfaces          0
    bConfigurationValue     1
    iConfiguration          1 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA

(I'm fully aware that I'm stealing one of the Logitech vendor codes, It's on my todo for #9830 to change it to something else).

Issues/PRs references

depends on #10915 and #9830

image

Todo:

@bergzand bergzand added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Jan 31, 2019
@bergzand bergzand requested a review from dylad January 31, 2019 22:07
@dylad
Copy link
Member

dylad commented Feb 1, 2019

@bergzand I'll have a look this week-end or next week.
I don't see any examples/usbus_minimal with this PR. Is this missing or will it come in a followup PR ?

@bergzand
Copy link
Member Author

bergzand commented Feb 1, 2019

I don't see any examples/usbus_minimal with this PR. Is this missing or will it come in a followup PR ?

Must have forgotten to commit/push this, thanks for notifying me

usbus->addr = 0;
usbus->setup_state = USBUS_SETUPRQ_READY;
usbus->dev->driver->set(usbus->dev, USBOPT_ADDRESS, &usbus->addr, sizeof(uint8_t));
puts("Reset");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, maybe something like usbus: event reset
Also why do you use puts() and not the DEBUG() function ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of lazy probably, sorry :(

usbdev_ep_ready(ep, 0);
}
res = sizeof(usbopt_enable_t);
res = sizeof(usbopt_enable_t);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fixing this in #10915

*/

/**
* @defgroup sys_uuid RFC 4122 compliant UUID's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error?

unsigned ep_num = bitarithm_lsb(USB->DEVICE.EPINTSMRY.reg);
UsbDeviceEndpoint *ep_reg = &USB->DEVICE.DeviceEndpoint[ep_num];
if (_ep_in_flags_set(ep_reg)) {
usbdev_ep_t *ep = &endpoints[_get_ep_num(ep_num, USB_EP_DIR_IN)];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use _get_ep() ?

.content = { .ptr = usbdev } };

if (msg_send(&msg, usbus->pid) <= 0) {
puts("usbus: possibly lost interrupt.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd seriously consider using thread flags for this. You'd disable this failure case entirely, thread flags cannot get lost.

An arriving message also sets a thread flag, so a thread can wait for both:

thread_flag_t flags = thread_flag_wait_any(0xffff);
if (flags & THREAD_FLAG_MSG_WAITING) {
  msg_t msg
  while (msg_try_receive(&msg) == 1) {
     // handle netapi messages
  }
}
  if (flags & YOUR_FLAG_SET_BY_ISR) {
    /// handle
  }
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand if you'd rather not go into this for now, can be changed later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually one of the issues where I'd really would like to have some feedback on. I've used messages here because it's what I'm most familiar with from gnrc, but using thread flags or events are both open to suggestions for me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some out-of-band discussion it became clear that it should be easy to move to thread flags with a flag for the generic usbdev ISR and a flag for endpoint specific ISR's. A uint32_t can keep track of the endpoints that require servicing (USB has 32 endpoints max, 16 IN and 16 OUT). This has as a consequence that usbus needs fast access to the usbdev endpoints, preferably O(1) complexity to resolve the thread flag back to an endpoint.

One solution here is to allocate the usbus_endpoint_t (not to be confused with usbdev_ep_t) as a static array. This could then reuse the USBDEV_NUM_ENDPOINTS, matching the number of endpoints allocated by the peripheral.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaspar030 I rewrote the loop to use thread flags. 2 flags are used as described above. Additionally I've added handling for events to allow signalling events to usb functionality from outside or inside the usbus thread.

Copy link
Contributor

@keestux keestux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few more comments. I hope to spend more time in the next days.


static bool usb_enable_syncing(void)
{
if (USB->DEVICE.SYNCBUSY.reg & USB_SYNCBUSY_ENABLE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I like the .bit notation easier to read.

if (USB->DEVICE.SYNCBUSY.bit.ENABLE) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed in #10915


static bool usb_swrst_syncing(void)
{
if (USB->DEVICE.SYNCBUSY.reg & USB_SYNCBUSY_SWRST) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (USB->DEVICE.SYNCBUSY.bit.SWRST) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed in #10915

GCLK_CLKCTRL_GEN_GCLK0 |
(GCLK_CLKCTRL_ID(USB_GCLK_ID)));
#elif defined(CPU_FAM_SAML21)
MCLK->AHBMASK.reg |= (MCLK_AHBMASK_USB);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the parenthesis?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy probably, removed

static inline void poweroff(void)
{
#if defined(CPU_FAM_SAMD21)
PM->AHBMASK.reg |= PM_AHBMASK_USB;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be clearing the bit. And also the APBBMASK is missing here. (Besides, the poweroff function is not used)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, let me check this one later, completely messed the function up


void usb_attach(void)
{
/* Datasheet is not clear whether device starts detached */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not belong here. This function is simply doing what it's been told to do.
BTW. I don't have a direct answer, but ASF usb init and Arduino bootloader do an attach. So I guess it is detached when the device starts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This served as a reminder for myself to check this. As you said, this doesn't belong here, I'm removing it.

@bergzand
Copy link
Member Author

bergzand commented Feb 2, 2019

rebased to the current #10915

@dylad
Copy link
Member

dylad commented Feb 2, 2019

@bergzand examples/usbus_minimal doesn't build.

/home/dylad/software/RIOT/examples/usbus_minimal/bin/arduino-zero/usbus.a(usbus.o): In function `usbus_init':
/home/dylad/software/RIOT/sys/usb/usbus/usbus.c:76: undefined reference to `driver'
collect2: error: ld returned 1 exit status

@dylad
Copy link
Member

dylad commented Feb 2, 2019

@bergzand nvm, I miss the

ifneq (,$(filter usbdev,$(USEMODULE)))
  USEMODULE += sam_usb
endif

I was able to successfully test it on arduino-zero.

@keestux
Copy link
Contributor

keestux commented Feb 2, 2019

Not much luck with my SODAQ board, which are almost the same as Arduino Zero.
I'v added the USEMODULE += sam_usb in the boards Makefile and enabled debug in usb.c and usbus.c

main(): This is RIOT! (Version: 2018.10-devel-527-gaf3ff6-rapper.fritz.box-usb-sodaq-one)
RIOT USB stack example application
usbus: starting thread 3
usbus: Adding string descriptor number 1 for: "USB config"
usbus: Adding string descriptor number 2 for: "USB device"
usbus: Adding string descriptor number 3 for: "RIOT-os.org"
Reset
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
Unhandled out 0: 0
Reset
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
Setting addres 35
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep0: possibly lost interrupt.
usbus_ep: pid: 3
usbus_ep: pid: 3
usbus_ep: pid: 3
Unhandled in 0: 8
Unhandled in 0: 8
Unhandled in 0: 8
Unhandled in 0: 8
Unhandled in 0: 8
Unhandled in 0: 8

@keestux
Copy link
Contributor

keestux commented Feb 2, 2019

On the other hand, maybe I'm expecting too much at this point. What I do get is:

# lsusb -d 046d:5678 -v

Bus 001 Device 041: ID 046d:5678 Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0x5678 
  bcdDevice            0.00
  iManufacturer           3 (error)
  iProduct                2 (error)
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength            9
    bNumInterfaces          0
    bConfigurationValue     1
    iConfiguration          1 (error)
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
Device Status:     0x9cd0
  (Bus Powered)
  Debug Mode

@bergzand
Copy link
Member Author

bergzand commented Feb 2, 2019

@keestux Did you try with debugging disabled? My experience with running with debug logging is that the delays caused by the serial transfer are enough to cause timing issues with USB.

It is still on my todo list to figure out how much debugging can be enabled without causing issues

@keestux
Copy link
Contributor

keestux commented Feb 3, 2019

@bergzand I think you're right. Without debug lsusb shows

# lsusb -d 046d:5678 -v

Bus 001 Device 043: ID 046d:5678 Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0x5678 
  bcdDevice            0.00
  iManufacturer           3 RIOT-os.org
  iProduct                2 USB device
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength            9
    bNumInterfaces          0
    bConfigurationValue     1
    iConfiguration          1 USB config
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
Device Status:     0x0000
  (Bus Powered)

On the RIOT device console it shows just two "Reset" messages:

main(): This is RIOT! (Version: 2018.10-devel-527-gaf3ff6-rapper.fritz.box-usb-sodaq-one)
RIOT USB stack example application
Reset
Reset

#include <stdlib.h>
#include "usb/usbdev.h"
#include "usb.h"
#include "usb/message.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "usb/message.h" could just be "message.h" because it is included from a file in the same directory

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the long form to prevent confusion for a future reader

* @brief USB peripheral device vendor ID
*/
#ifndef USB_CONFIG_VID
#define USB_CONFIG_VID (0x046d)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is just temporary using a Logitech identifier. But why not use Arduino's vendor and product id until we have our own (if that's even feasible)? I think Arduino Zero has 0x2341:0x804d

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed to ask for a free PID from here in #9830

UsbDeviceEndpoint *ep_reg = &USB->DEVICE.DeviceEndpoint[ep->num];

if (ep->dir == USB_EP_DIR_OUT) {
ep_reg->EPINTENCLR.reg = USB_DEVICE_EPINTENCLR_TRCPT0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to nitpick, but I like symmetry. The code for enable/disable IRQ is very, very similar. Don't just reorder lines, Use the same formatting (the bitwise or at the end of line or at the next line).
I like to be able to quickly visually compare the two functions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, should be fixed

res->num = 0;
}
else {
for (unsigned idx = 1; idx < 8; idx++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use magic constants. This 8, is that USBDEV_NUM_ENDPOINTS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops :-(

void usbdev_init(usbdev_t *dev)
{
/* Only one usb device on this board */
_usbdev = (sam0_common_usb_t *)dev;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an assert(!_usbdev) so that nobody can get away with calling the function twice.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked this to not have a hard dependency on the sam0_common_usb_t struct

else {
usb_descriptor_string_t desc;
desc.type = USB_TYPE_DESCRIPTOR_STRING;
mutex_lock(&usbus->lock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would help the reader to know what the lock is protection...
Otherwise one might ask why there is no lock in the section above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These locks originate from the idea to have multiple threads interacting with the stack. I don't think that this was a very good idea, so for now it is one single thread and it should be possible to remove most if not all of these locks.

usbus_ep0_ready(usbus);
}
else {
usbus_ep0_ready(usbus);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing has been "put". Is this OK then? To do usbus_ep0_ready?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. Some times you just want to notify things without send any data.

return pkt->length > usbus->in->len ? usbus->in->len : pkt->length;
}

void recv_setup(usbus_t *usbus, usbdev_ep_t *ep)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably know better than I, do we have a function naming convention? I mean, since C has a single name space, there could easily arise a name conflict with functions named like this.
If this becomes a static function then there is no problem, of course.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably also be static

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a function naming convention?

Yes, public (non-static) functions should be called module_function() (e.g., usbus_recv_setup()). static functions should start with underline (static void _recv_setup(void)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marked almost all these functions as static, please let me know if I missed one

usbus->state = USBUS_STATE_RESET;
usbus->addr = 0;
usbus->setup_state = USBUS_SETUPRQ_READY;
usbus->dev->driver->set(usbus->dev, USBOPT_ADDRESS, &usbus->addr, sizeof(uint8_t));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the sizeof correct? I'm asking because usbus->addr is a uint16_t.
And if your answer is no, then I would strongly suggest to change it to sizeof(usbus->addr)
And if your answer is yes, you should realize you have an endianess problem.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it is breaking anything at the moment, but usbus->addr should be uint8_t 😕

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the addr should be uint8_t, it is safer to program this as sizeof(usbus->addr).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed

}
break;
case USBDEV_EVENT_TR_FAIL:
if (ep->dir == USB_EP_DIR_OUT) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add TODO marker? That is, if something needs to be done here. Otherwise drop the if

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bergzand bergzand force-pushed the pr/usb/usbus branch 2 times, most recently from 9e1a286 to 0ba41cc Compare February 13, 2019 18:13
@bergzand
Copy link
Member Author

rebased and reworked for the changes in #10915 and #9830.

Added some documentation (Always needs more docs, but maybe later). renamed and moved around some functions, mainly the usbus_control functions. Added a lot of static

@bergzand
Copy link
Member Author

No longer WIP btw

@bergzand bergzand removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Feb 13, 2019
void usbus_init(usbus_t *usbus, usbdev_t *usbdev)
{
/* TODO: Check if memset works/is necessary */
memset(usbus, 0, sizeof(usbus));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be sizeof(*usbus) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Noticed it after I rebased and pushed everything 😢

Fixed

@keestux
Copy link
Contributor

keestux commented Feb 13, 2019

Is this the right place for this?

main(): This is RIOT! (Version: 2018.10-devel-544-g6bceee-rapper.fritz.box-usb-sodaq-one)
RIOT USB stack example application
All up, running the shell now
> 0x3797
*** RIOT kernel panic:
FAILED ASSERTION.

*** halted.

@bergzand
Copy link
Member Author

Is this the right place for this?

Sure, no worries. If possible next time please add CFLAGS += -DDEBUG_ASSERT_VERBOSE to the makefile, then the line number where the assert failure occured is printed.

I must have forgotten to actually commit and push the change that modified the usbus::addr member to an uint8_t, thus causing an assertion failure in the usbdev peripheral.

@keestux
Copy link
Contributor

keestux commented Feb 13, 2019

Yes, much better now

@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

And rebased

@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

@kaspar030 Do you have any inspiration on how to fix the build failure? To be honest I really don't want to hardcode the pid.codes test PID in the example.

@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

Now depends on #11633 :'(

@dylad
Copy link
Member

dylad commented Jun 5, 2019

Please squash and rebase

@dylad dylad added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines labels Jun 5, 2019
@bergzand bergzand force-pushed the pr/usb/usbus branch 2 times, most recently from 061fa18 to 3d30886 Compare June 5, 2019 12:22
@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

Please squash and rebase

Done!

@dylad dylad added the Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines label Jun 5, 2019
Copy link
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last minute error spotted.

@dylad
Copy link
Member

dylad commented Jun 5, 2019

For the record:
log from lsusb -vvv shows that VID/PID are inverted

Bus 001 Device 066: ID 0001:1209 Fry's Electronics 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0001 Fry's Electronics
  idProduct          0x1209 
  bcdDevice            0.00
  iManufacturer           3 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength            9
    bNumInterfaces          0
    bConfigurationValue     1
    iConfiguration          1 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA

@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

log from lsusb -vvv shows that VID/PID are inverted

Aaah, thanks for testing, I switched around the VID/PID in the Makefile. Should be fixed now

Copy link
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE-ACK
Retested lastest changes. We're all good.

@dylad dylad added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Jun 5, 2019
@dylad
Copy link
Member

dylad commented Jun 5, 2019

Here we go !
Awesome job from @bergzand there ! You definitely deserve a medal :)

@dylad dylad merged commit e98376c into RIOT-OS:master Jun 5, 2019
@bergzand
Copy link
Member Author

bergzand commented Jun 5, 2019

🎉

@dylad, @keestux and @kaspar030 Thanks for reviewing!

@emmanuelsearch
Copy link
Member

@bergzand yay!

@kaspar030
Copy link
Contributor

@bergzand niiiice!

@brookstalley
Copy link

@bergzand thank you so much. I have been checking this thread every morning the way some people check the lottery numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: USB Area: Universal Serial Bus CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants