A chap on IRC has asked if I can add support for the Mesa Hostmot2
UART drivers to control some hardware he is making.
(Which is an interesting application which uses the Mesa firmware on
non-Mesa hardware)

I can't decide how best to do it.

A conventional HAL interface could be created, with an individual HAL
pin for each element in the  FIFO, and allow a variable FIFO width and
depth shared by all UARTs, but that seems clunky and might not even be
very useful. It would certainly mean a lot of HAL wiring to connect it
all up to the analogue and digital I/O that it is driving through a
conversion component.

A version of the structure used by the  BSPI driver that I wrote could
be used, where a comp picks up a "handle" to an instance of the
function and the hm2 driver exports utility functions such as TRAM
registration and FIFO push/pull. This does require the changes that I
made for the BSPI driver, though, and I am not clear if that code will
be accepted into the main project.

Alternatively, it would be possible to not attempt to write a generic
HAL interface for the UARTs, and instead call a dedicated hm2 function
that only handles the specific hardware and creates the correct HAL
pins directly.  This is the simplest approach, but would be a unique
one-off version of EMC2. (and isn't something I feel particularly
interested in doing)

Does anyone have any opinions, or should I just pick one and run with it?

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to