This shows you the differences between two versions of the page.
Last revision Both sides next revision | |||
using_serial_ports_in_linux [2022/03/03 11:20] richardrussell created |
using_serial_ports_in_linux [2022/03/04 15:04] richardrussell |
||
---|---|---|---|
Line 11: | Line 11: | ||
So to avoid your BASIC program ' | So to avoid your BASIC program ' | ||
- | //BBC BASIC for Windows// provides built-in features to configure a serial port (as an extension of the **OPENUP** function) and to test for how much data is waiting in an input buffer (**EXT#** function), but //BBC BASIC for SDL 2.0// does not (because SDL 2.0 itself, which BBCSDL relies on to provide the cross-platform abstraction layer, doesn' | + | To configure and open a serial port in Linux you should use code similar to the following (in this case the port **/ |
- | + | ||
- | To configure and open a serial port in Linux you should use code similar to the following (in this case the port **/ | + | |
<code bb4w> | <code bb4w> | ||
Line 21: | Line 19: | ||
</ | </ | ||
- | To test how much data is ' | + | To test how much data is ' |
<code bb4w> | <code bb4w> | ||
- | | + | |
- | LOCAL F% | + | |
- | | + | REM Do something with the data here |
- | | + | |
- | = N% | + | REM Continue with any background tasks |
</ | </ | ||