Infinite loop on ARM in lcd_putcAtt

This commit is contained in:
bsongis
2012-03-23 18:00:07 +00:00
parent 5ff76b29b9
commit e3d9a29765
2 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -69,9 +69,9 @@ uint8_t lcd_lastPos;
void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
{
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
const pm_uchar *q = &font_5x8_x20_x7f[ + (c-0x20)*5];
const pm_uchar *q = &font_5x8_x20_x7f[ (c-0x20)*5];
bool inv = false;
if (mode & BLINK) {
@@ -91,7 +91,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
/* each letter consists of ten top bytes followed by
* by ten bottom bytes (20 bytes per * char) */
q = &font_10x16_x20_x7f[((uint16_t)c-0x20)*20];
for(char i=11; i>=0; i--) {
for (int8_t i=11; i>=0; i--) {
if (mode & CONDENSED && i<=1) break;
uint8_t b1=0, b2=0;
if (i>1) {
@@ -118,7 +118,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
}
uint8_t ym8 = (y % 8);
for (char i=5; i>=0; i--) {
for (int8_t i=5; i>=0; i--) {
uint8_t b = (i>0 ? pgm_read_byte(q++) : 0);
if (inv) b = ~b;
@@ -135,7 +135,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
}
}
void lcd_putc(uint8_t x,uint8_t y,const char c)
void lcd_putc(uint8_t x, uint8_t y, const unsigned char c)
{
lcd_putcAtt(x,y,c,0);
}
@@ -645,7 +645,7 @@ void lcdSendCtl(uint8_t val)
pioptr->PIO_SODR = LCD_CS1 ; // Deselect LCD
}
inline void lcd_init()
void lcd_init()
{
register Pio *pioptr ;
// /home/thus/txt/datasheets/lcd/KS0713.pdf
+10 -10
View File
@@ -81,17 +81,17 @@
extern uint8_t displayBuf[DISPLAY_W*DISPLAY_H/8];
extern uint8_t lcd_lastPos;
extern void lcd_putc(unsigned char x,unsigned char y,const char c);
extern void lcd_putcAtt(unsigned char x,unsigned char y,const unsigned char c,uint8_t mode);
extern void lcd_putc(uint8_t x,uint8_t y,const unsigned char c);
extern void lcd_putcAtt(uint8_t x,uint8_t y,const unsigned char c,uint8_t mode);
extern void lcd_putsAtt(unsigned char x,unsigned char y,const pm_char * s,uint8_t mode);
extern void lcd_putsAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t mode);
extern void lcd_putsiAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t mode);
extern void lcd_putsnAtt(unsigned char x,unsigned char y,const pm_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts(unsigned char x,unsigned char y,const pm_char * s);
extern void lcd_putsLeft(unsigned char y, const pm_char * s);
extern void lcd_putsn(unsigned char x,unsigned char y,const pm_char * s,unsigned char len);
extern void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts(uint8_t x,uint8_t y,const pm_char * s);
extern void lcd_putsLeft(uint8_t y, const pm_char * s);
extern void lcd_putsn(uint8_t x,uint8_t y,const pm_char * s,unsigned char len);
extern void lcd_outhex4(unsigned char x,unsigned char y,uint16_t val);
extern void lcd_outhex4(uint8_t x,uint8_t y,uint16_t val);
extern void lcd_outdezAtt(uint8_t x, uint8_t y, int16_t val, uint8_t mode=0);
extern void lcd_outdezNAtt(uint8_t x, uint8_t y, int16_t val, uint8_t mode=0, uint8_t len=0);
@@ -117,8 +117,8 @@ extern void putsTime(uint8_t x,uint8_t y, int16_t tme, uint8_t att, uint8_t att2
#define SOLID 0xff
#define DOTTED 0x55
extern void lcd_plot(unsigned char x, unsigned char y, uint8_t att=0);
extern void lcd_hline(unsigned char x, unsigned char y, uint8_t w, uint8_t att=0);
extern void lcd_plot(uint8_t x, uint8_t y, uint8_t att=0);
extern void lcd_hline(uint8_t x, uint8_t y, uint8_t w, uint8_t att=0);
extern void lcd_hlineStip(int8_t x, uint8_t y, uint8_t w, uint8_t pat, uint8_t att=0);
extern void lcd_vline(uint8_t x, int8_t y, int8_t h);
extern void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat);