From: MagerValp (MagerValp_at_cling.gu.se)
Date: 2001-11-05 16:41:05
>>>>> "gpz" == groepaz <groepaz_at_gmx.net> writes:
gpz> BTW... different thing... is there already some header file that
gpz> defines an api for serial-port access? i have just recently made
gpz> the serial routines for the silversurfer (serial port for use
gpz> with the new retro-replay hardware) and since i am going to write
gpz> some debugging-stub using that for cc65 anyway (atm its just pure
gpz> asm) i'd be glad to do it in a way so other ppl can re-use those
gpz> pieces of code.... however, if there's no api defined for now,
gpz> mine looks like
gpz> sio_init(portname,baudrate); /* init port, return 0 on success or -1 on error) */
Might I suggest that you add controls for word length, stop bits and
parity as well? And is baudrate a long or a named constant? 115200 and
up doesn't fit in an int.
gpz> sio_readbyte(); /* waits until character arrives and returns it */
gpz> sio_readbyte_nowait(); /* if character is waiting, returns it. otherwhise return 0 */
gpz> sio_writebyte(val); /* send byte, waits until byte has been send */
gpz> all routines incorporate a timeout, and they set the global
gpz> variables sio_readerr and sio_writerr for further error-handling.
Can you control the timeout value?
Just wrote a small driver that allows the C64 to use the PC's HD using
a SwiftLink and a null modem cable the other night. Right now it just
supports load"file",6, load"$",6, and load"dir",6 (to change
directory). CD:ing into a D64 is halfway done. The C64 side is just
$110 bytes of code but if I decide to add some more exotic features
(like a nice menu controlled D64 reader/writer) I'd prefer doing it in
C. Hey, I'd even have a stab at writing the first real app for cc65 :)
Oh, the server side is written in Perl and should work on both Win32
(use Win32::SerialPort;) and Unix (use Device::SerialPort;).
--
___ . . . . . + . . o
_|___|_ + . + . + . . Per Olofsson, konstnär
o-o . . . o + MagerValp_at_cling.gu.se
- + + . http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:43 CET