This is the first running Version, not really optimized.
It is a replacement for smartserial in spin2gui. I runs on its own cog and uses lut as send and receive buffer.
Currently I am saving bytes in longs giving 255 bytes send buffer and 255 bytes receive buffer. This will be optimized soon and either gives 4 times the buffer or 2 pairs of 2 times but for two pairs of send/receive. Not sure yet.
I am using a interrupt for receiving, but was not able yet to use a interrupt for sending thus sends are done by the cog itself.
It has a extended start method StartEx where one can also provide the smartpin selector mode and baud rate for each send and receive channel, thus it is possible to send at say 115_200 and receive at 230_400 for example.
Besides the Spin stub the cogSerial driver needs a 4 long long mailbox to communicate, like JDserial it is easy usable from assembler. Or it will be.
Because for some #@$@#%$
@ reason I can not get fastspin to start my cog with a mailbox address as parameter and have to manually patch the needed parameter in my start method into the DAT block before loading the COG.
There is still some work to do to make it nicer, but as is it works.
I have no clue as how fast it will work, I am just testing it from fastspins terminal right now
I am just another Code Monkey
A determined coder can write COBOL programs in any language. -- Author unknown.
Press any key to continue, any other key to quit
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119