OK, then why not, but "CDC status != 0" really means "port is opened", or maybe just "available" or something else ? I guess since this pseudo-variable will be defined in usb_serial.jal (won't it ?), we can stick to "port opened" meaning...
Cheers, Seb 2010/10/8 mattschinkel <[email protected]> > > This is mostly a matter of semantic, using a pseudo-variable may sound > > overkill ? > > Actually my compile result is one less byte of ram compared to the > usb_cdc_line_status() procedure. Of course I am returning a bit > instead of a byte. > > function usb_serial_port_is_open'get() return bit is > pragma inline > if cdc_line_status == 0 then > return 0 > else > return 1 > end if > end function > > -- wait till USB device has been connected and serial port has been > opened by the HOST > while !usb_serial_port_is_open loop > usb_serial_flush() -- poll USB at all times > end loop > > Matt. > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<jallib%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/jallib?hl=en. > > -- Sébastien Lelong http://www.sirloon.net http://sirbot.org -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
