robert-hh
a1eebc507e
samd/machine_spi: Register SerCom objects as root pointers.
...
Protect SerCom (UART, SPI, I2C) objects from getting freed by the GC when
they go out of scope without being deinitialized. Otherwise the ISR of a
Sercom may access an invalid data structure.
2022-10-25 23:48:37 +11:00
robert-hh
d74215a313
samd/machine_spi: Implement spi.deinit() and simplify sercom_deinit_all.
...
The sercom_deinit_all() function does not need the object pointers.
2022-10-25 23:46:00 +11:00
robert-hh
4d38ab652e
samd: Make ADC, DAC, PWM, SPI objects consistent in how they print out.
...
All of ADC, DAC, Pin, PWM and SPI looked different before this change.
2022-10-25 23:36:01 +11:00
robert-hh
d9338aabc5
samd: Change the symbol names for the peripheral clocks.
...
From APB_FREQ to DFLL48M_FREQ, and from apb_freq to peripheral_freq.
2022-10-06 23:10:08 +11:00
robert-hh
3625388d8c
samd/samd_isr: Change the way a Sercom ISR is registered and called.
...
Code size diff: +12 Bytes
BSS diff: -12 Bytes
RAM usage: +16 Bytes
Speed increase: a few clock cycles per call
Style improvement: ++
2022-10-06 22:52:10 +11:00
robert-hh
aa870708ac
samd/machine_spi: Add the machine.SPI class.
...
Suported by both SAMD21 and SAMD51. It follows the generic API, except for
the bits=nn option, which is not implemented (yet).
2022-10-06 22:48:44 +11:00