Jump to content

thinkman

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by thinkman

  1. On 8/14/2017 at 2:11 AM, Nathanan Srisaard said:

    it works on mipsel (WRTNode2P board MT7628) openwrt, thank you.

    I hv modified send buffer to send at 32 bytes chunk instead of 128, it is MT7628 i2c bug

     

    // send buffer to oled (show)
    int oled_send_buffer(struct display_info *disp) {
            struct sized_array payload;
            uint8_t packet[129];
            int i;

            packet[0] = OLED_CTRL_BYTE_DATA_STREAM;
            payload.size = 33;
            payload.array = packet;

            for (int index = 0; index < 8; index++) {       
                    for(i=0;i<4;i++)
                    {
                            memcpy(packet+1, disp->buffer[index]+i*32, 32);
                            oled_send(disp, &payload);
                    }
            }
            return 0;
    }
     

    I had tried the code on my MT7688. But it gave me a surprise!!! The sh1106 could not be displayed normal,but the ssd1306 could be fine. But in the oled.h from the attachement, "#define OLED_SET_PAGE_ADDRESS 0xB0"  is there ,and i dont know what happen ,it seems that the "#define OLED_SET_PAGE_ADDRESS 0xB0" did not be useful.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines