' ' simple smart pin serial demo for P2 Eval board ' CON oscmode = $010c3f04 freq = 160_000_000 baud = 2_000_000 OBJ ser: "CogSerial.spin2" PUB demo | c clkset(oscmode, freq) ser.start(63, 62, 0, baud) ser.str(string("Hello world",13,10)) ser.tx(13) ser.tx(10) repeat c := ser.rx 'either or 'if (c:=ser.rxcheck)>-1 'either or ser.tx(c) ser.tx(c) ser.tx(c) ser.tx(13) ser.tx(10)