Add PS/2 support -- ps2io module

crypto-aes
Elvis Pfützenreuter 4 years ago committed by Elvis Pfutzenreuter
parent c5a4e19d6f
commit 1da8d4b4da
  1. 17
      locale/ID.po
  2. 17
      locale/circuitpython.pot
  3. 17
      locale/de_DE.po
  4. 17
      locale/en_US.po
  5. 17
      locale/en_x_pirate.po
  6. 17
      locale/es.po
  7. 17
      locale/fil.po
  8. 17
      locale/fr.po
  9. 17
      locale/it_IT.po
  10. 17
      locale/pl.po
  11. 17
      locale/pt_BR.po
  12. 17
      locale/zh_Latn_pinyin.po
  13. 2
      ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk
  14. 2
      ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk
  15. 2
      ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk
  16. 2
      ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk
  17. 2
      ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk
  18. 2
      ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk
  19. 2
      ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk
  20. 2
      ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk
  21. 2
      ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk
  22. 441
      ports/atmel-samd/common-hal/ps2io/Ps2.c
  23. 62
      ports/atmel-samd/common-hal/ps2io/Ps2.h
  24. 1
      ports/atmel-samd/common-hal/ps2io/__init__.c
  25. 7
      ports/atmel-samd/eic_handler.c
  26. 1
      ports/atmel-samd/eic_handler.h
  27. 1
      ports/atmel-samd/supervisor/port.c
  28. 3
      ports/atmel-samd/tools/gen_pin_name_table.py
  29. 5
      py/circuitpy_defns.mk
  30. 8
      py/circuitpy_mpconfig.h
  31. 6
      py/circuitpy_mpconfig.mk
  32. 1
      shared-bindings/index.rst
  33. 237
      shared-bindings/ps2io/Ps2.c
  34. 45
      shared-bindings/ps2io/Ps2.h
  35. 73
      shared-bindings/ps2io/__init__.c
  36. 35
      shared-bindings/ps2io/__init__.h

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -518,6 +518,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Channel EXTINT sedang digunakan"
@ -546,6 +547,10 @@ msgstr ""
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -932,6 +937,10 @@ msgstr "Tidak ada GCLK yang kosong"
msgid "No hardware random available"
msgstr ""
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1015,6 +1024,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr "Tambahkan module apapun pada filesystem\n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2176,7 +2189,7 @@ msgstr ""
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:41-0700\n"
"POT-Creation-Date: 2019-05-22 16:00-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -506,6 +506,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr ""
@ -534,6 +535,10 @@ msgstr ""
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr ""
@ -907,6 +912,10 @@ msgstr ""
msgid "No hardware random available"
msgstr ""
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -989,6 +998,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2131,7 +2144,7 @@ msgstr ""
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -510,6 +510,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "EXTINT Kanal ist schon in Benutzung"
@ -538,6 +539,10 @@ msgstr "Eine UUID wird erwartet"
msgid "Expected tuple of length %d, got %d"
msgstr "Habe ein Tupel der Länge %d erwartet aber %d erhalten"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr "Akquirieren des Mutex gescheitert"
@ -920,6 +925,10 @@ msgstr "Keine freien GCLKs"
msgid "No hardware random available"
msgstr "Kein hardware random verfügbar"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1004,6 +1013,10 @@ msgstr "Pixel außerhalb der Puffergrenzen"
msgid "Plus any modules on the filesystem\n"
msgstr "und alle Module im Dateisystem \n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2178,7 +2191,7 @@ msgstr "Objekt ist kein Iterator"
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "Objekt ist nicht in sequence"

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -506,6 +506,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr ""
@ -534,6 +535,10 @@ msgstr ""
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr ""
@ -907,6 +912,10 @@ msgstr ""
msgid "No hardware random available"
msgstr ""
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -989,6 +998,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2131,7 +2144,7 @@ msgstr ""
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr ""

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
@ -510,6 +510,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Avast! EXTINT channel already in use"
@ -538,6 +539,10 @@ msgstr ""
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr ""
@ -911,6 +916,10 @@ msgstr ""
msgid "No hardware random available"
msgstr ""
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -993,6 +1002,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2135,7 +2148,7 @@ msgstr ""
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -524,6 +524,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Modo Drive no se usa cuando la dirección es input."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "El canal EXTINT ya está siendo utilizado"
@ -554,6 +555,10 @@ msgstr "Se espera un %q"
msgid "Expected tuple of length %d, got %d"
msgstr "Se esperaba un tuple de %d, se obtuvo %d"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -946,6 +951,10 @@ msgstr "Sin GCLKs libres"
msgid "No hardware random available"
msgstr "No hay hardware random disponible"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1035,6 +1044,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr "Incapaz de montar de nuevo el sistema de archivos"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2213,7 +2226,7 @@ msgstr "objeto no es un iterator"
msgid "object not callable"
msgstr "objeto no puede ser llamado"
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "objeto no en secuencia"

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -519,6 +519,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Drive mode ay hindi ginagamit kapag ang direksyon ay input."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Ginagamit na ang EXTINT channel"
@ -549,6 +550,10 @@ msgstr "Umasa ng %q"
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -941,6 +946,10 @@ msgstr "Walang libreng GCLKs"
msgid "No hardware random available"
msgstr "Walang magagamit na hardware random"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1028,6 +1037,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr "Kasama ang kung ano pang modules na sa filesystem\n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2212,7 +2225,7 @@ msgstr "object ay hindi iterator"
msgid "object not callable"
msgstr "hindi matatawag ang object"
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "object wala sa sequence"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@ -522,6 +522,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canal EXTINT déjà utilisé"
@ -552,6 +553,10 @@ msgstr "Un UUID est attendu"
msgid "Expected tuple of length %d, got %d"
msgstr "Tuple de longueur %d attendu, obtenu %d"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -949,6 +954,10 @@ msgstr "Pas de GCLK libre"
msgid "No hardware random available"
msgstr "Pas de source matérielle d'aléa disponible"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1045,6 +1054,10 @@ msgstr "Pixel au-delà des limites du tampon"
msgid "Plus any modules on the filesystem\n"
msgstr "Ainsi que tout autre module présent sur le système de fichiers\n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger."
@ -2247,7 +2260,7 @@ msgstr "l'objet n'est pas un itérateur"
msgid "object not callable"
msgstr "objet non appelable"
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "l'objet n'est pas dans la séquence"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -519,6 +519,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canale EXTINT già in uso"
@ -549,6 +550,10 @@ msgstr "Atteso un %q"
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -940,6 +945,10 @@ msgstr "Nessun GCLK libero"
msgid "No hardware random available"
msgstr "Nessun generatore hardware di numeri casuali disponibile"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1033,6 +1042,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr "Imposssibile rimontare il filesystem"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2208,7 +2221,7 @@ msgstr "l'oggetto non è un iteratore"
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "oggetto non in sequenza"

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@ -509,6 +509,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Tryb sterowania nieużywany w trybie wejścia."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Kanał EXTINT w użyciu"
@ -537,6 +538,10 @@ msgstr "Oczekiwano UUID"
msgid "Expected tuple of length %d, got %d"
msgstr "Oczekiwano krotkę długości %d, otrzymano %d"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr "Nie udało się uzyskać blokady"
@ -917,6 +922,10 @@ msgstr "Brak wolnych GLCK"
msgid "No hardware random available"
msgstr "Brak generatora liczb losowych"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -999,6 +1008,10 @@ msgstr "Piksel poza granicami bufora"
msgid "Plus any modules on the filesystem\n"
msgstr "Oraz moduły w systemie plików\n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Dowolny klawisz aby uruchomić konsolę. CTRL-D aby przeładować."
@ -2156,7 +2169,7 @@ msgstr "obiekt nie jest iteratorem"
msgid "object not callable"
msgstr "obiekt nie jest wywoływalny"
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "obiektu nie ma sekwencji"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -514,6 +514,7 @@ msgid "Drive mode not used when direction is input."
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canal EXTINT em uso"
@ -544,6 +545,10 @@ msgstr "Esperado um"
msgid "Expected tuple of length %d, got %d"
msgstr ""
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr "Falha ao enviar comando."
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to acquire mutex"
@ -930,6 +935,10 @@ msgstr "Não há GCLKs livre"
msgid "No hardware random available"
msgstr ""
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr "Sem suporte de hardware no pino de clock"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1016,6 +1025,10 @@ msgstr ""
msgid "Plus any modules on the filesystem\n"
msgstr "Não é possível remontar o sistema de arquivos"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr "Buffer Ps2 vazio"
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr ""
@ -2165,7 +2178,7 @@ msgstr ""
msgid "object not callable"
msgstr ""
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "objeto não em seqüência"

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-13 17:34-0700\n"
"POT-Creation-Date: 2019-05-22 15:56-0300\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@ -510,6 +510,7 @@ msgid "Drive mode not used when direction is input."
msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "EXTINT píndào yǐjīng shǐyòng"
@ -538,6 +539,10 @@ msgstr "Yùqí UUID"
msgid "Expected tuple of length %d, got %d"
msgstr "Qīwàng de chángdù wèi %d de yuán zǔ, dédào %d"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to acquire mutex"
msgstr "Wúfǎ huòdé mutex"
@ -917,6 +922,10 @@ msgstr "Méiyǒu miǎnfèi de GCLKs"
msgid "No hardware random available"
msgstr "Méiyǒu kěyòng de yìngjiàn suíjī"
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
msgid "No hardware support on clk pin"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "No hardware support on pin"
@ -1004,6 +1013,10 @@ msgstr "Xiàngsù chāochū huǎnchōng qū biānjiè"
msgid "Plus any modules on the filesystem\n"
msgstr "Zài wénjiàn xìtǒng shàng tiānjiā rènhé mókuài\n"
#: shared-bindings/ps2io/Ps2.c
msgid "Pop from an empty Ps2 buffer"
msgstr ""
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzài."
@ -2168,7 +2181,7 @@ msgstr "duìxiàng bùshì diédài qì"
msgid "object not callable"
msgstr "duìxiàng wúfǎ diàoyòng"
#: py/sequence.c
#: py/sequence.c shared-bindings/displayio/Group.c
msgid "object not in sequence"
msgstr "duìxiàng bùshì xùliè"

