標題: 請教各位oled顯示圖片函數(shù) [打印本頁]

作者: egsresrhtrhrtst    時間: 2023-5-17 23:33
標題: 請教各位oled顯示圖片函數(shù)
/***********功能描述:顯示顯示BMP圖片128×64起始點坐標(x,y),x的范圍0~127,y為頁的范圍0~7*****************/
void OLED_DrawBMP(uint8_t x0, uint8_t y0,uint8_t x1, uint8_t y1,uint8_t BMP[])
{        
        unsigned int j=0;
        uint8_t x,y;

        if(y1%8==0)
                y=y1/8;      
        else
                y=y1/8+1;
       
        for(y=y0;y<y1;y++)
        {
                OLED_Set_Pos(x0,y);
                for(x=x0;x<x1;x++)
            {      
                    OLED_WR_Byte(BMP[j++],OLED_DATA);                   
            }
        }
}

想問一下各位,這個oled顯示圖片的函數(shù)怎么使用OLED_DrawBMP(0,0,127, 7,  )??我的圖片數(shù)組要怎么加入


作者: 最后一個夏天1    時間: 2023-5-18 08:39
函數(shù)最后一個變量填入你需要顯示圖片的數(shù)組名
作者: 暖西夏    時間: 2023-5-19 10:39
函數(shù)的最后一位參數(shù)是你的圖片定義的數(shù)組名稱




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1