پاسخ : فایل اکسپلورر mmc به وسیله arm
یکم با هدر هاش ور برو احتمالا درست میشه
یکم با هدر هاش ور برو احتمالا درست میشه

while ((ch = fgetc (f)) != EOF) { index++; if (index == 11) bmp_code_index = ch; else if (index == 19) image_wi += ch; else if (index == 20) image_wi |= (ch<<8); else if (index == 23) image_hi += ch; else if (index == 24) image_hi |=(ch<<8); else if (index == 29) image_color = ch; else if (index == 30) { // end reguire description . init LCD if (image_wi>240 | image_hi>320 | (image_color !=24 && image_color !=16)){ tftlcd_gotoxy(0,1); sprintf(buffer,"%i * %i 0x%xbit",image_wi,image_hi,image_color); tftlcd_puts(buffer,BLACK,RED,1); tftlcd_gotoxy(0,2); tftlcd_putsf("This Format Not Supported",BLACK,RED,1); return 0; }else { tftlcd_init_hispeed(0,image_wi-1,0,image_hi-1); TFTLCD_RS_HIGH; } }else if (index>bmp_code_index){ lcd_data = 0; if (image_color == 24) { lcd_data = (ch&0xF1)<<8; lcd_data |= (fgetc(f)&0xFC)<<4; lcd_data |= (fgetc(f))>>3; }else if (image_color == 16) { lcd_data = ch << 8; lcd_data |= fgetc(f); } TFTLCD_CS_LOW; TFTLCD_WR_LOW; TFTLCD_DATAPORT_CLEAR; _TFTLCD_DATAPORT_SODR_ = (lcd_data << TFTLCD_DATAPORT_OFFSET); TFTLCD_WR_HIGH; TFTLCD_CS_HIGH; } } sprintf(buffer,"%i * %i 0x%xbit",image_wi,image_hi,image_color); tftlcd_gotoxy(0,19); tftlcd_puts(buffer,BLACK,RED,1); } fclose (f); /
tftlcd_write_index_register(TS_INS_RESIZE_CTRL); tftlcd_write_wdr(0x0003); tftlcd_write_index_register(TS_INS_HOR_START_AD); tftlcd_write_wdr(0x0000); tftlcd_write_index_register(TS_INS_HOR_END_AD); tftlcd_write_wdr(0x0077); tftlcd_write_index_register(TS_INS_VER_START_AD); tftlcd_write_wdr(0x0000); tftlcd_write_index_register(TS_INS_VER_END_AD); tftlcd_write_wdr(0x009F);
دیدگاه