add HardwareSerial and SoftwareSerial for Re-ARM.

HardwareSerial has been tested on Uart0 (debug header) and Uart3 (i2c connector)
Software Serial has been tested to work bi-directionally at 9600 and 115200
using pins 6 and 63 on J5, and unidirectionally (write only) at 250000.
The code used to test was Teemuatlut's tmc2208 patch, and a few small changes to main used to echo recieved chars back to a host pc.
This commit is contained in:
kfazz
2017-08-22 10:30:33 -04:00
committed by Scott Lahteine
parent 01fb45b4f8
commit 18f97c4013
11 changed files with 2246 additions and 1 deletions

View File

@@ -95,6 +95,50 @@ const adc_pin_data adc_pin_map[] = {
r == 54 ? 1 :\
r == 60 ? 1 : 0)
#define NUM_INTERRUPT_PINS 35
#define INTERRUPT_PIN(r) ( r< 0 ? 0 :\
r == 0 ? 1 :\
r == 1 ? 1 :\
r == 8 ? 1 :\
r == 9 ? 1 :\
r == 10 ? 1 :\
r == 12 ? 1 :\
r == 16 ? 1 :\
r == 20 ? 1 :\
r == 21 ? 1 :\
r == 24 ? 1 :\
r == 25 ? 1 :\
r == 26 ? 1 :\
r == 28 ? 1 :\
r == 34 ? 1 :\
r == 35 ? 1 :\
r == 36 ? 1 :\
r == 38 ? 1 :\
r == 46 ? 1 :\
r == 48 ? 1 :\
r == 50 ? 1 :\
r == 51 ? 1 :\
r == 52 ? 1 :\
r == 54 ? 1 :\
r == 55 ? 1 :\
r == 56 ? 1 :\
r == 57 ? 1 :\
r == 58 ? 1 :\
r == 59 ? 1 :\
r == 60 ? 1 :\
r == 61 ? 1 :\
r == 62 ? 1 :\
r == 63 ? 1 :\
r == 67 ? 1 :\
r == 68 ? 1 :\
r == 69 ? 1 : 0)
/*Internal SD Card */
/*r == 80 ? 1 :\
r == 81 ? 1 :\
r == 82 ? 1 :\
r == 83 ? 1 :\*/
const pin_data pin_map[] = { // pin map for variable pin function
{0,3}, // DIO0 RXD0 A6 J4-4 AUX-1
{0,2}, // DIO1 TXD0 A7 J4-5 AUX-1