Revision: 1714
Author: jsuijs
Date: Sat Feb 27 05:28:00 2010
Log: optimized stack use of lcd library (one down) upon request of Vasile.
http://code.google.com/p/jallib/source/detail?r=1714
Modified:
/trunk/include/external/lcd/lcd_hd44780_4.jal
/trunk/include/external/lcd/lcd_hd44780_common.jal
=======================================
--- /trunk/include/external/lcd/lcd_hd44780_4.jal Tue Feb 2 12:38:49 2010
+++ /trunk/include/external/lcd/lcd_hd44780_4.jal Sat Feb 27 05:28:00 2010
@@ -101,6 +101,8 @@
-- (this procedure is only used inside this library)
--
----------------------------------------------------------------------------
procedure __lcd_write( byte in value ) is
+ pragma inline
+
__lcd_write_nibble(value >> 4) -- write high nibble
__lcd_write_nibble(value) -- write low nibble
delay_10us(4) -- > 37 us
@@ -111,6 +113,8 @@
-- Sends data byte in <value> to LCD
--
----------------------------------------------------------------------------
procedure _lcd_write_data(byte in value) is
+ pragma inline
+
lcd_rs = high -- select instruction
__lcd_write( value ) -- output byte
end procedure
@@ -121,7 +125,8 @@
-- For slow commands an extra delay should be added
--
----------------------------------------------------------------------------
procedure _lcd_write_command(byte in value) is
-; pragma inline
+ pragma inline
+
lcd_rs = low -- select instruction
__lcd_write( value ) -- output byte
end procedure
=======================================
--- /trunk/include/external/lcd/lcd_hd44780_common.jal Tue Feb 2 12:38:49
2010
+++ /trunk/include/external/lcd/lcd_hd44780_common.jal Sat Feb 27 05:28:00
2010
@@ -60,7 +60,9 @@
-- _lcd_restore_cursor - sets the cursor to the position in the shadow
register
-- (this routine is only used inside this file)
--
----------------------------------------------------------------------------
-procedure _lcd_restore_cursor() is
+procedure _lcd_restore_cursor() is
+ pragma inline
+
-- set LCD back to normal operation
_lcd_write_command( lcd_set_ddram_address | lcd_pos )
end procedure
@@ -69,7 +71,8 @@
--
----------------------------------------------------------------------------
-- lcd_write_char - write one char to LCD
--
----------------------------------------------------------------------------
-procedure lcd_write_char(byte in data) is
+procedure lcd_write_char(byte in data) is
+ pragma inline
_lcd_write_data(data)
end procedure
@@ -78,7 +81,6 @@
-- lcd'put - write one char to screen (pseudo var, enables streams)
--
----------------------------------------------------------------------------
procedure lcd'put(byte in data) is
-; pragma inline -- disabled due to complier bug with inline +
pseudovar/arrays.
_lcd_write_data(data)
end procedure
@@ -156,6 +158,8 @@
-- lcd_clear_screen - clears the LCD
--
----------------------------------------------------------------------------
procedure lcd_clear_screen() is
+ pragma inline
+
_lcd_write_command(LCD_CLEAR_DISPLAY)
delay_10us( 180 )
end procedure
--
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.