sGUI  V1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
bitmap.c

Explains how to draw a bitmap to the LCD with the CARME-M4 kit.

/*
* This example shows how to draw a bitmap to the LCD.
* It must be a picture on the sdcard with the name ARM_24.bmp. This picture
* must be a bitmap with 24 bit color depth.
* A good program to generate such a picture is Gimp.
*/
#include <stm32f4xx.h>
#include <carme.h>
#include <ff.h>
#include <lcd.h>
#include <rtc.h>
FATFS main_fs;
int main(void) {
if (f_mount(&main_fs, "0:", 1) != FR_OK) {
return 1;
}
LCD_SetFont(&font_8x16);
LCD_DisplayStringCenterLine(1, "Bitmap Example");
LCD_BMP_DrawBitmap("ARM_24.bmp", 110, 50);
for (;;) {
}
return 0;
}