Project

General

Profile

Revision 1460

put lcd and rangefinder lookup tables into program space
removed TODO inline comments from wireless library

View differences:

lcd.c
33 33
 * @author Colony Project, CMU Robotics Club
34 34
 **/
35 35
#include <avr/io.h>
36
#include <avr/pgmspace.h>
37

  
36 38
#include "lcd.h"
37 39
#include "time.h"
38 40

  
......
56 58
/*
57 59
  FontLookup - a lookup table for all characters
58 60
*/
59
static const unsigned char FontLookup [][5] =
61
static const unsigned char FontLookup [][5] PROGMEM =
60 62
  {
61 63
    { 0x00, 0x00, 0x00, 0x00, 0x00 },  // sp
62 64
    { 0x00, 0x00, 0x5f, 0x00, 0x00 },   // !
......
215 217
 * Prints a character on the LCD screen. lcd_init
216 218
 * must be called before this function may be used.
217 219
 *
220
 * Note: pgm_read_byte() is untested
221
 *
218 222
 * @param c the character to print
219 223
 *
220 224
 * @see lcd_init
......
223 227
  int i;
224 228
	
225 229
  for (i = 0; i < 5; i++)
226
    lcd_putbyte(FontLookup[c-32][i]);
230
    lcd_putbyte(pgm_read_byte(&(FontLookup[c-32][i])));
227 231
  lcd_putbyte(0);
228 232
}
229 233

  

Also available in: Unified diff