Compare commits

...

31 Commits
main ... 7.3.x

Author SHA1 Message Date
Dan Halbert
ac1e660519
Merge pull request #6845 from dhalbert/7.3.x-remove-pewpew13-6844
Remove pewpew13 board, which was a long-ago typo and does not exist
2022-08-30 10:57:24 -04:00
Dan Halbert
93d917e48e Remove pewpew13 board, which was a long-ago typo and does not exist 2022-08-30 07:49:53 -04:00
Dan Halbert
a325ba181a
Merge pull request #6835 from dhalbert/7.3.x-backport-6834
7.3.x backport 6834
2022-08-29 10:23:21 -04:00
root
14b72519f7 Make pulsein object long-lived 2022-08-28 19:17:20 -04:00
root
ffcc7bda33 Make Pulsein long-lived 2022-08-28 19:17:07 -04:00
Dan Halbert
7a471406c3
Merge pull request #6818 from maximkulkin/7.3.x-usb-hid-get-last-report-doc
shared-bindings/usb_hid: Fix docs for Device.get_last_received_report()
2022-08-25 19:57:41 -04:00
Dan Halbert
fdda9c0176
Merge pull request #6816 from dhalbert/7.3.x-6798-backport
7.3.x #6798 backport (zero-length pulse Pulseout fix
2022-08-25 17:01:31 -04:00
Dan Halbert
0a29dc8e38
Merge pull request #6817 from dhalbert/7.3.x-update-frozen-2022-08-25
update frozen libraries for 7.3.3
2022-08-25 14:18:51 -04:00
Maxim Kulkin
cdf360a558 shared-bindings/usb_hid: Fix docs for Device.get_last_received_report()
Update documentation for Device.get_last_received_report() fixing
type signature and adding note on "consume" behavior.
2022-08-25 11:47:12 -04:00
Dan Halbert
7d41c6828e
Merge pull request #6809 from dhalbert/7.3.x-6779-backport
matrixportal: remove ulab instead of bleio HCI; touch up for 7.3.x merge
2022-08-25 11:33:35 -04:00
Dan Halbert
59af865b0f
Merge pull request #6800 from dhalbert/PacketBuffer-ringbuf-size
PacketBuffer ringbuf size
2022-08-25 08:35:44 -04:00
Dan Halbert
ada7b756e0 update frozen libraries 2022-08-25 08:21:17 -04:00
Dan Halbert
d13578fb4e
Merge pull request #6808 from maximkulkin/7.3.x-usb-hid-get-last-report-fix
shared-module/usb_hid: Fix behavior of Device.get_last_received_report()
2022-08-25 08:00:56 -04:00
DavePutz
e700481aed Update PulseOut.c
reorder the tests for zero-length
2022-08-25 07:54:01 -04:00
root
f9e1fc119d Fix handling of zero-length pulseout pulse 2022-08-25 07:54:01 -04:00
Dan Halbert
4276b06824
Merge pull request #6806 from dhalbert/7.3.x-6751-backport
Backport to 7.3.x of 6751: Don't reload or enter repl when autoreloading
2022-08-25 07:36:45 -04:00
Dan Halbert
5a046a9f47
Merge pull request #6803 from dhalbert/7.3.x-6659-backport
Backport #6659 (macOS CI updates)
2022-08-25 07:36:06 -04:00
Dan Halbert
5bab100486 matrixportal: remove ulab instead of bleio HCI; touch up for 7.3.x merge 2022-08-24 17:52:21 -04:00
Maxim Kulkin
429c7220c2 shared-module/usb_hid: Fix behavior of Device.get_last_received_report()
Documentation states that get_last_received_report() function should
return None if there was no report received previously, otherwise it
should return report. Moreover, same report should be returned only
once. That makes it possible to reliably process incoming OUT/Feature
reports.

This patch adds an array that stores flags if report with particular
ID was received and updates get_last_received_report() to match its
documentation.
2022-08-24 17:49:53 -04:00
Scott Shawcroft
0d88f8472f Don't reload or enter repl when autoreloading
A keypress while we waited for autoreload used to enter repl. Now
it won't.

