From e0254e8b85bb973e31f350e20c4c402060153c3b Mon Sep 17 00:00:00 2001 From: tmeissner Date: Tue, 14 Jan 2014 23:32:09 +0100 Subject: [PATCH] define charset array from 32...126, so we don't have to decrement the index with 32 anymore in procedure lcd_ascii57() --- st7565-lcd/raspilcd.adb | 2 +- st7565-lcd/raspilcd.ads | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/st7565-lcd/raspilcd.adb b/st7565-lcd/raspilcd.adb index e1e2e66..89774da 100644 --- a/st7565-lcd/raspilcd.adb +++ b/st7565-lcd/raspilcd.adb @@ -52,7 +52,7 @@ package body RaspiLcd is lcd_set_page(page => ypos, column => xpos); -- write one 5x7 char 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; -- one free column between chars lcd_transfer_data(value => 16#00#, si => true); diff --git a/st7565-lcd/raspilcd.ads b/st7565-lcd/raspilcd.ads index 8234b7e..d1797e4 100644 --- a/st7565-lcd/raspilcd.ads +++ b/st7565-lcd/raspilcd.ads @@ -14,7 +14,7 @@ package RaspiLcd is -- 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#5f#, 16#00#, 16#00# ), -- ! - 16#21 - 33 ( 16#00#, 16#07#, 16#00#, 16#07#, 16#00# ), -- " - 16#22 - 34