-
Notifications
You must be signed in to change notification settings - Fork 3k
Bare metal profile: Enable USB serial greentea test #12917
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
Conversation
1933884 to
7940403
Compare
|
Don't feel qualified to comment on this one. Is it legal to make those USB calls from IRQ context (the |
|
I also wonder if |
Normal event queue creates the event queue, but no dispatch handler. Dispatch handler required to handle the queue events and by default dispatch(-1) call will dispatch events indefinitely so we can't call that API from the main thread as it is blocked with USB receive. |
54931ab to
2feb112
Compare
TESTS/usb_device/serial/main.cpp
Outdated
| line_coding_t lc = {0}; | ||
| lc.baud = baud; | ||
| lc.bits = bits; | ||
| lc.parity = parity; | ||
| lc.stop = stop; | ||
| lc_data.push(lc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line_coding_t lc = {
.baud = baud,
.bits = bits,
.parity = parity,
.stop = stop
};
lc_data.push(lc);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hugueskamba Done. Please review
TESTS/usb_device/serial/main.cpp
Outdated
| void line_coding_changed_cb(int baud, int bits, int parity, int stop) | ||
| { | ||
| #if defined(MBED_CONF_RTOS_PRESENT) | ||
| line_coding_t *lc = lc_mail.alloc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any advantage to keeping the RTOS implementation around? The CircularBuffer implementation should be able to handle both cases right? If so you could remove this.
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
77f5b47 to
15dd18a
Compare
|
CI restarted |
Test run: SUCCESSSummary: 4 of 4 test jobs passed |
Summary of changes
Modified the USB serial tests that used thread and mailbox APIs to call ticker and circular buffer instead so they can run with the bare metal profile.
Impact of changes
With these changes, USB serial greentea test builds and runs successfully.
Migration actions required
None.
Documentation
None.
Pull request type
Test results
Reviewers
@evedon @fkjagodzinski @c1728p9