Can you rename usb_serial_data_available to serial_usb_data_available so it matches the others?
eg: serial_hw_data_available Matt. On Oct 1, 4:33 am, Sebastien Lelong <[email protected]> wrote: > Hi guys, > > As Matt mentioned several days/weeks/months ago, there's a kind of > assymmetry between serial software/hardware and USB serial. For our comm. > libs, we've defined pseudo-vars for reading/writing, and another one used to > know if some data is available. Namely serial_{hw,sw}_available. > > For USB serial, reading/writing pseudo-vars exist, but not any > usb_serial_data_available. I had a look at usb_serial.jal and created this > function. > > function usb_serial_data_available'get() return bit is > if ( usb_cdc_line_status() == 0x00 ) then > return false > end if > > if ( !usb_cdc_rx_avail() ) then > return false > end if > > return true > end function > > Basically it says that the serial line should opened and some data should be > available. > > Body is actually a copy paste from function _usb_serial_read. I hesitate to > refactor, this would eat one stack level (I don't think pragma inline would > be a good idea here). As a result, there's a duplication of code... > > What's your opinion ? Should I commit "as-is" ? > > Cheers, > Seb -- 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.
