Commit Graph

102 Commits

Author SHA1 Message Date
Jeff Epler
16ed875f4e canio: remove unused fields
these relate to properties that were removed as well
2020-10-06 20:14:50 -05:00
Jeff Epler
81d7ef0256 stm: canio: remove stray optimization flag for debugging 2020-10-06 20:13:23 -05:00
Jeff Epler
eed3387f4e stm32: canio: Fix message cancellation
.. it's necessary to wait for a cancellation request to actually free
the respective Tx mailbox
2020-10-06 20:12:10 -05:00
Jeff Epler
abe0405d6e stm32: canio: Fix canio.CAN.restart() 2020-10-06 20:12:06 -05:00
Jeff Epler
e5a0af9216 stm32: canio: When Tx mailboxes are full, cancel an old message
.. also add the 8ms wait for transmission that the atmel sam port
has
2020-10-06 20:11:58 -05:00
Jeff Epler
a7dccb39a4 stm32: canio: remove unused functions 2020-10-06 20:11:51 -05:00
Jeff Epler
23bd2496de stm32: canio: remove some unneeded declarations 2020-10-06 20:11:43 -05:00
Jeff Epler
01e9e355ce canio: implement for stm32f405
The has successfully run my loopback self-test program for CAN,
which tests transmission, reception, and filtering.  The 1M baud rate setting
was also verified on saleae to be accurate.
2020-10-06 20:11:35 -05:00
Lucian Copeland
00517b2600 Move missing pin warning to shared-bindings 2020-09-23 11:39:39 -04:00
Jeff Epler
ce266425e1
Merge pull request #3441 from hierophect/stm32-rgbmatrix-crashfix
STM32: Add never_reset reservation to RGBMatrix init
2020-09-20 07:51:09 -05:00
Lucian Copeland
c58bd4c047 Add never_reset reservation to RGBMatrix init 2020-09-18 12:38:15 -04:00
Lucian Copeland
00ee94d24b Add SPI memset, optional flags 2020-09-16 14:22:18 -04:00
root
2690faec43 Moved checks for invalid pin to common-hal/microcontroller/Pin.c 2020-09-05 11:42:06 -05:00
Jeff Epler
49a22b0c55
Merge pull request #3320 from hierophect/stm32-meowbit-fix
STM32: Fix Meowbit startup and associated bugs
2020-08-27 13:05:56 -05:00
Dan Halbert
24fb08dbd9
Merge pull request #3337 from hierophect/pulseout-errorstyle
Fix problematic whitespace on pulseout parameter errors
2020-08-27 13:22:26 -04:00
Lucian Copeland
8021da08d3 Fix problematic whitespace on pulseout parameter errors 2020-08-27 11:07:47 -04:00
Lucian Copeland
8d2299e61e Merge remote-tracking branch 'upstream/main' into stm32-meowbit-fix 2020-08-26 18:50:26 -04:00
Lucian Copeland
c229345741 improve efficiency of stm32 random gen 2020-08-26 18:47:19 -04:00
Lucian Copeland
05bde255f7 Add random to ESP32-S2, fix it on STM32 2020-08-25 14:00:29 -04:00
Lucian Copeland
de9fd4a0fb Fix null dereference, invert auto_brightness to reenable screen 2020-08-25 10:37:55 -04:00
Scott Shawcroft
1527a3ce92
Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-24 18:25:18 -07:00
Scott Shawcroft
644d2ba7a2 Add more "extern" declarations for gcc10 compat
gcc has tightened the restrictions on forward declarations that lack
"extern".  Fix them up.
2020-08-21 14:39:37 -05:00
Scott Shawcroft
a5b01f7361
Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-21 11:13:53 -07:00
Scott Shawcroft
6857f98426
Split pulseio.PWMOut into pwmio
This gives us better granularity when implementing new ports because
PWMOut is commonly implemented before PulseIn and PulseOut.

Fixes #3211
2020-08-18 13:08:33 -07:00
Lucian Copeland
da75445cd5 Style changes, reposition runtime errors 2020-08-18 11:42:06 -04:00
Lucian Copeland
0fc730bc5a Expand PulseOut API, debug cleanup 2020-08-14 16:36:02 -04:00
Jeff Epler
1cf3762392 Merge remote-tracking branch 'origin/main' into stm32-sdioio 2020-08-10 12:54:12 -05:00
Jeff Epler
93b373d617 "pop from empty %q"
Saves 12 bytes code on trinket m0
2020-08-04 18:42:09 -05:00
Jeff Epler
c849b781c0 Combine 'index out of range' messages 2020-08-04 14:45:45 -05:00
Jeff Epler
dddd25a776 Combine similar strings to reduce size of translations
This is a slight trade-off with code size, in places where a "_varg"
mp_raise variant is now used.  The net savings on trinket_m0 is
just 32 bytes.

