forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add bus, port_numbers and speed to USB devices. Allows for differentiating identical devices. * Autodetect display and adjust if widescreen * Enable I2S DAC via its reset pin * Show keyboard emoji in status bar. (Only works over serial connection now. Built in font doesn't have the emoji.)
- Loading branch information
Showing
23 changed files
with
319 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Pico-PIO-USB
updated
10 files
+1 −1 | examples/test_ll/test_ll.c | |
+99 −76 | src/pio_usb.c | |
+4 −4 | src/pio_usb_device.c | |
+36 −11 | src/pio_usb_host.c | |
+16 −4 | src/pio_usb_ll.h | |
+2 −0 | src/usb_definitions.h | |
+4 −4 | src/usb_rx.pio | |
+5 −5 | src/usb_rx.pio.h | |
+6 −6 | src/usb_tx.pio | |
+2 −0 | src/usb_tx.pio.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// This file is part of the CircuitPython project: https://circuitpython.org | ||
// | ||
// SPDX-FileCopyrightText: Copyright (c) 2022 Scott Shawcroft for Adafruit Industries | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
#include <stdarg.h> | ||
#include <string.h> | ||
|
||
#include "py/obj.h" | ||
#include "py/objexcept.h" | ||
#include "py/misc.h" | ||
#include "py/mphal.h" | ||
#include "py/runtime.h" | ||
|
||
#include "shared-bindings/usb/util/__init__.h" | ||
|
||
//| """USB Util | ||
//| | ||
//| This is a subset of the PyUSB util module. | ||
//| """ | ||
//| | ||
//| SPEED_LOW: int = ... | ||
//| """A low speed, 1.5 Mbit/s device.""" | ||
//| | ||
//| SPEED_FULL: int = ... | ||
//| """A full speed, 12 Mbit/s device.""" | ||
//| | ||
//| SPEED_HIGH: int = ... | ||
//| """A high speed, 480 Mbit/s device.""" | ||
//| | ||
|
||
static mp_rom_map_elem_t usb_util_module_globals_table[] = { | ||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_usb_dot_util) }, | ||
// Speed constants | ||
{ MP_ROM_QSTR(MP_QSTR_SPEED_LOW), MP_OBJ_NEW_SMALL_INT(PYUSB_SPEED_LOW) }, | ||
{ MP_ROM_QSTR(MP_QSTR_SPEED_FULL), MP_OBJ_NEW_SMALL_INT(PYUSB_SPEED_FULL) }, | ||
{ MP_ROM_QSTR(MP_QSTR_SPEED_HIGH), MP_OBJ_NEW_SMALL_INT(PYUSB_SPEED_HIGH) }, | ||
}; | ||
|
||
static MP_DEFINE_CONST_DICT(usb_util_module_globals, usb_util_module_globals_table); | ||
|
||
const mp_obj_module_t usb_util_module = { | ||
.base = { &mp_type_module }, | ||
.globals = (mp_obj_dict_t *)&usb_util_module_globals, | ||
}; | ||
|
||
MP_REGISTER_MODULE(MP_QSTR_usb_dot_util, usb_util_module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// This file is part of the CircuitPython project: https://circuitpython.org | ||
// | ||
// SPDX-FileCopyrightText: Copyright (c) 2022 Scott Shawcroft for Adafruit Industries | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
#pragma once | ||
|
||
#include <stdbool.h> | ||
|
||
#include "py/obj.h" | ||
|
||
extern const mp_obj_module_t usb_util_module; | ||
|
||
#define PYUSB_SPEED_LOW 1 | ||
#define PYUSB_SPEED_FULL 2 | ||
#define PYUSB_SPEED_HIGH 3 |
Oops, something went wrong.