diff options
| author | Blake Felt <blake.w.felt@gmail.com> | 2022-09-17 20:34:09 -0600 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-11-11 16:33:30 +1100 |
| commit | eed4eb2645aa3975ef822f4b34110730811690b7 (patch) | |
| tree | 176a4ad6645b2190cb5d1d3698e256c0909d2406 /shared/tinyusb/usbd.h | |
| parent | a513558e3a72b47880faa847de64949e7fc746f6 (diff) | |
shared/tinyusb: Create common TinyUSB code for reuse by ports.
This code originates from the rp2 port, and the rp2 port has been updated
to use this common code.
Diffstat (limited to 'shared/tinyusb/usbd.h')
| -rw-r--r-- | shared/tinyusb/usbd.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/shared/tinyusb/usbd.h b/shared/tinyusb/usbd.h new file mode 100644 index 000000000..9c450fb55 --- /dev/null +++ b/shared/tinyusb/usbd.h @@ -0,0 +1,41 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 Blake W. Felt + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_TINYUSB_USBD_H +#define MICROPY_INCLUDED_SHARED_TINYUSB_USBD_H + +#include "py/obj.h" + +// defined externally (needed per port) + +int usbd_serialnumber(uint8_t *buf); + +// external use + +void usbd_reset_all(void); +void usbd_reset_descriptor(void); + +#endif // MICROPY_INCLUDED_SHARED_TINYUSB_USBD_H |
