Граф коммитов

498 коммитов

Автор SHA1 Сообщение Дата
ardnew
5279bebf57 move nRF52 ADC methods to common machine file 2021-02-01 12:25:18 +01:00
ardnew
7842e6940d Fix typo in ADC switch on config field Samples 2021-02-01 12:25:18 +01:00
ardnew
06f231468d
accept configuration struct for ADC parameters (#1533) 2021-01-31 14:54:27 -06:00
deadprogram
3d6921b0e1 machine/circuitplay-bluefruit: correct internal I2C pin mapping
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-01-31 14:10:18 +01:00
deadprogram
868933e67c machine/microbit-v2: correct mapping for all LED matrix pins
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-01-26 10:29:59 +01:00
Přemek Vyhnal
32a5d46c57
nice!nano board support (#1499)
machine/nice\!nano: add board support
2021-01-24 16:46:21 +01:00
Ayke van Laethem
154c7c691b stm32: use stm32-rs SVDs which are of much higher quality
This commit changes the number of wait states for the stm32f103 chip to
2 instead of 4. This gets it back in line with the datasheet, but it
also has the side effect of breaking I2C. Therefore, another (seemingly
unrelated) change is needed: the i2cTimeout constant must be increased
to a higher value to adjust to the lower flash wait states - presumably
because the lower number of wait states allows the chip to run code
faster.
2021-01-09 21:45:07 +01:00
Fauchon
65caf777dd
Support for STM32L0 MCUs and Dragino LGT92 device (#1561)
machine/stm32l0: add support for stm32l0 family and Dragino LGT92 Board
2021-01-08 22:27:25 +01:00
deadprogram
6ec868710b machine/microbit-v2: add initial support based on work done by @alankrantas thank you!
Signed-off-by: deadprogram <ron@hybridgroup.com>
2021-01-06 18:50:46 +01:00
Quentin Smith
0dcff35d3a machine/p1am-100: rename MISO/MOSI
This makes p1am-100 work again after commit d1c4ed6.
2021-01-06 13:35:30 +01:00
Quentin Smith
75f13491b6 Add support for the P1AM-100 (similar to Arduino MKR) 2021-01-06 00:36:57 +01:00
deadprogram
a5ee1ba4b3 machine/nrf52840: ensure that USB CDC interface is only initialized once
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-12-29 12:20:33 +01:00
Ayke van Laethem
cda5fffd98 nrf: use SPIM peripheral instead of the legacy SPI peripheral
This newer peripheral supports DMA (through EasyDMA) and should
generally be faster. Importantly for some operations: interrupts (within
255 byte buffers) will not interfere with the SPI transfer.
2020-12-22 14:41:06 +01:00
Ayke van Laethem
ce539ce583 nrf: refactor code a bit to reduce duplication
The nrf52 series is all very similar and copying the code only makes it
harder to maintain the code or to add more chips in the nrf52 series
(for example, the nrf52833 as used in the micro:bit v2).

This commit also has a small improvement regarding pins: it now includes
chip-level pin names (P0.00, P0.01, etc) to the machine package.
2020-12-22 14:41:06 +01:00
kenbell
43a31467d3
Nucleo f722ze (#1526)
machine/nucleo-f722ze: Add support for ST Micro NUCLEO-F722ZE
2020-12-15 06:51:35 +01:00
ardnew
7a4ccd916f
matrixportal-m4: Add support for board Adafruit Matrix Portal M4 (#1529)
machine/matrixportal-m4: add Adafruit Matrix Portal M4 board definition
2020-12-11 10:00:41 +01:00
fleshin
7abc67107d
sam: add support for the MKR1000 board 2020-12-03 00:33:23 +01:00
sago35
2540172cc5
atsam: add a length check to findPinPadMapping 2020-12-02 01:21:38 +01:00
Ayke van Laethem
9a7e633997 teensy36: add to smoketest
This required some changes to the UART code to get it to compile on Go
1.11.
2020-11-15 13:08:36 +01:00
ardnew
39b1f8b6f5 teensy40: UART: add missing godocs, rename Flush to Sync 2020-11-15 12:34:15 +01:00
ardnew
9aa50853b8 teensy40: add UART support 2020-11-15 12:34:15 +01:00
ardnew
3cdc110462 teensy40: use implicit const defs (PinMode/PinChange) 2020-11-13 07:53:16 +01:00
ardnew
7cc687d416 teensy40: Add GPIO external interrupt support 2020-11-13 07:53:16 +01:00
ardnew
6e24c86320 teensy40: remove FPU spec in target JSON list of cflags 2020-11-11 18:34:47 +01:00
ardnew
19a0270303 teensy40: refactor to remove unnecessary code and constants 2020-11-11 18:34:47 +01:00
ardnew
691185f5f4 teensy40: initial implementation 2020-11-11 18:34:47 +01:00
deadprogram
77c70d2758 machine/qtpy: add board definition for Adafruit QTPy
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-11-08 22:56:01 +01:00
Ayke van Laethem
7c4e83f5c0 machine: clarify caller's responsibility in SetInterrupt 2020-11-08 15:11:50 +01:00
jypelle
db27541b1a Fix #1483 2020-11-08 09:32:13 +01:00
Connor
6eeebfeb5c
WIP: Esp8266 Get Function (#1438)
machine/esp8266: add Pin Get() support
2020-10-22 20:58:44 +02:00
Ayke van Laethem
06564cbdb2 Switch default frequency to 4MHz
Let's use the same default frequency everywhere, for consistency.
It could be any frequency, but 4MHz is already used for other chips and
it seems like a reasonable frequency to me (not too fast for most chips
but still reasonably fast). Oh, and 4MHz is slow enough that it can be
inspected by a Saleae Logic 4 (that sadly has been discontinued).
2020-10-18 22:14:21 +02:00
Ayke van Laethem
47dc76fc34 nrf: give more flexibility in picking SPI speeds
Instead of only allowing a limited number of speeds, use the provided
speed as an upper bound on the allowed speed. The reasoning is that
picking a higher speed than requrested will likely result in malfunction
while picking a lower speed will usually only result in slower
operation.
This behavior matches the ESP32 at least.
2020-10-18 22:11:03 +02:00
deadprogram
d382f3a259 esp8266: add target for d1mini board and add pin mappings for SPI/I2C to help out implementers
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-10-17 19:57:53 +02:00
deadprogram
c7d8223ab7 machine/esp32, targets/esp32: correct board definitions for actual boards not processor variants, also define all labeled pins
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-10-14 21:48:48 +02:00
ardnew
3eb33dff5d
feather-stm32f405: add I2C support (#1378)
* machine/stm32f405: add initial I2C support
2020-10-14 18:00:24 +02:00
ardnew
9ad2315079
feather-stm32f405: add SPI support (#1377)
* machine/stm32f405: add SPI support
2020-10-02 20:05:58 +02:00
Ayke van Laethem
d39c7abb4d nrf: fix double stop signal in I2C 2020-09-27 15:21:54 +02:00
Daniel M. Lambea
9e61e6fe4d
nrf: add I2C error checking (#1392)
* machine/nrf: add I2C error checking
2020-09-26 09:20:43 +02:00
sago35
9245337ecf atsamd2x: fix BAUD value 2020-09-17 09:46:15 +02:00
sago35
8170f59440 atsamd5x: fix BAUD value 2020-09-17 09:46:15 +02:00
Olivier Fauchon
490e377bba bluepill: Enable stm32's USART2 for the board and map it to UART1 tinygo's device 2020-09-17 06:26:57 +02:00
Ayke van Laethem
5b81b835ba esp32: add SPI support 2020-09-14 12:24:46 +02:00
ardnew
a9a6d0ee63 add basic UART handler 2020-09-14 08:48:01 +02:00
Ayke van Laethem
19d5e05e37 esp32: configure the I/O matrix for GPIO pins
Only some pins (notably including GPIO2 aka machine.LED) have GPIO for
the default function 1. Other pins (such as GPIO 15) had a different
function by default. Function 3 means GPIO for all the pins, so always
use that when configuring a pin to use as a GPIO pin.

In the future, the mux configuration will need to be updated for other
functions such as SPI, I2C, etc.
2020-09-13 11:24:33 +02:00
ardnew
d1b470f04e remove UART/SPI vars until peripherals implemented 2020-09-11 09:09:02 +02:00
ardnew
7aaa9e45a6 add pin/bus doc comments, I2C pins 2020-09-11 09:09:02 +02:00
ardnew
cf6b544cd9 remove (or stub) UART/SPI/I2C peripheral code from initial feather-stm32f405 board support 2020-09-11 09:09:02 +02:00
ardnew
20a1c730a1 add STM32F405 machine/runtime, and new board/target feather-stm32f405 2020-09-11 09:09:02 +02:00
jreamy
04f65f1189
Adding support for the Arduino Zero (#1365)
* machine/arduino-zero: adding support for Arduino Zero

Co-authored-by: Ayke
Co-authored-by: Jack Reamy
2020-09-10 10:32:12 +02:00
Ayke van Laethem
2ce17a1892 esp8266: add support for this chip
Many thanks to cnlohr for the nosdk8266 project:
    https://github.com/cnlohr/nosdk8266
2020-09-09 19:17:11 +02:00