Page 1 of 1

SIO Library for Tails's SDK

Posted: July 21st, 2013, 4:56 pm
by Shendo
I've made a simple library for using the PS1's serial port with the Tails92's open source SDK.
It allows you to set up the transfer rate (bitrate/baud) and receive and send data via simple to use functions.

I also included a sio echo example which will show you how to properly use this library.
I have also contacted Tails92 so hopefully he will integrate this into his SDK. For now you can use it standalone.

Image

Re: SIO Library for Tails's SDK

Posted: July 23rd, 2013, 11:54 pm
by rsoft
Well done!
I have yet to test this but i'm sure it's going to work. ^^

Re: SIO Library for Tails's SDK

Posted: September 5th, 2013, 8:37 am
by legacy

Code: Select all


unsigned char ReadByteSIO()
{
        return *(unsigned char*)SIO_TX_RX;
}
this piece of code has no wait-uart-rx-till-ready ready, is it right ?
is it blocking by hardware ? it looks uncommon to me

Re: SIO Library for Tails's SDK

Posted: September 5th, 2013, 8:39 am
by Shendo
Yes. You need to check if there is any data to read in the buffer with CheckSIOInBuffer().

Re: SIO Library for Tails's SDK

Posted: September 5th, 2013, 8:44 am
by legacy
A data byte can be read when SIO_STAT.1=1

Code: Select all

uint8_t ReadByteSIO()
{
        while ( ((*SIO_STAT & 0x2)>>1) !=1 )
                {
                /* wait */
                }
        return *SIO_RX;
}