Optimization of OLED graphic display module with SSD1306 controller - #44
Optimization of OLED graphic display module with SSD1306 controller#44oleksii-kogutenko wants to merge 1 commit into
Conversation
5785feb to
c264e2e
Compare
* update Makefile * use compatible am335x-bone-common.dtsi with mpu6050 * add i2c1 support added to dtsi * move defines to header file * optimization screen updater: - use "page addressing mode" for memory mode - send only modyfied bytes over i2c
c264e2e to
a13a50f
Compare
|
Debugs from optimization log: |
| { | ||
| u8 type; | ||
| u8 data[LCD_WIDTH * LCD_HEIGHT / 8]; | ||
| } ssd1306_data_array; |
There was a problem hiding this comment.
Is it intended to be used in external modules?
| size_t count, loff_t *ppos); | ||
| static int ssd1307fb_blank(int blank_mode, struct fb_info *info); | ||
| static void ssd1307fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); | ||
| static void ssd1307fb_copyarea(struct fb_info *info, const struct fb_copyarea *area); |
There was a problem hiding this comment.
+static int ssd1307fb_blank(int blank_mode, struct fb_info *info); +static void ssd1307fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); +static void ssd1307fb_copyarea(struct fb_info *info, const struct fb_copyarea *area); +static void ssd1307fb_imageblit(struct fb_info *info, const struct fb_image *image);
static in the header file? what for?
DevyatovAndrey
left a comment
There was a problem hiding this comment.
Please fix checkpatch issues and make some clean up
| if( (draw_x1>=0)&&(draw_y1>=0) ){ | ||
| Graphic_setPoint(draw_x1, draw_y1); | ||
| } | ||
| if( (draw_x2<=127)&&(draw_y2<=63) ){ |
There was a problem hiding this comment.
Aren't you confused with these "magic numbers"?
| if( 0 == r) | ||
| return; | ||
|
|
||
| // calculate 8 special point(0��45��90��135��180��225��270degree) display them |
There was a problem hiding this comment.
Please make a clean up - remove unnesessary comments/lines
| * __u16 capabilities; // see FB_CAP_* | ||
| * __u16 reserved[2]; // Reserved for future compatibility | ||
| * }; | ||
| * */ |
There was a problem hiding this comment.
I believe this large bunch of dead code is unnesessary and could be deleted
| /* ****************************************************************** | ||
| * | ||
| * *****************************************************************/ | ||
| int ssd1306_UpdateScreen_old(struct ssd1306_data *drv_data) |
There was a problem hiding this comment.
Looks like this function is redunant
| } | ||
|
|
||
| //ssd1306_sendDataArea(drv_client, dataArray.data, sizeof(dataArray.data), 0); | ||
| //memcpy(&dataArray_lcd, &dataArray, sizeof(dataArray)); |
There was a problem hiding this comment.
if possible -please fix checkpatch issues and remove unnesessary comments
| } | ||
|
|
||
| diff = get_jiffies_64() - jiff; | ||
| pr_info ("diff: %lld\n", diff); ///diff: 6 |
There was a problem hiding this comment.
I think time consumption could be hidden into debug defines
| ssd1306_first_start++; | ||
| } else { | ||
| while (cur_pos < msize) { | ||
| while (cur_pos < msize && dataArray.data[cur_pos] == dataArray_lcd.data[cur_pos]) |
There was a problem hiding this comment.
Good point to calculate positions in buffer to update!
Uh oh!
There was an error while loading. Please reload this page.