Fixes #6480
2022-08-24 17:45:56 -04:00
Dan Halbert
342d5514a8 don't specify -sdk in Makefile.m1 for mpy-cross 2022-08-24 12:57:07 -04:00
Dan Halbert
3d91aacf00 don't need to select macOS sdk any more 2022-08-24 12:56:59 -04:00
Dan Halbert
30ac9a4afc update mpy-cross macOS build to macos 11; make macos mpy-cross names consistent 2022-08-24 12:56:51 -04:00
Dan Halbert
cf1d0e5e8f Make PacketBuffer ringbuf be correct size 2022-08-23 19:40:50 -04:00
Dan Halbert
4a5790bb00
Merge pull request #6619 from dhalbert/7.3.x-update-frozen
update frozen libs for 7.3.2
2022-07-20 11:49:57 -04:00
Dan Halbert
477f46f1c5 update frozen libs for 7.3.2 2022-07-19 12:49:32 -04:00
Scott Shawcroft
07b74d04df
Merge pull request #6587 from xuhow/elecfreaks_picoed@7.3.x
Update elecfreaks_picoed for version 7.3.x
2022-07-13 10:31:40 -07:00
Xu Hao
d510b4fc8e Update circuitpython_picoed submodule 2022-07-13 18:33:40 +08:00
Xu Hao
6c8bbb8c9e Set MICROPY_HW_LED_STATUS pin to the elecfreaks_picoed 2022-07-13 18:32:56 +08:00
Xu Hao
db87838b05 Update Adafruit_CircuitPython_IS31FL3731 submodule 2022-07-13 18:31:40 +08:00
Xu Hao
c34ed1336a Add some frozen libraries to elecfreaks_picoed 2022-07-13 18:29:21 +08:00
55 changed files with 100 additions and 59 deletions

View File

@ -143,7 +143,7 @@ jobs:
mpy-cross-mac:
runs-on: macos-10.15
runs-on: macos-11
steps:
- name: Dump GitHub context
env:
@ -176,27 +176,25 @@ jobs:
run: make -C mpy-cross -j2
- uses: actions/upload-artifact@v2
with:
name: mpy-cross-macos-catalina
name: mpy-cross-macos-11-x64
path: mpy-cross/mpy-cross
- name: Select SDK for M1 build
run: sudo xcode-select -switch /Applications/Xcode_12.3.app
- name: Build mpy-cross (arm64)
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
- uses: actions/upload-artifact@v2
with:
name: mpy-cross-macos-bigsur-arm64
name: mpy-cross-macos-11-arm64
path: mpy-cross/mpy-cross-arm64
- name: Make universal binary
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
run: lipo -create -output mpy-cross-macos-11-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
- uses: actions/upload-artifact@v2
with:
name: mpy-cross-macos-universal
path: mpy-cross-macos-universal
name: mpy-cross-macos-11-universal
path: mpy-cross-macos-11-universal
- name: Upload mpy-cross build to S3
run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-universal-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-bigsur-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-universal --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-x64 --no-progress --region us-east-1
env:
AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

15
.gitmodules vendored
View File

@ -289,3 +289,18 @@
[submodule "frozen/pew-pewpew-lcd"]
path = frozen/pew-pewpew-lcd
url = https://github.com/pypewpew/pew-pewpew-lcd.git
[submodule "frozen/Adafruit_CircuitPython_IS31FL3731"]
path = frozen/Adafruit_CircuitPython_IS31FL3731
url = https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731.git
[submodule "frozen/Adafruit_CircuitPython_Ticks"]
path = frozen/Adafruit_CircuitPython_Ticks
url = https://github.com/adafruit/Adafruit_CircuitPython_Ticks.git
[submodule "frozen/Adafruit_CircuitPython_asyncio"]
path = frozen/Adafruit_CircuitPython_asyncio
url = https://github.com/adafruit/Adafruit_CircuitPython_asyncio.git
[submodule "frozen/circuitpython_ef_music"]
path = frozen/circuitpython_ef_music
url = https://github.com/elecfreaks/circuitpython_ef_music.git
[submodule "frozen/circuitpython_picoed"]
path = frozen/circuitpython_picoed
url = https://github.com/elecfreaks/circuitpython_picoed.git

View File

