I assume you are speaking of this procedure in lcd_hd44780_common.jal: procedure lcd_write_char(byte in data) is pragma inline _lcd_write_data(data) end procedure What I remember from past compiler versions is that using inline here would be a good thing, and save 1 byte of data and some code. This would have used the same amount of space as if you were only using _lcd_write_data directly. If this is not the case, maybe kyle can fix it. A solution for you now may be to use _lcd_write_data instead of lcd_write_char. A solution to deminish the affect of inline is to wrap lcd_write_char into a new procedure without inline. Put this in your code of course, not the lib. procedure lcd_write_char_no_inline(byte in data) is lcd_write_char(data) end procedure Rob, procedures like lcd_write_data or lcd_write_nibble sound like they should use inline for speed purposes. When I was working with my color GLCD, i noticed a huge visible difference in speed since my glcd had a lot of pixels to write to. The size of my screen is 320x240, so that is 76800 writes to clear the screen with a loop. I suppose the same issue may not occur on hd44780 due to less pixels. It would be interesting to know the speed difference clearing the screen using the stopwatch library. Matt.
On Friday, December 28, 2012 10:34:56 PM UTC-5, Mike K wrote: > I've been using the LCD library lately and noticed that each additional > lcd_write_char() call adds to the data area used. The library shows that > the functions are all declared as "pragma inline". Do we need to do this? > It seems to defeat the purpose of reusable code. When I remove the pragmas > the code and data areas used drops dramatically and still functions as > expected. > > Regards, > Mike > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To view this discussion on the web visit https://groups.google.com/d/msg/jallib/-/nRZulHBiufEJ. 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.
