Как бы я перебрал эти 5 массивов при вызове функции?Прямо сейчас я просто вручную перебираю каждый из них, чтобы сформировать определенный символ
const unsigned char pattern1bar[8]={0x10,0x10,0x10,0x10,0x10,0x10,0x10};
const unsigned char pattern2bar[8]={0x18,0x18,0x18,0x18,0x18,0x18,0x18};
const unsigned char pattern3bar[8]={0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c};
const unsigned char pattern4bar[8]={0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e};
const unsigned char pattern5bar[8]={0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f};
void LCD_build(int custom, int cursor, const unsigned char *x,const unsigned char x2, int cgdisplay){
writeLCD(custom,0,0,1); // 1) set custom gram address location
unsigned char i;
for( i= 0; i <x2; i++)
writeLCD(x[i],1,0,1);
writeLCD(cursor,0,1,1); // 3) set cursor to location you want to write to
writeLCD(cgdisplay,1,1,1); // 4) display cgram(0x00) custom character at current cursor location
DELAY_MS(800);
};
//function call
LCD_build(0x40,0x80,pattern1bar,8,0x00);
LCD_build(0x40,0x80,pattern2bar,8,0x00);
LCD_build(0x40,0x80,pattern3bar,8,0x00);
LCD_build(0x40,0x80,pattern4bar,8,0x00);
LCD_build(0x40,0x80,pattern5bar,8,0x00);