Skip to content

Commit 232c7ff

Browse files
committed
Revert "Merge branch 'adafruit:main' into audiodelays_stereo_freq_shift_fix"
This reverts commit db3a47d, reversing changes made to b4698a5.
1 parent db3a47d commit 232c7ff

File tree

143 files changed

+725
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+725
-656
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ repos:
1010
hooks:
1111
- id: check-yaml
1212
- id: end-of-file-fixer
13-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/mimxrt10xx/sdk|ports/raspberrypi/sdk|lib/tinyusb)'
13+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/raspberrypi/sdk|lib/tinyusb)'
1414
- id: trailing-whitespace
15-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|ports/mimxrt10xx/sdk|lib/tinyusb)'
15+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|lib/tinyusb)'
1616
- repo: https://github.com/codespell-project/codespell
1717
rev: v2.2.4
1818
hooks:
@@ -59,4 +59,3 @@ repos:
5959
rev: "v2.5.0"
6060
hooks:
6161
- id: pyproject-fmt
62-
exclude: '^(ports/mimxrt10xx/sdk)'

docs/library/errno.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
|see_cpython_module| :mod:`python:errno`.
88

99
This module provides access to symbolic error codes for `OSError` exception.
10-
Some codes are not available on the smallest CircuitPython builds, such as SAMD21, for space reasons.
10+
The codes available may vary per CircuitPython build.
1111

1212
Constants
1313
---------

lib/tinyusb

Submodule tinyusb updated 92 files

main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ static uint8_t *_allocate_memory(safe_mode_t safe_mode, const char *env_key, siz
131131
*final_size = default_size;
132132
#if CIRCUITPY_OS_GETENV
133133
if (safe_mode == SAFE_MODE_NONE) {
134-
mp_int_t size;
135-
if (common_hal_os_getenv_int(env_key, &size) == GETENV_OK && size > 0) {
136-
*final_size = size;
134+
(void)common_hal_os_getenv_int(env_key, (mp_int_t *)final_size);
135+
if (*final_size < 0) {
136+
*final_size = default_size;
137137
}
138138
}
139139
#endif

ports/analog/common-hal/os/__init__.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@
1515

1616
// #include "peripherals/periph.h"
1717

18+
static const qstr os_uname_info_fields[] = {
19+
MP_QSTR_sysname, MP_QSTR_nodename,
20+
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
21+
};
22+
static const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "max32");
23+
static const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "max32");
24+
25+
static const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING);
26+
static const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE);
27+
static const MP_DEFINE_STR_OBJ(os_uname_info_machine_obj, MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME);
28+
29+
static MP_DEFINE_ATTRTUPLE(
30+
os_uname_info_obj,
31+
os_uname_info_fields,
32+
5,
33+
(mp_obj_t)&os_uname_info_sysname_obj,
34+
(mp_obj_t)&os_uname_info_nodename_obj,
35+
(mp_obj_t)&os_uname_info_release_obj,
36+
(mp_obj_t)&os_uname_info_version_obj,
37+
(mp_obj_t)&os_uname_info_machine_obj
38+
);
39+
40+
mp_obj_t common_hal_os_uname(void) {
41+
return (mp_obj_t)&os_uname_info_obj;
42+
}
43+
1844
bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) {
1945
#if (HAS_TRNG)
2046
// todo (low prior): implement

ports/analog/mpconfigport.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
#include <stdint.h>
1111

12+
#define MICROPY_PY_FUNCTION_ATTRS (1)
13+
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
14+
1215
// 24KiB stack
1316
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
1417

ports/atmel-samd/common-hal/audioio/AudioOut.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ static void ramp_value(uint16_t start, uint16_t end) {
7979
// Caller validates that pins are free.
8080
void common_hal_audioio_audioout_construct(audioio_audioout_obj_t *self,
8181
const mcu_pin_obj_t *left_channel, const mcu_pin_obj_t *right_channel, uint16_t quiescent_value) {
82-
83-
// The case of left_channel == right_channel is already disallowed in shared-bindings.
84-
8582
#ifdef SAM_D5X_E5X
8683
bool dac_clock_enabled = hri_mclk_get_APBDMASK_DAC_bit(MCLK);
8784
#endif
@@ -110,6 +107,10 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t *self,
110107
if (right_channel != NULL && right_channel != &pin_PA02 && right_channel != &pin_PA05) {
111108
raise_ValueError_invalid_pin_name(MP_QSTR_right_channel);
112109
}
110+
if (right_channel == left_channel) {
111+
mp_raise_ValueError_varg(MP_ERROR_TEXT("%q and %q must be different"),
112+
MP_QSTR_left_channel, MP_QSTR_right_channel);
113+
}
113114
claim_pin(left_channel);
114115
if (right_channel != NULL) {
115116
claim_pin(right_channel);

ports/atmel-samd/common-hal/os/__init__.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,38 @@
1616
#include "hal/include/hal_rand_sync.h"
1717
#endif
1818

19+
static const qstr os_uname_info_fields[] = {
20+
MP_QSTR_sysname, MP_QSTR_nodename,
21+
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
22+
};
23+
#ifdef SAMD21
24+
static const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "samd21");
25+
static const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "samd21");
26+
#endif
27+
#ifdef SAM_D5X_E5X
28+
static const MP_DEFINE_STR_OBJ(os_uname_info_sysname_obj, "samd51");
29+
static const MP_DEFINE_STR_OBJ(os_uname_info_nodename_obj, "samd51");
30+
#endif
31+
static const MP_DEFINE_STR_OBJ(os_uname_info_release_obj, MICROPY_VERSION_STRING);
32+
static const MP_DEFINE_STR_OBJ(os_uname_info_version_obj, MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE);
33+
static const MP_DEFINE_STR_OBJ(os_uname_info_machine_obj, MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME);
34+
35+
36+
static MP_DEFINE_ATTRTUPLE(
37+
os_uname_info_obj,
38+
os_uname_info_fields,
39+
5,
40+
(mp_obj_t)&os_uname_info_sysname_obj,
41+
(mp_obj_t)&os_uname_info_nodename_obj,
42+
(mp_obj_t)&os_uname_info_release_obj,
43+
(mp_obj_t)&os_uname_info_version_obj,
44+
(mp_obj_t)&os_uname_info_machine_obj
45+
);
46+
47+
mp_obj_t common_hal_os_uname(void) {
48+
return (mp_obj_t)&os_uname_info_obj;
49+
}
50+
1951
bool common_hal_os_urandom(uint8_t *buffer, mp_uint_t length) {
2052
#ifdef SAM_D5X_E5X
2153
hri_mclk_set_APBCMASK_TRNG_bit(MCLK);

ports/atmel-samd/mpconfigport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAME54"
6969
#endif
7070
#define SPI_FLASH_MAX_BAUDRATE 24000000
71-
71+
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
72+
#define MICROPY_PY_FUNCTION_ATTRS (1)
7273
// MICROPY_PY_ERRNO_LIST - Use the default
7374

7475
#endif // SAM_D5X_E5X

0 commit comments

Comments
 (0)