Browse Source

define charset array from 32...126, so we don't have to decrement the index with 32 anymore in procedure lcd_ascii57()

master
T. Meissner 11 years ago
parent
commit
e0254e8b85
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      st7565-lcd/raspilcd.adb
  2. +1
    -1
      st7565-lcd/raspilcd.ads

+ 1
- 1
st7565-lcd/raspilcd.adb View File

@ -52,7 +52,7 @@ package body RaspiLcd is
lcd_set_page(page => ypos, column => xpos); lcd_set_page(page => ypos, column => xpos);
-- write one 5x7 char -- write one 5x7 char
for index in 0..4 loop for index in 0..4 loop
lcd_transfer_data(value => font_5x7(character'pos(data) - 32)(index), si => true);
lcd_transfer_data(value => font_5x7(character'pos(data))(index), si => true);
end loop; end loop;
-- one free column between chars -- one free column between chars
lcd_transfer_data(value => 16#00#, si => true); lcd_transfer_data(value => 16#00#, si => true);


+ 1
- 1
st7565-lcd/raspilcd.ads View File

@ -14,7 +14,7 @@ package RaspiLcd is
-- character set -- character set
font_5x7 : constant byte_byte_array := (
font_5x7 : constant byte_byte_array (32 .. 126) := (
( 16#00#, 16#00#, 16#00#, 16#00#, 16#00# ), -- - 16#20 - 32 ( 16#00#, 16#00#, 16#00#, 16#00#, 16#00# ), -- - 16#20 - 32
( 16#00#, 16#00#, 16#5f#, 16#00#, 16#00# ), -- ! - 16#21 - 33 ( 16#00#, 16#00#, 16#5f#, 16#00#, 16#00# ), -- ! - 16#21 - 33
( 16#00#, 16#07#, 16#00#, 16#07#, 16#00# ), -- " - 16#22 - 34 ( 16#00#, 16#07#, 16#00#, 16#07#, 16#00# ), -- " - 16#22 - 34


Loading…
Cancel
Save