C equivalent of "multi_uart_rx_8chan.S" in UART Library

If you have a simple question and just want an answer.
Post Reply
StrandBeast
Junior Member
Posts: 5
Joined: Tue Jul 26, 2016 7:34 am

C equivalent of "multi_uart_rx_8chan.S" in UART Library

Post by StrandBeast »

Hi Guys,

I wanted to know why multi uart functions needed a clock. So, I was going through UART library and came across this file "multi_uart_rx8chan.S" in the source code of UART lib. I guess that's where the actual data reading occurs but unfortunately it is in assembly language. So, Can someone provide me its "C" equivalent. It was in \lib_uart\src.

Thank you


User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

I'm afraid this is hand written code. It seems it is quite difficult to fit receive of 8 UARTs in one logical core that works up to 115,200 baud.
StrandBeast
Junior Member
Posts: 5
Joined: Tue Jul 26, 2016 7:34 am

Post by StrandBeast »

That codes begins with this:
// Copyright (c) 2016, XMOS Ltd, All rights reserved
/* WARNING - This is an autogenerated file - it is recommended to edit
* the templates that it was edited from. Please see the /gen directory
* of this module for details
*/

/*
* This function handles UART port RX (Autogenerated for unrolling)
*/

It says its an auto-generated file and to edit it, it is recommended to edit the templates. Can you please comment something on it?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Generation in this case means making version for the different channel counts, CHAN_COUNT of 1 through to 8.

I don't have the generation source, but am sure that you would only need it to make a version that supports more than 8 channels.

Body of the code will be largely the same, judging from code comments.
Post Reply