Go to file
Russ Butler 2c4686f468 Update USBDevice endpoint checks to fix asserts
Only assert if disabled endpoints are used when USBDevice is
configured. USBDevice can leave the configured state due to a
reset at any time, which disables all endpoints. Because this
can happen at any time, thread processing could be performing
any endpoint operation. The endpoint operation should return
failure and do nothing in this case, rather than asserting
as this is not an application error.

An assert should only be triggered when an invalid endpoint is
used after the use of USBDevice acknoledges the switch to
configured mode by complete_set_configuration.

In specific this PR fixes the assert caused with the following
sequence:

-ISR: OUT event sent
-ISR: USB reset event
-ISR: USB configure request start
-Thread: OUT event processed on thread and next read starts
        ***endpoint is used while disabled causing an invalid assert***
-Thread: reset event processed
-Thread: configure event processed

This patch fixes this problem by making the following changes:
1. Operations done on disabled endpoints only assert when in the configured state
2. Adding and removing endpoints is only allowed when
    the flag _endpoint_add_remove_allowed is set
3. The flag _endpoint_add_remove_allowed is set on the set
    configuration request and cleared if the request is aborted  or
    fails
2019-01-29 12:27:28 -06:00
.github Fix links to documentation on https://os.mbed.com 2019-01-21 14:56:40 -08:00
TESTS Fix various USB warnings 2019-01-29 12:27:28 -06:00
TEST_APPS Update TEST_APPS to add KW41Z for nanostack tests 2019-01-09 07:43:41 -06:00
UNITTESTS Merge pull request #9392 from michalpasztamobica/tlssocket_documentation_update 2019-01-23 14:20:43 +01:00
cmsis CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets 2019-01-10 18:06:56 +02:00
components Merge pull request #9484 from offirko/offir_test_fopen_fixes 2019-01-24 13:28:33 -06:00
docs Clarify addition to CONFIGURATION.md 2019-01-16 17:20:29 -06:00
drivers Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue) 2019-01-24 08:22:24 +01:00
events Edit README.md 2019-01-09 05:08:55 -06:00
features Merge pull request #9499 from bridadan/remove_yotta_modules 2019-01-28 10:37:30 -06:00
hal Move USBPhy and related files to USB directory 2019-01-29 12:27:23 -06:00
platform Move USBPhy and related files to USB directory 2019-01-29 12:27:23 -06:00
rtos CMSIS/RTX: Pre-processor defines used for assembly 2019-01-18 17:39:43 -06:00
targets Create HAL_PCD_EP_Abort 2019-01-29 12:27:27 -06:00
tools Remove mbed 2 USB tests from Travis 2019-01-29 12:27:21 -06:00
usb/device Update USBDevice endpoint checks to fix asserts 2019-01-29 12:27:28 -06:00
.astyleignore astyleignore: add nanostack targets folder 2018-11-15 07:20:10 +00:00
.astylerc AStyle: fix indentation for longer lines 2018-05-24 14:15:52 +01:00
.coveragerc Exclude libraries and tests from coverage numbers 2017-09-25 11:51:31 -05:00
.gitattributes Added .gitattributes for automatic LF line ending conversion 2013-08-08 13:19:34 +03:00
.gitignore PSA SPM 2018-11-27 09:16:35 +02:00
.pylintrc Add pylint configuration file 2016-08-16 11:48:45 -05:00
.travis.yml Remove the USB directory from mbed 2 travis 2019-01-29 12:27:23 -06:00
CONTRIBUTING.md Fix links to documentation on https://os.mbed.com 2019-01-21 14:56:40 -08:00
DOXYGEN_FRONTPAGE.md Very minimal text 2016-08-04 14:09:59 +01:00
Jenkinsfile Updated file comment 2018-08-20 12:31:40 +03:00
LICENSE Add Apache v2 LICENSE file 2013-08-06 12:05:04 +01:00
README.md Edits in README.md 2018-11-06 13:47:11 -06:00
doxyfile_options Cellular: Remove non-API folders from Doxygen 2019-01-21 11:43:49 +02:00
doxygen_options.json Fix PSA-SPM Documentation 2018-11-28 12:17:36 +02:00
logo.png Readme updates for style and branding 2017-12-04 14:59:16 -06:00
mbed.h Rename lock functions and classes 2018-11-27 09:29:32 +00:00
requirements.txt Add pyusb to requirements 2019-01-29 12:27:24 -06:00

README.md

Mbed OS

Build status release Build status master Tools coverage status PR progress

Arm Mbed OS is an open source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you need to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS and drivers for sensors and I/O devices.

Mbed OS provides a platform that includes:

  • Security foundations.
  • Cloud management services.
  • Drivers for sensors, I/O devices and connectivity.

Release notes

The release notes detail the current release. You can also find information about previous versions.

License and contributions

The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more info.

This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide

Getting started for developers

We have a developer website for asking questions, engaging with others, finding information on boards and components, using an online IDE and compiler, reading the documentation and learning about what's new and what's coming next in Mbed OS.

Getting started for contributors

We also have a contributing and publishing guide that covers licensing, contributor agreements and style guidelines.

Documentation

For more information about Mbed OS, please see our published documentation. It includes Doxygen for our APIs, step-by-step tutorials, porting information and background reference materials about our architecture and tools.

To contribute to this documentation, please see the mbed-os-5-docs repository.