Hi all, i want use lush to acquire some data from medical device, so i have work on devices/serial to add read function by serial port.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#? (fd-read-byte <fd> <c>)
;; read unsigned byte, to file descriptor <fd>.
(de fd-read-byte (fd); c)
((-int-) fd)
(let* (
(monbyte 0)
(Resultat-Fonction-Lecture (to-int #{ read($fd, &$monbyte, 1) #}))
)
;(process-pending-events)?
((-ubyte-) monbyte)
monbyte
);fin du let
);fin def fonction
(dhc-make () fd-read-byte)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
But this function recquire that the lush program stop and wait caractere, and i'm not sure that i get all char from serial. Can it will be possible to get char, until the main program run and calculate other data?
Have a nice day ++
|