It also means that the translation will include the original English
text, and cannot be translated.  These are usually names of Python
types such as int, set, or dict or special values such as "inf" or
"Nan".
2020-08-04 13:34:29 -05:00
Jeff Epler
f175a49444 stm: sdioio: include header for common_hal_mcu_pin_claim 2020-07-30 07:18:12 -05:00
Jeff Epler
b57e6e9856 stm: sdioio: call common_hal_mcu_pin_claim 2020-07-30 07:18:12 -05:00
Jeff Epler
60dd5a8d7d stm: sdioio: remove unused code related to "SD Card detect pin"
.. this probably came from the examples that I studied at the beginning
of implementation.

The card detection feature is unused.  As a "detect pin" is not
sent from the shared-bindings, there is no way to get the correct pin
anyway.  Instead, if code needs to detect the insertion state it can
directly use the pin as GPIO in Python code.
2020-07-30 07:18:02 -05:00
Jeff Epler
ccd3013396 stm: stioio: correctly claim pins 2020-07-30 07:18:02 -05:00
Jeff Epler
3cf1258c87 stm: sdioio: Get rid of debug code and useless comments 2020-07-30 07:18:02 -05:00
Jeff Epler
6a99a7b551 stm: Use 'Invalid %q pin selection' more places 2020-07-30 07:18:02 -05:00
Jeff Epler
4adbd23b75 stm: Add sdioio support for feather_stm32f405_express
Currently, only the bus specs of the stm32f405xx have been coded.
Other stm-family chips need (at a minimum) the specs added in their
periph.[ch] files.
2020-07-30 07:18:02 -05:00
Lucian Copeland
c1f731d62e Claim USB pins at startup to prevent overwrites 2020-07-22 14:22:05 -04:00
hierophect
e232ec10ce
Merge branch 'main' into stm32-timer-allocator 2020-07-22 13:59:39 -04:00
Lucian Copeland
138189bad1 Free timers when modules de-init 2020-07-22 13:58:57 -04:00
Lucian Copeland
6a49766df0 Fix pulseIO reset and frequency issues, remove IRQ conflict 2020-07-16 15:45:18 -04:00
Lucian Copeland
818b96ae61 Fix IRQ enum protections 2020-07-14 16:33:36 -04:00
Scott Shawcroft
51c888d4be
Merge pull request #3003 from Flameeyes/master
License tagging according to REUSE specifications.
2020-07-13 16:28:49 -07:00
Lucian Copeland
eb86010176 Enable RGB Matrix 2020-07-10 11:06:12 -04:00
Lucian Copeland
2bcc5c06c2 Fix advanced claimed pin/package timer search 2020-07-09 11:42:37 -04:00
Lucian Copeland
9c38f5dcb1 Merge remote-tracking branch 'upstream/main' into stm32-timer-allocator 2020-07-08 16:03:12 -04:00
Jeff Epler
57ab4f1329 stm: SPI: revamp pin search code
I discussed with Hierophect on Discord about how to "de-nest" the code
for configuring SPI objects on STM, because the problems with one
nesting level per pin becomes unmanageable with the up to 10 pins of
SDIO.

This code (which is only compile-tested so far) demonstrates the concept
we discussed.

The SCK pin is always required.  Loop over all possibilities of the SCK
pin.  When we are considering a particular item in the mcu_spi_sck_list
we have now become committed to using a particular periph_index.  If all
the other pins can be satisfied by that periph_index, then we have a
working combination.  Once we have a working combination that is not
reserved, we can return that combination.  On reaching the end, we have
checked all the possible possibilities and can give the same errors as
before: One if there was a possibility that worked but was reserved;
and another if no possibility worked.
2020-07-07 14:37:50 -05:00
Diego Elio Pettenò
34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Lucian Copeland
c72e3536f1 Merge remote-tracking branch 'upstream/main' into stm32-timer-allocator 2020-07-03 09:50:05 -04:00
Jeff Epler
fcddfd0f39
Merge pull request #3083 from tannewt/esp32s2_busio
Add busio support for the ESP32-S2
2020-07-01 21:02:08 -05:00