@ -15,3 +15,5 @@ CIRCUITPY_TOUCHIO = 0
CHIP_VARIANT = SAMD51J20A
CHIP_FAMILY = samd51
CIRCUITPY_PS2IO = 1

@ -18,3 +18,5 @@ CIRCUITPY_TOUCHIO = 0
CIRCUITPY_NETWORK = 1
MICROPY_PY_WIZNET5K = 5500
CIRCUITPY_PS2IO = 1

@ -18,3 +18,5 @@ CHIP_FAMILY = samd51
CIRCUITPY_NETWORK = 1
MICROPY_PY_WIZNET5K = 5500
CIRCUITPY_PS2IO = 1

@ -15,3 +15,5 @@ CIRCUITPY_TOUCHIO = 0
CHIP_VARIANT = SAMD51P20A
CHIP_FAMILY = samd51
CIRCUITPY_PS2IO = 1

@ -16,3 +16,5 @@ CIRCUITPY_TOUCHIO = 0
CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51
CIRCUITPY_PS2IO = 1

@ -18,3 +18,5 @@ CHIP_FAMILY = samd51
CIRCUITPY_NETWORK = 1
MICROPY_PY_WIZNET5K = 5500
CIRCUITPY_PS2IO = 1

@ -18,3 +18,5 @@ CHIP_FAMILY = samd51
CIRCUITPY_NETWORK = 1
MICROPY_PY_WIZNET5K = 5500
CIRCUITPY_PS2IO = 1