@ -40,7 +40,6 @@ aliases_by_board = {
"pybadge": ["edgebadge"],
"pyportal": ["pyportal_pynt"],
"gemma_m0": ["gemma_m0_pycon2018"],
"pewpew10": ["pewpew13"],
}
aliases_brand_names = {
@ -54,8 +53,6 @@ aliases_brand_names = {
"Adafruit PyPortal Pynt",
"gemma_m0_pycon2018":
"Adafruit Gemma M0 PyCon 2018",
"pewpew13":
"PewPew 13",
}
additional_modules = {

@ -1 +1 @@
Subproject commit 13856be616eee2eb84280b7c4914951c1ddbfd36
Subproject commit 6b465bd738690d1e8df8f2bdb9abb5815011fa8e

@ -1 +1 @@
Subproject commit 7d9635ba1dda31ce45b84519c4da76ff86d0debe
Subproject commit 4533bd20ddcf678248a91bbfe5440dc5b454aa41

@ -1 +1 @@
Subproject commit e5cf8206c0173228252ae74367cab85b0531488e
Subproject commit 4816be8a60a65f9eb1b97eec93c3ffd603670af0

@ -1 +1 @@
Subproject commit 9addf6a26fef3a32c78d574c66452b6210eca5c5
Subproject commit d19bee923a626e1278c0b2d988cd47de69ba9c60

@ -1 +1 @@
Subproject commit 843def7daee741c8fb04fe21c3c7b98f22862471
Subproject commit 47f848f13f75d2f62d16407edaaf6dd0ec1fc3cc

@ -1 +1 @@
Subproject commit 0a045871d3da681d1c9c9578f09174bfc6d84f1d
Subproject commit 41dfbf1eb0f4606d012e290a17b32cff44ac12a9

@ -1 +1 @@
Subproject commit 6a429bcd0e6b22ee181197ce0477ae70f5adb80d
Subproject commit 69702dcc05a42b4f02bc5022ce4d46e04714993b

@ -1 +1 @@
Subproject commit 22931594bc52ab259eaf313d26219a507703c315
Subproject commit a2d7b056498360cbb6bb77f91b6d79f322b6289f

@ -1 +1 @@
Subproject commit d90f9e7b122aad072d59a01df524036995cf4a78
Subproject commit b4f9f4d4adc8654f7859b61c3750f7d44ce84235

@ -1 +1 @@
Subproject commit bb9cb75e15b4bfce3063a94b40dfad2375d5605e
Subproject commit 7cc372c0148906e047968c388a2d37682e23514a

@ -1 +1 @@
Subproject commit f9469d26ed9eb95d43982de88c035ac3862dd258
Subproject commit 233af4cbf9e154631b59c4515561c9a74f7269a2

@ -1 +1 @@
Subproject commit f3d504be1dc82cc4a8e4ea9b38bd5c2ce74d59ba
Subproject commit f4ffa72db17fd7c62f8a8dc6439b7c433285438b

@ -1 +1 @@
Subproject commit 2ea025b1b68b0be95a0514732d4bc623f313fd75
Subproject commit 9e9e8b70ab2934ee40d30d92b99bc9733c2bc97d

@ -1 +1 @@
Subproject commit b637c47423eb85233ba614424aadadace37fcfb1
Subproject commit 1d5e9a69acc9e8cb01f05c20d9ddb95f85e3b83d

@ -1 +1 @@
Subproject commit 47cc91474823677218239b5b37901590755cac4c
Subproject commit 4d68643dcd779e63b4eada09fa84b1ad43c83362

@ -1 +1 @@
Subproject commit a2491a806b636f66caf670527c49b864923f125c
Subproject commit 15c39d214f064a926716ce93468b4ba32954e944

@ -0,0 +1 @@
Subproject commit e4c5e7523b45ef36d22e10eb7f3cbca0f1d05ab4

@ -1 +1 @@
Subproject commit 72367f37cd221c7af7822ba3a9cd21cd3cd70292
Subproject commit 50960c97287b2f521f765df986642e040fd3a9f6

@ -1 +1 @@
Subproject commit a06c8a116e5767a8481b9018239fe729e01760a6
Subproject commit 0aedac866958881aa526874136090986976b9f59

@ -1 +1 @@
Subproject commit 5acf8a850d98789a79fe37836b2ac7b623d95913
Subproject commit 7d7cdb70317b4f21e724ac9f11d6e153964e962e

@ -1 +1 @@
Subproject commit d3f9adce6e48d37222ef171a280cfa3122faf15b
Subproject commit c6e9ab5969b287ee6c71e6631cc469ea548fb48c

@ -1 +1 @@
Subproject commit df61e7b0be9dc0c6a1bbe60f526fbdc01b6c2819
Subproject commit ca434eb0696e824d07b27e8b9a3099596f18d687

@ -1 +1 @@
Subproject commit 015eb1ccd5eb5364d8e1cf20358e7dcda9f12efc
Subproject commit a4e11ce3a7f5886c706da5778baf1dd653172c94

@ -1 +1 @@
Subproject commit a5b3f74049dfa0d39caf1c0520e46d773ba4d643
Subproject commit b163b4eb499dbe3e331926412bedf789f61374c2

@ -1 +1 @@
Subproject commit 1c39469bac98eea022af695ac42e5096dae6130c
Subproject commit 001998e17e83e4c8bfac7b72e8ec639896b92c17

@ -1 +1 @@
Subproject commit 74ea48f7a5d85591f5af804cacb57e9cfaab46c6
Subproject commit f10b4dabfd6d311758ee8bb8b9bb806fd69ffd8c

@ -1 +1 @@
Subproject commit cd1da8c9384537b886ea697d5c38c7b34f8a178a
Subproject commit adf14c8d134040609b69954391b5a213a8fe0c05

@ -1 +1 @@
Subproject commit d1e8ac7ad9dcd65ab83749db3e5c96ffee80ebb7
Subproject commit b622f06d70c1d7c4082461f167749d096d21b1f5

@ -1 +1 @@
Subproject commit 6e03832b1170d75d7a7e0b8a578160298905b726
Subproject commit 0f3017288e0eda1e9e331f9263071adc6f34d9c9

@ -1 +1 @@
Subproject commit 332143d4ca5762d2d351ceb170c0b4e37dd42793
Subproject commit 102338d8f4bcf81375796510e4df5f09866b5c33

@ -1 +1 @@
Subproject commit 995959d5dca23fbe49590700d1aa26a96dca1df7
Subproject commit a8f2c7d1bd111890a9bf5759d9e327e91f7bf1f4

@ -1 +1 @@
Subproject commit d238fe99e24ea4cdb472f1d8a9c99dd189b0aeca
Subproject commit e4f99815a9d82ba67687676ceb0af747e40e6d07

@ -1 +1 @@
Subproject commit 632655b8f5f6f62e3b4d0b6161213634e0ae74e9
Subproject commit f2c17f8b058e05800ca685c26ed0932e6e641bba

@ -1 +1 @@
Subproject commit 0c3a5ecaac0891776822556b18f79722d72a8f04
Subproject commit 2b4cbd1f69e9343306d1df7630454b60f5cd4533

@ -0,0 +1 @@
Subproject commit df0c8cb50ddc3031f5781b91854691883bb2e62b

@ -0,0 +1 @@
Subproject commit d4ac43e49b8d7e8628cd04926067e8bddfd3f0cd

@ -1 +1 @@
Subproject commit 148345d232c83133de3649fb70b471f11501b3d2
Subproject commit 0b6238b87f2faaa7012d872e886d6e6593db3765

@ -1 +1 @@
Subproject commit 3bdd335452ff14a53d1e840de043e3159cb3b829
Subproject commit 9a8338b3bdaeac9eeb5b74d147107c67db33fdac

@ -0,0 +1 @@
Subproject commit 6e8eedb1475e2b91f8dea7bceebb20e44d70b171

@ -0,0 +1 @@
Subproject commit 53f15602460329f69fef95498e6b8293aebb513a

@ -1 +1 @@
Subproject commit 837f3e5f16accae5b3677954921b5ddd517f0799
Subproject commit 6452f2a78f32cf3b5d07e699f26d25e9c4d10d09

2
main.c
View File

@ -508,7 +508,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
}
// If interrupted by keyboard, return
if (serial_connected() && serial_bytes_available()) {
if (serial_connected() && serial_bytes_available() && !autoreload_pending()) {
// Skip REPL if reload was requested.
skip_repl = serial_read() == CHAR_CTRL_D;
if (skip_repl) {

View File

@ -7,4 +7,4 @@ BUILD=build-arm64
include mpy-cross.mk
# Because mpy-cross.mk unconditionally overwrites CC for Darwin, we must set it BELOW the inclusion
CC := $(shell xcrun --sdk macosx11.1 --find clang) -isysroot $(shell xcrun --sdk macosx11.1 --show-sdk-path) -target arm64-apple-macos11
CC := $(shell xcrun --find clang) -isysroot $(shell xcrun --show-sdk-path) -target arm64-apple-macos11

View File

@ -11,13 +11,13 @@ EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ
CIRCUITPY_AESIO = 0
CIRCUITPY_ONEWIREIO = 0
CIRCUITPY_FLOPPYIO = 0
CIRCUITPY_PARALLELDISPLAY = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_SHARPDISPLAY = 0
CIRCUITPY_ZLIB=0
CIRCUITPY_ULAB = 0
# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ESP32SPI
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

View File

@ -300,7 +300,8 @@ void common_hal_bleio_packet_buffer_construct(
size_t incoming_buffer_size = 0;
uint32_t *incoming_buffer = NULL;
if (incoming) {
incoming_buffer_size = buffer_size * (sizeof(uint16_t) + max_packet_size);
// + 1 needed by ringbuf for empty/full detection.
incoming_buffer_size = buffer_size * (sizeof(uint16_t) + max_packet_size) + 1;
incoming_buffer = m_malloc(incoming_buffer_size, false);
}

View File

@ -74,6 +74,11 @@ static void pulseout_event_handler(nrf_timer_event_t event_type, void *p_context
nrfx_timer_pause(timer);
pulse_array_index++;
// Ignore a zero-length pulse
while (pulse_array_index < pulse_array_length &&
pulse_array[pulse_array_index] == 0) {
pulse_array_index++;
}
// No more pulses. Turn off output and don't restart.
if (pulse_array_index >= pulse_array_length) {

View File

@ -1,2 +1,4 @@
#define MICROPY_HW_BOARD_NAME "ELECFREAKS PICO:ED"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_LED_STATUS (&pin_GPIO25)

View File

@ -9,3 +9,11 @@ CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
CIRCUITPY__EVE = 1
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_asyncio
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IS31FL3731
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Motor
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython_ef_music
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython_picoed

View File

@ -87,7 +87,8 @@ STATIC mp_obj_t pulseio_pulsein_make_new(const mp_obj_type_t *type, size_t n_arg
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj);
pulseio_pulsein_obj_t *self = m_new_obj(pulseio_pulsein_obj_t);
// Make object long-lived to avoid moving between imports
pulseio_pulsein_obj_t *self = m_new_ll_obj(pulseio_pulsein_obj_t);
self->base.type = &pulseio_pulsein_type;
common_hal_pulseio_pulsein_construct(self, pin, args[ARG_maxlen].u_int,

View File

@ -192,10 +192,11 @@ STATIC mp_obj_t usb_hid_device_send_report(size_t n_args, const mp_obj_t *pos_ar
}
MP_DEFINE_CONST_FUN_OBJ_KW(usb_hid_device_send_report_obj, 1, usb_hid_device_send_report);
//| def get_last_received_report(self, report_id: Optional[int] = None) -> bytes:
//| def get_last_received_report(self, report_id: Optional[int] = None) -> Optional[bytes]:
//| """Get the last received HID OUT or feature report for the given report ID.
//| The report ID may be omitted if there is no report ID, or only one report ID.
//| Return `None` if nothing received.
//| Return `None` if nothing received. After returning a report, subsequent calls
//| will return `None` until next report is received.
//| """
//| ...
//|

View File

@ -24,6 +24,7 @@
* THE SOFTWARE.
*/
#include <stdbool.h>
#include <string.h>
#include "py/gc.h"
@ -246,6 +247,10 @@ void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t *
mp_obj_t common_hal_usb_hid_device_get_last_received_report(usb_hid_device_obj_t *self, uint8_t report_id) {
// report_id has already been validated for this device.
size_t id_idx = get_report_id_idx(self, report_id);
if (!self->out_report_buffers_updated[id_idx]) {
return mp_const_none;
}
self->out_report_buffers_updated[id_idx] = false;
return mp_obj_new_bytes(self->out_report_buffers[id_idx], self->out_report_lengths[id_idx]);
}
@ -263,6 +268,7 @@ void usb_hid_device_create_report_buffers(usb_hid_device_obj_t *self) {
? gc_alloc(self->out_report_lengths[i], false, true /*long-lived*/)
: NULL;
}
memset(self->out_report_buffers_updated, 0, sizeof(self->out_report_buffers_updated));
}
@ -309,6 +315,7 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep
hid_device->out_report_buffers[id_idx] &&
hid_device->out_report_lengths[id_idx] >= bufsize) {
memcpy(hid_device->out_report_buffers[id_idx], buffer, bufsize);
hid_device->out_report_buffers_updated[id_idx] = true;
}
}
}

View File

@ -38,6 +38,7 @@ typedef struct {
const uint8_t *report_descriptor;
uint8_t *in_report_buffers[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR];
uint8_t *out_report_buffers[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR];
uint8_t out_report_buffers_updated[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR];
uint16_t report_descriptor_length;
uint8_t report_ids[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR];
uint8_t in_report_lengths[CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR];