Testing your minidriver

The Biscayne board has a debug serial port that this minidriver example uses to receive bytes on. In order to test this driver, you should build an OS image that sets up TCP/IP and lets you telnet to the board. Since you're using the serial port as a data source, don't run the serial driver and don't put debug printouts or verbosity on procnto in your image. Once you have an image, you should burn it onto the onboard flash where you can boot from it.

Connect a NULL-modem cable between your Biscayne board and a host machine. The minidriver is running at 14400 baud, so make sure the host machine's serial port is also configured in this manner. On the host machine, begin sending characters to the serial port. Sample code should look like this:

...
uint8_t test_data[20] = {"012345678987654321"};
...

if ((fd = open("/dev/ser1", O_RDWR)) == -1)
{
   fprintf(stderr, "Unable to open device: %s (errno=%d\n", device, errno);
   return (-1);
}

for (;;)
{
write(fd, test_data + index, 1);
   index++;
   if (index == 19)
   index = 0;
}

This code sends a pattern of characters to the serial port so that the minidriver can capture data.

Now boot the Biscayne board and telnet to it. Once connected, you can run the sample full driver, mdrvr-sescif that does the following:

Since the mdrvr-serscif application is a sample serial driver, you don't need to run the devc-sersci driver.