@ -17,3 +17,5 @@ CIRCUITPY_TOUCHIO = 0
CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51
CIRCUITPY_PS2IO = 1

@ -16,3 +16,5 @@ CIRCUITPY_TOUCHIO = 0
CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51
CIRCUITPY_PS2IO = 1

@ -0,0 +1,441 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017-2018 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2019 Elvis Pfutzenreuter <epxx@epxx.co>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "common-hal/ps2io/Ps2.h"
#include <stdint.h>
#include "atmel_start_pins.h"
#include "hal/include/hal_gpio.h"
#include "background.h"
#include "eic_handler.h"
#include "mpconfigport.h"
#include "py/gc.h"
#include "py/runtime.h"
#include "samd/external_interrupts.h"
#include "samd/pins.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/ps2io/Ps2.h"
#include "supervisor/shared/translate.h"
#include "tick.h"
#define STATE_IDLE 0
#define STATE_RECV 1
#define STATE_RECV_PARITY 2
#define STATE_RECV_STOP 3
#define STATE_RECV_ERR 10
#define ERROR_STARTBIT 0x01
#define ERROR_TIMEOUT 0x02
#define ERROR_PARITY 0x04
#define ERROR_STOPBIT 0x08
#define ERROR_BUFFER 0x10
#define ERROR_TX_CLKLO 0x100
#define ERROR_TX_CLKHI 0x200
#define ERROR_TX_ACKDATA 0x400
#define ERROR_TX_ACKCLK 0x800
#define ERROR_TX_RTS 0x1000
#define ERROR_TX_NORESP 0x2000
static void ps2_set_config(ps2io_ps2_obj_t* self) {
uint32_t sense_setting = EIC_CONFIG_SENSE0_FALL_Val;
set_eic_handler(self->channel, EIC_HANDLER_PS2);
turn_on_eic_channel(self->channel, sense_setting);
}
static void disable_interrupt(ps2io_ps2_obj_t* self) {
uint32_t mask = 1 << self->channel;
EIC->INTENCLR.reg = mask << EIC_INTENSET_EXTINT_Pos;
}
static void resume_interrupt(ps2io_ps2_obj_t* self) {
disable_interrupt(self);
self->state = STATE_IDLE;
gpio_set_pin_function(self->clk_pin, GPIO_PIN_FUNCTION_A);
uint32_t mask = 1 << self->channel;
EIC->INTFLAG.reg = mask << EIC_INTFLAG_EXTINT_Pos;
EIC->INTENSET.reg = mask << EIC_INTENSET_EXTINT_Pos;
ps2_set_config(self);
}
static void clk_hi(ps2io_ps2_obj_t* self) {
// External pull-up
// Must set pull after setting direction.
gpio_set_pin_direction(self->clk_pin, GPIO_DIRECTION_IN);
gpio_set_pin_pull_mode(self->clk_pin, GPIO_PULL_OFF);
}
static bool wait_clk_lo(ps2io_ps2_obj_t* self, uint32_t us) {
clk_hi(self);
common_hal_mcu_delay_us(1);
while (gpio_get_pin_level(self->clk_pin) && us) {
--us;
common_hal_mcu_delay_us(1);
}
return us;
}
static bool wait_clk_hi(ps2io_ps2_obj_t* self, uint32_t us) {
clk_hi(self);
common_hal_mcu_delay_us(1);
while (!gpio_get_pin_level(self->clk_pin) && us) {
--us;
common_hal_mcu_delay_us(1);
}
return us;
}
static void clk_lo(ps2io_ps2_obj_t* self) {
gpio_set_pin_pull_mode(self->clk_pin, GPIO_PULL_OFF);
gpio_set_pin_direction(self->clk_pin, GPIO_DIRECTION_OUT);
gpio_set_pin_level(self->clk_pin, 0);
}
static void data_hi(ps2io_ps2_obj_t* self) {
// External pull-up
gpio_set_pin_direction(self->data_pin, GPIO_DIRECTION_IN);
gpio_set_pin_pull_mode(self->data_pin, GPIO_PULL_OFF);
}
static bool wait_data_lo(ps2io_ps2_obj_t* self, uint32_t us) {
data_hi(self);
common_hal_mcu_delay_us(1);
while (gpio_get_pin_level(self->data_pin) && us) {
--us;
common_hal_mcu_delay_us(1);
}
return us;
}
static bool wait_data_hi(ps2io_ps2_obj_t* self, uint32_t us) {
data_hi(self);
common_hal_mcu_delay_us(1);
while (!gpio_get_pin_level(self->data_pin) && us) {
--us;
common_hal_mcu_delay_us(1);
}
return us;
}
static void data_lo(ps2io_ps2_obj_t* self) {
gpio_set_pin_pull_mode(self->data_pin, GPIO_PULL_OFF);
gpio_set_pin_direction(self->data_pin, GPIO_DIRECTION_OUT);
gpio_set_pin_level(self->data_pin, 0);
}
static void idle(ps2io_ps2_obj_t* self) {
clk_hi(self);
data_hi(self);
}
static void inhibit(ps2io_ps2_obj_t* self) {
clk_lo(self);
data_hi(self);
}
static void delay_us(uint32_t t) {
common_hal_mcu_delay_us(t);
}
void ps2_interrupt_handler(uint8_t channel) {
// Grab the current time first.
uint32_t current_us;
uint64_t current_ms;
current_tick(&current_ms, &current_us);
ps2io_ps2_obj_t* self = get_eic_channel_data(channel);
int data_bit = gpio_get_pin_level(self->data_pin) ? 1 : 0;
// test for timeout
if (self->state != STATE_IDLE) {
int64_t diff_ms = current_ms - self->last_int_ms;
if (diff_ms >= 2) { // a.k.a. > 1.001ms
self->last_errors |= ERROR_TIMEOUT;
self->state = STATE_IDLE;
}
}
self->last_int_us = current_us;
self->last_int_ms = current_ms;
if (self->state == STATE_IDLE) {
self->bits = 0;
self->parity = false;
self->bitcount = 0;
self->state = STATE_RECV;
if (data_bit) {
// start bit should be 0
self->last_errors |= ERROR_STARTBIT;
self->state = STATE_RECV_ERR;
} else {
self->state = STATE_RECV;
}
} else if (self->state == STATE_RECV) {
if (data_bit) {
self->bits |= data_bit << self->bitcount;
self->parity = !self->parity;
}
++self->bitcount;
if (self->bitcount >= 8) {
self->state = STATE_RECV_PARITY;
}
} else if (self->state == STATE_RECV_PARITY) {
++self->bitcount;
if (data_bit) {
self->parity = !self->parity;
}
if (!self->parity) {
self->last_errors |= ERROR_PARITY;
self->state = STATE_RECV_ERR;
} else {
self->state = STATE_RECV_STOP;
}
} else if (self->state == STATE_RECV_STOP) {
++self->bitcount;
if (! data_bit) {
self->last_errors |= ERROR_STOPBIT;
} else if (self->waiting_cmd_response) {
self->cmd_response = self->bits;
self->waiting_cmd_response = false;
} else if (self->bufcount >= sizeof(self->buffer)) {
self->last_errors |= ERROR_BUFFER;
} else {
self->buffer[self->bufposw] = self->bits;
self->bufposw = (self->bufposw + 1) % sizeof(self->buffer);
self->bufcount++;
}
self->state = STATE_IDLE;
} else if (self->state == STATE_RECV_ERR) {
// just count the bits until idle
if (++self->bitcount >= 10) {
self->state = STATE_IDLE;
}
}
}
void common_hal_ps2io_ps2_construct(ps2io_ps2_obj_t* self,
const mcu_pin_obj_t* data_pin, const mcu_pin_obj_t* clk_pin) {
if (!clk_pin->has_extint) {
mp_raise_RuntimeError(translate("No hardware support on clk pin"));
}
if (eic_get_enable() && !eic_channel_free(clk_pin->extint_channel)) {
mp_raise_RuntimeError(translate("EXTINT channel already in use"));
}
clk_hi(self);
data_hi(self);
self->channel = clk_pin->extint_channel;
self->clk_pin = clk_pin->number;
self->data_pin = data_pin->number;
self->state = STATE_IDLE;
self->bufcount = 0;
self->bufposr = 0;
self->bufposw = 0;
self->waiting_cmd_response = false;
set_eic_channel_data(clk_pin->extint_channel, (void*) self);
// Check to see if the EIC is enabled and start it up if its not.'
if (eic_get_enable() == 0) {
turn_on_external_interrupt_controller();
}
gpio_set_pin_function(clk_pin->number, GPIO_PIN_FUNCTION_A);
gpio_set_pin_function(data_pin->number, GPIO_PIN_FUNCTION_A);
turn_on_cpu_interrupt(self->channel);
claim_pin(clk_pin);
claim_pin(data_pin);
// Set config will enable the EIC.
ps2_set_config(self);
}
bool common_hal_ps2io_ps2_deinited(ps2io_ps2_obj_t* self) {
return self->clk_pin == NO_PIN;
}
void common_hal_ps2io_ps2_deinit(ps2io_ps2_obj_t* self) {
if (common_hal_ps2io_ps2_deinited(self)) {
return;
}
set_eic_handler(self->channel, EIC_HANDLER_NO_INTERRUPT);
turn_off_eic_channel(self->channel);
reset_pin_number(self->clk_pin);
reset_pin_number(self->data_pin);
self->clk_pin = NO_PIN;
self->data_pin = NO_PIN;
}
uint16_t common_hal_ps2io_ps2_get_len(ps2io_ps2_obj_t* self) {
return self->bufcount;
}
bool common_hal_ps2io_ps2_get_paused(ps2io_ps2_obj_t* self) {
uint32_t mask = 1 << self->channel;
return (EIC->INTENSET.reg & (mask << EIC_INTENSET_EXTINT_Pos)) == 0;
}
int16_t common_hal_ps2io_ps2_popleft(ps2io_ps2_obj_t* self)
{
common_hal_mcu_disable_interrupts();
if (self->bufcount <= 0) {
common_hal_mcu_enable_interrupts();
return -1;
}
uint8_t b = self->buffer[self->bufposr];
self->bufposr = (self->bufposr + 1) % sizeof(self->buffer);
self->bufcount -= 1;
common_hal_mcu_enable_interrupts();
return b;
}
uint16_t common_hal_ps2io_ps2_clear_errors(ps2io_ps2_obj_t* self)
{
common_hal_mcu_disable_interrupts();
uint16_t errors = self->last_errors;
self->last_errors = 0;
common_hal_mcu_enable_interrupts();
return errors;
}
// Based upon TMK implementation of PS/2 protocol
// https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/protocol/ps2_interrupt.c
int16_t common_hal_ps2io_ps2_sendcmd(ps2io_ps2_obj_t* self, uint8_t b)
{
disable_interrupt(self);
inhibit(self);
delay_us(100);
/* RTS and start bit */
data_lo(self);
clk_hi(self);
if (!wait_clk_lo(self, 10000)) {
self->last_errors |= ERROR_TX_RTS;
goto ERROR;
}
bool parity = true;
for (uint8_t i = 0; i < 8; i++) {
delay_us(15);
if (b & (1 << i)) {
parity = !parity;
data_hi(self);
} else {
data_lo(self);
}
if (!wait_clk_hi(self, 50)) {
self->last_errors |= ERROR_TX_CLKHI;
goto ERROR;
}
if (!wait_clk_lo(self, 50)) {
self->last_errors |= ERROR_TX_CLKLO;
goto ERROR;
}
}
delay_us(15);
if (parity) {
data_hi(self);
} else {
data_lo(self);
}
if (!wait_clk_hi(self, 50)) {
self->last_errors |= ERROR_TX_CLKHI;
goto ERROR;
}
if (!wait_clk_lo(self, 50)) {
self->last_errors |= ERROR_TX_CLKLO;
goto ERROR;
}
/* Stop bit */
delay_us(15);
data_hi(self);
/* Ack */
if (!wait_data_lo(self, 50)) {
self->last_errors |= ERROR_TX_ACKDATA;
goto ERROR;
}
if (!wait_clk_lo(self, 50)) {
self->last_errors |= ERROR_TX_ACKCLK;
goto ERROR;
}
/* wait for idle state */
if (!wait_clk_hi(self, 50)) {
self->last_errors |= ERROR_TX_ACKCLK;
goto ERROR;
}
if (!wait_data_hi(self, 50)) {
self->last_errors |= ERROR_TX_ACKDATA;
goto ERROR;
}
/* Wait for response byte */
self->waiting_cmd_response = true;
idle(self);
resume_interrupt(self);
for (int i = 0; i < 25; ++i) {
delay_us(1000);
common_hal_mcu_disable_interrupts();
bool has_response = !self->waiting_cmd_response;
uint8_t response = self->cmd_response;
common_hal_mcu_enable_interrupts();
if (has_response) {
return response;
}
}
/* No response */
common_hal_mcu_disable_interrupts();
self->waiting_cmd_response = false;
self->last_errors |= ERROR_TX_NORESP;
common_hal_mcu_enable_interrupts();
return -1;
/* Other errors */
ERROR:
idle(self);
resume_interrupt(self);
return -1;
}

@ -0,0 +1,62 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2019 Elvis Pfutzenreuter <epxx@epxx.co>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PS2IO_PS2_H
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PS2IO_PS2_H
#include "common-hal/microcontroller/Pin.h"
#include "py/obj.h"
typedef struct {