Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

serial-close close the RS232 serial port

Parameter Description
dev Serial device obtained from rs232-try

Example

Example 1: The connection closing callback function from apps/SerialDemo/main.scm

(define (close-callback g w t x y)
  (if serialport 
    (begin 
      (serial-close serialport)
      (glgui-widget-set! g w 'color DarkGreen)
    )
    (glgui-widget-set! g w 'color DarkGrey)
  )
  (glgui-widget-set! g open-button 'color White)
)
Clone this wiki locally