UART Receiver.
Adds to interface:
<name> : in std_logic
where <name> is c++ object name.
Any number of instances are allowed.
#include "fc_io.h"
#include "fc_system.h"
U32 ToSeg(char c);
int main()
{
tx << "Hello world!!\r\n";
U32 seg[4] = {0,0,0,0};
for (;;)
{
if( rx.NumValid() > 0 ) {
char b = rx.GetByte();
for(int i=3;i>=0;i--) {
if(i==0)
seg[i] = ToSeg(b);
else
seg[i] = seg[i-1];
sd.SetDisplay( seg[i], i );
}
tx << b;
}
}
}