资源简介
2.4寸SPI液晶屏模块程序,ILI9341最少占用9个IO,独家资料
代码片段和文件信息
/**********************************************************************************************
Copyright (c) 2014 DisplayModule. All rights reserved.
Redistribution and use of this source code part of this source code or any compiled binary
based on this source code is permitted as long as the above copyright notice and following
disclaimer is retained.
DISCLAIMER:
THIS SOFTWARE IS SUPPLIED “AS IS“ WITHOUT ANY WARRANTIES AND SUPPORT. DISPLAYMODULE ASSUMES
NO RESPONSIBILITY OR LIABILITY FOR THE USE OF THE SOFTWARE.
********************************************************************************************/
#include “DmDrawBmpbase.h“
void DmDrawBmpbase::printBmpHeaderInfo() {
Serial.print(F(“Image size: “));
Serial.println(_fileSize DEC);
Serial.print(F(“Image offset: “));
Serial.println(_bitmapOffset DEC);
Serial.print(F(“Image size: “));
Serial.print(_width DEC);
Serial.print(F(“ “));
Serial.println(_height DEC);
Serial.print(F(“BitsPerPixel: “));
Serial.println(_bitsPerPixel DEC);
Serial.print(F(“Compression: “));
Serial.println(_compression DEC);
Serial.print(F(“Is 24-bit bmp: “));
Serial.println(IsValid888Bitmap());
Serial.print(F(“Is 16-bit 565 bmp: “));
Serial.println(IsValid565Bitmap());
Serial.print(F(“Has 565 color mask: “));
Serial.println(Is565ColorMask());
}
boolean DmDrawBmpbase::readBmpHeader() {
if (read16() !=0x4D42){ // read magic byte
return false;
}
_fileSize = read32();
read32(); // Value depends on application which created the image
_bitmapOffset = read32();
// read DIB header
_headerSize = read32();
_width = readInt32();
_height = readInt32();
if (read16() != 1) { // number of color planes must be 1
return false;
}
_bitsPerPixel = read16();
_compression = read32();
if (_bitmapOffset == 66 || _bitmapOffset == 70) { // V3 or v2 format
setPosition(54);
_redMask = read32();
_greenMask = read32();
_blueMask = read32();
}
else {
_redMask = 0x00;
_greenMask = 0x00;
_blueMask = 0x00;
}
if (!IsValid888Bitmap() && !IsValid565Bitmap())
{
return false;
}
return true;
}
// In this context a valid bitmap
// - Stored bottom to top
// - 24-bit file
// - No compression
boolean DmDrawBmpbase::IsValid888Bitmap() {
if (_height > 0 && _bitsPerPixel == 24 && _compression == 0)
{
return true;
}
return false;
}
// In this context a valid bitmap
// - Stored top to bottom
// - 16-bit file
// - Compression 3 (BI_BITFIELDS)
// - Have a 565 Colormask
boolean DmDrawBmpbase::IsValid565Bitmap() {
if (_height < 0 && _bitsPerPixel == 16 && _compression == 3 && Is565ColorMask())
{
return true;
}
return false;
}
boolean DmDrawBmpbase::Is565ColorMask() {
if (_redMask == 0xF800 && _greenMask == 0x7E0 && _blueMask == 0x1F)
{
return true;
}
return false;
}
int32_t DmDrawBmpbase::readInt32() {
int32_t d;
uint16_t b;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 435695 2015-04-02 06:54 Arduino参考\Datasheets\DM-TFT28-105 Datasheet.pdf
文件 3572618 2015-04-02 06:59 Arduino参考\Datasheets\Ilitek_ILI9341_datasheet.pdf
文件 1119035 2015-04-02 07:00 Arduino参考\Datasheets\Winbond_W25Q32BV.pdf
文件 907078 2015-04-02 06:57 Arduino参考\Datasheets\Xptek_XPT2046_datasheet.pdf
文件 3454 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpba
文件 1506 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpba
文件 3589 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromProgmem.cpp
文件 1462 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromProgmem.h
文件 4725 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromSdCard.cpp
文件 1290 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromSdCard.h
文件 4343 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromSpiFlash.cpp
文件 1421 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmDrawBmp\DmDrawBmpFromSpiFlash.h
文件 8076 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftba
文件 3207 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftba
文件 5476 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftHX8353C.cpp
文件 1484 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftHX8353C.h
文件 5183 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9163c.cpp
文件 1635 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9163c.h
文件 6356 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9163_mcu.cpp
文件 1466 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9163_mcu.h
文件 6173 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9325.cpp
文件 1447 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9325.h
文件 5687 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9341.cpp
文件 1563 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9341.h
文件 6240 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9341v.cpp
文件 1452 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftIli9341v.h
文件 14295 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftRa8875.cpp
文件 2678 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftRa8875.h
文件 7363 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftRm68090.cpp
文件 1447 2015-09-11 08:03 Arduino参考\displaymodule-dmtftlibrary-d010ff51ac0d\DmTftLibrary\DmTftRm68090.h
............此处省略545个文件信息
- 上一篇:citespace软件
- 下一篇:Centos6.5一键安装ffmpeg(含依赖包)
相关资源
- 1.8寸和2.4寸彩屏TFT-SD例程及资料大全
- RTD2270clw程序一共344个程序,涵盖所有
- MCUDEV_TFT_1.44吋_液晶屏(例程文件)
- 基于stm32俄罗斯和贪吃蛇游戏keil源代
- 基于51单片机12864液晶屏的贪吃蛇游戏
- 0.96寸OLED显示屏12864液晶屏模块IIC接口
- 按键控制lcd液晶屏的显示的程序
- STM32f103 ADC采集电压数据 显示在LCD液晶
- STM32 实现二维码生成 液晶屏显示
- 基于单片机的DS18B20温度采集,液晶屏
- 液晶屏MIPI接口与LVDS接口区别总结
- arduino通过485读取温度传感器驱动淘晶
- 51单片机12864液晶屏proteus仿真源代码
- STM32 实现12864液晶屏显示汉字和图片且
- 12864液晶屏.zip
- 用DS18B20测量温度并在12864液晶屏上显
- 12864液晶屏控制器为ks0108的proteus仿真
- tft-7-LCD-DRIVE-VERILOG.基于FPGA 液晶屏驱动
- 基于stm32的12864液晶屏的显示代码
- 基于430单片机的万年历程序
- 基于12864液晶模块的动态波形显示实现
- 液晶屏LM3228资料
- 基于FPGA的液晶屏触摸控制IP核设计
- MSTAR TSUMV56RU驱动板
- 液晶屏反白程序
- STM32C8T6驱动0.96寸OLED液晶屏
- 12864视频教程 液晶屏视频 程序 视频
- 51单片机液晶屏显示秒表
- 51单片机12864大液晶屏代码和电路图
- 战舰STM32串口2PA2 PA3接收数据,液晶屏
评论
共有 条评论