Is anybody else working with the edbg feature of an http://www.microchip.com/developmenttools/ProductDetails/atsame70-xpld ?
It presents itself as a composite usb device, one of the interfaces is a virtual serial on com3 on win10. The sample blinks leds and puts strings to the serial. The atmel studio terminal window can connect to com3 and read the strings.
I'm trying
import serial
let port = newSerialPort("COM3")
port.open(115200, Parity.None, 8, StopBits.One)
var receiveBuffer = newSeq[char](1024)
while true:
let numReceived = port.read(addr receiveBuffer[0], 1)
echo numReceived
but I am not receiving anything in the nim program.
Thanks, Mark
Would be fine if you could provide a working C code, or maybe a working terminal (Putty) output.
If your module serial is https://github.com/euantorano/serial.nim/ then it may be wise to follow his suggestions:
proc read*(port: SerialPort, buff: var string): int32 =
So use a string as receive buffer, not a addr.
But maybe you use a very different serial module.