[Cuis-dev] UART support in Cuis ?

ken.dickey at whidbey.com ken.dickey at whidbey.com
Fri Jan 20 07:05:28 PST 2023


Svan,

Sorry for the delay.  I was hoping someone more knowledgable might 
respond.

You found a complex topic - interfacing with devices and device drivers.

Generally, device (UART, FrameBuffer, ..) manufacturers or OS folks 
write device drivers which turn device access into a more 
"packaged"/abstract form.  E.g. "ports" or "sockets".

AN example of this is _libevdev_
    https://www.freedesktop.org/wiki/Software/libevdev/

There are three basic strategies to deal with this in Smalltalk

[A] Write a plugin [ note https://wiki.squeak.org/squeak/1448 and look 
at the VectorGraphics plugin]

[B] Using the FFI [Foreign Function Interface] to make direct calls
     
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/AQuickOrientationToFFIFromSmalltalk.md

[C] Architect the runtime system to do this [Note SqueakNOS]
     https://squeaknos.sourceforge.net/Article-2.html
     https://sourceforge.net/p/squeaknos/git/ci/master/tree/
     http://squeaknos.blogspot.com/

You peobably want to read "FFI or VM Plugins, what to use?"
     
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/FFIorVMPluginsWhatToUse.md

Also, you should look at how the keybaord amd mouse interrupts are 
transliterated into Smalltalk events in Cuis.

So the short answer is that you will be able to do what you want, but 
you may have to know quite a bit about a device and write the "glue 
code" to let Smalltalk code access it.

HTH,
-KenD

On 2023-01-18 21:54, Sven Nurber via Cuis-dev wrote:
> Hi.  I'm interested in interfacing with a device that has a custom
> serial protocol and displaying data graphically.  I think Cuis could
> be a good fit, but I don't see anything in stock image ( latest ) that
> would indicate there is serial port/UART support ?  I do see a github
> package named Cuis-Smalltalk-SerialPort but any attempt to load via
> directions on github readme fails.  Furthermore following Cuis
> installation directions with latest image & vm any attempt to load
> "Package Downloader" where I'm guessing such packages might reside
> results in repeated prompts to "Download list of packages" and a
> Morphic UI error.
> 
> Sven


More information about the Cuis-dev mailing list