diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-11-13 18:33:02 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-11-13 18:57:52 -0800 |
| commit | bda3267432aee57e704a20308b724369cceeb6ca (patch) | |
| tree | 47f6a854677781382d715791e7d7534d71887f7a /ports | |
| parent | 68eb809fbf5cafdabb20c090b98aefb1628e3552 (diff) | |
Save flash space
* No weak link for modules. It only impacts _os and _time and is
already disabled for non-full builds.
* Turn off PA00 and PA01 because they are the crystal on the Metro
M0 Express.
* Change ejected default to false to move it to BSS. It is set on
USB connection anyway.
* Set sinc_filter to const. Doesn't help flash but keeps it out of
RAM.
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h | 4 | ||||
| -rw-r--r-- | ports/atmel-samd/common-hal/audiobusio/PDMIn.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h index 04565feb4..d48c596ac 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h @@ -33,6 +33,10 @@ #define DEFAULT_UART_BUS_RX (&pin_PA11) #define DEFAULT_UART_BUS_TX (&pin_PA10) +// These pins are connected to the external crystal. +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c index 21474ab3b..3c9ec05c2 100644 --- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -326,7 +326,7 @@ static void setup_dma(audiobusio_pdmin_obj_t* self, uint32_t length, // higher sample rate than specified. Then after the audio is // recorded, a more expensive filter non-real-time filter could be // used to down-sample and low-pass. -uint16_t sinc_filter [OVERSAMPLING] = { +const uint16_t sinc_filter [OVERSAMPLING] = { 0, 2, 9, 21, 39, 63, 94, 132, 179, 236, 302, 379, 467, 565, 674, 792, 920, 1055, 1196, 1341, 1487, 1633, 1776, 1913, |
