Ayke van Laethem
91e9c84d85
nrf: make GetRNG available to all chips
...
All nrf chips have a cryptographically secure RNG on board. Therefore,
I've made the code more portable so that it works on all nrf chips.
I did remove a number of exported functions. I am of the opinion that
these should only be made available once we have an agreed upon API for
multiple chips. People who want to have greater control over the RNG
should use the device/nrf package directly instead.
I have also changed the behavior to always enable digital error
correction. Enabling it seems like a more conservative (and secure)
default to me. Again, people who would like to have it disabled can use
the device/nrf package directly.
2022-09-17 06:08:54 +02:00
Ayke van Laethem
d3863f337d
rp2040: do not use GetRNG in crypto/rand
...
The crypto/rand package is used for sensitive cryptographic operations.
Do not use the rp2040 RNG for this purpose, because it's not strong
enough for cryptography.
I think it is _possible_ to make use of the RP2040 RNG to create
cryptographically secure pseudo-random numbers, but it needs some
entropy calculation and secure hashing (blake2s or so) to make them
truly unpredictable.
2022-09-16 14:48:41 +02:00
Matt Schultz
4ba76a5df9
machine/nrf52840: implement RNG peripheral operation
2022-09-12 09:54:51 +02:00
deadprogram
ea1e08f53f
machine/rp2040: implement semi-random RNG based on ROSC based on pico-sdk
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-09-10 10:47:48 +02:00
Isaac Rodman
617c7586fe
Remove unconnected simple LED pin from qtpy-rp2040
2022-09-09 11:05:12 +02:00
Isaac Rodman
7366d5e185
Set default-stack-size to 4096, and remove NEOPIXELS pluralization for qtpy-rp2040
2022-09-09 11:05:12 +02:00
Ayke van Laethem
4ca9b34133
machine: add PWM peripheral comments to pins
...
These comments will be used in a change to the tinygo.org documentation.
2022-09-05 18:56:34 +02:00
Isaac Rodman
09350e5719
Add qtpy-rp2040 to TinyGo v0.25.0
2022-09-02 15:06:37 +02:00
sago35
edaf13f951
wioterminal: add UART3 for RTL8720DN
2022-09-01 19:22:01 +02:00
Matt Schultz
ef912a132d
machine: Add support for Adafruit QT2040 board.
2022-08-28 10:16:52 +02:00
Yurii Soldak
fb603a471c
boards: Add XIAO ESP32C3 board
2022-08-26 12:44:04 +02:00
Daniel Esteban
aa13b5d83b
Add Pimoroni's Tufty2040 board
2022-08-24 13:50:02 +02:00
Ayke van Laethem
c7a23183e8
all: format code according to Go 1.19 rules
...
Go 1.19 started reformatting code in a way that makes it more obvious
how it will be rendered on pkg.go.dev. It gets it almost right, but not
entirely. Therefore, I had to modify some of the comments so that they
are formatted correctly.
2022-08-04 12:18:32 +02:00
deadprogram
67aea275c5
machine/rp2040: turn off pullup/down when not input type not specified
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-27 21:45:45 +02:00
Ayke van Laethem
99bd4d2c7c
esp32: optimize SPI transmit
...
For write-only operations (in SPI displays for example), the transmit
speed is doubled with this relatively small change.
In the future, we should try to use DMA instead for larger buffers. But
this is already a significant improvement and will always be an
improvement for small buffer sizes.
2022-07-27 17:22:34 +02:00
sago35
a4b22bd125
usb/midi: add definition of MIDI note number
2022-07-27 16:19:13 +02:00
Kenneth Bell
6d1cbe6fb9
rp2040: usb: reset device address on bus reset
2022-07-26 06:47:16 +02:00
sago35
7cd2890434
rp2040: add resetBlock for USBCTRL
2022-07-25 17:01:14 +02:00
sago35
3047d8f321
samd51: improve TRNG
2022-07-22 09:27:43 +02:00
deadprogram
13ed58950f
machine/usb/midi: add NoteOn, NoteOff, and SendCC methods for more complete API
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-21 11:05:53 +02:00
sago35
72137d663b
usb: adjust buffer alignment (samd21, samd51, nrf52840)
2022-07-20 08:05:52 +02:00
sago35
740134197e
samd51: add support for DAC1
2022-07-18 12:10:06 +02:00
Ayke van Laethem
610e7fd16a
boards: Add MCH2022 badge
...
I haven't fully tested this badge because I don't have the physical
hardware but I have followed the pinout from the website.
2022-07-16 08:31:22 +02:00
Ayke van Laethem
0a93347e1c
machine: reorder pin definitions to improve pin list on tinygo.org
2022-07-15 14:46:33 +02:00
Ayke van Laethem
411333327e
esp32c3: provide hardware pin constants
2022-07-15 14:46:33 +02:00
Ayke van Laethem
159f7ebbc3
esp32: provide hardware pin constants
2022-07-15 14:46:33 +02:00
Ayke van Laethem
153ff09cc5
esp8266: provide hardware pin constants like GPIO2
2022-07-15 14:46:33 +02:00
Ayke van Laethem
57cddf5657
clue: remove pins D21..D28
...
These pins do not appear in the pinout:
https://learn.adafruit.com/adafruit-clue/pinouts
2022-07-15 14:46:33 +02:00
Ayke van Laethem
6a35719594
avr: fix some apparent mistake in atmega1280/atmega2560 pin constants
2022-07-15 14:46:33 +02:00
Ayke van Laethem
20a46e1b28
nrf51: define and use P0_xx constants
...
This makes nrf51 consistent with nrf52 and other chips, which do provide
constants for hardware pin numbers.
I've also added the microbit to the smoketest because it is used on
play.tinygo.org. And removed PCA10040 and PCA10056 because they aren't
provided on play.tinygo.org anymore.
2022-07-15 14:46:33 +02:00
sago35
926c02b6ff
rp2040: reduced allocations
2022-07-15 09:41:32 +02:00
sago35
f370cd18fc
rp2040: add support for EnterBootloader()
2022-07-15 09:41:32 +02:00
sago35
a1d7cab080
rp2040: change volatile access to dpsram
2022-07-15 08:49:07 +02:00
deadprogram
15a9e2313a
machine/usb/midi: correct reference to handler function
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-14 13:25:34 +02:00
deadprogram
3c2d2a93d3
machine/usb: refactorings to move functionality under machine/usb package
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-14 07:20:50 +02:00
deadprogram
5fdb894760
usb: rename callback to handler to keep consistent
...
Signed-off-by: deadprogram <ron@hybridgroup.com>
2022-07-13 12:11:21 +02:00
sago35
8fed063820
usb: add support for midi
2022-07-12 19:13:12 +02:00
sago35
7afc47d67a
usb: add DTR and RTS to serialer interface
2022-07-12 16:22:16 +02:00
sago35
0bc7c2a61f
rp2040: add support for usb ( #2973 )
...
* rp2040: add support for usb
2022-07-12 15:41:56 +02:00
sago35
d434058aef
samd21,samd51,nrf52840: move usbcdc to machine/usb/cdc ( #2972 )
...
* samd21,samd51,nrf52840: move usbcdc to machine/usb/cdc
2022-07-10 11:33:52 +02:00
Kenneth Bell
1d99b1ed84
boards: add Challenger RP2040 LoRa
2022-07-08 13:01:14 +02:00
sago35
f1e6997018
atsamd21,atsamd51,nrf52840: improve usb-device initialization
2022-07-07 21:04:41 +02:00
sago35
335a7ad0b7
samd21,samd51,nrf52840: refactor handleStandardSetup and initEndpoint ( #2968 )
...
* samd21,samd51,nrf52840: refactor handleStandardSetup and initEndpoint
2022-07-07 16:43:57 +02:00
sago35
17deac116f
samd21,samd51,nrf52840: change usbSetup and sendZlp to public
2022-07-07 08:25:02 +02:00
Daniel Esteban
b112477e95
Initial support for XIAO RP2040
2022-07-06 22:23:47 +02:00
sago35
2fa24ef752
samd21,samd51,nrf52840: refactor usb initialization
2022-07-06 17:55:25 +02:00
sago35
fcefcb191c
samd21,samd51,nrf52840: unify bootloader entry process
2022-07-06 09:14:11 +02:00
sago35
ff7c71c99c
serial: use common initialization for serial
2022-07-05 20:53:37 +02:00
sago35
401bd89664
samd21, samd51: move USB-CDC code
2022-07-05 14:41:51 +02:00
sago35
1766746c60
rp2040: add usb settings
2022-07-04 13:17:54 +02:00