Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
File_BMP Class Reference

Screen saved as BMP file on SD-card. More...

#include <hV_File_BMP.h>

Inheritance diagram for File_BMP:
Collaboration diagram for File_BMP:

Public Member Functions

 File_BMP (Screen_EPD *screen)
 Constructor object.
 
uint8_t saveScreen (STRING_CONST_TYPE name, uint8_t multiplier=1)
 Screen saved as BMP file to SD-card.
 
uint8_t saveWindow (STRING_CONST_TYPE name, uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint8_t multiplier=1)
 Save partial window as BMP file to SD-card.
 
uint8_t readScreen (STRING_CONST_TYPE name, uint8_t multiplier=1)
 Read a BMP file.
 
- Public Member Functions inherited from File_System
 File_System ()
 Constructor.
 
uint8_t beginFileSystem (uint8_t pinCS=NOT_CONNECTED, uint8_t port=0, int8_t pinDetect=-1, int level=LOW)
 File system initialisation.
 
uint8_t endFileSystem ()
 Close file system.
 
uint8_t setFolder (STRING_CONST_TYPE name)
 Set the folder for files.
 
uint8_t suspendFileSystem ()
 Suspend file system.
 
uint8_t resumeFileSystem ()
 Resume file system after suspend.
 
uint8_t saveScreen (STRING_CONST_TYPE name, uint8_t multiplier=1)
 Screen saved as file to SD-card.
 
uint8_t saveWindow (STRING_CONST_TYPE name, uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint8_t multiplier=1)
 Save partial window as file to SD-card.
 
uint8_t readScreen (STRING_CONST_TYPE name, uint8_t multiplier=1)
 Load and display BMP file.
 
void printFileSystemError ()
 Print the file system error.
 

Detailed Description

Screen saved as BMP file on SD-card.

Shared header for Linux and MCU

Note
For all screens, monochrome and colour, 16 bits per pixel
Colours are RGB 5-5-5 coded
Warning
MCU requires an SD-card library

Constructor & Destructor Documentation

◆ File_BMP()

File_BMP::File_BMP ( Screen_EPD * screen)

Constructor object.

Parameters
screen&screen to link File_BMP to

Member Function Documentation

◆ readScreen()

uint8_t File_BMP::readScreen ( STRING_CONST_TYPE name,
uint8_t multiplier = 1 )

Read a BMP file.

Framebuffer updated, flush required

Parameters
namefile name
Note
The BMP file should be 5-5-5 coded.
Parameters
multipliersize of each dot, default = 1
  • Recommended 2 for small screens
  • Otherwise 1 for medium and large screens
Returns
RESULT_SUCCESS is successful, RESULT_ERROR otherwise
Warning
Prefer BMP file generated by saveScreen()

◆ saveScreen()

uint8_t File_BMP::saveScreen ( STRING_CONST_TYPE name,
uint8_t multiplier = 1 )

Screen saved as BMP file to SD-card.

Parameters
namefile name, only letters and numbers
multipliersize of each dot, default = 1
  • Recommended 2 for small screens
  • Otherwise 1 for medium and large screens
Returns
RESULT_SUCCESS is successful, RESULT_ERROR otherwise
Note
The resulting BMP file is 5-5-5 coded.

◆ saveWindow()

uint8_t File_BMP::saveWindow ( STRING_CONST_TYPE name,
uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
uint8_t multiplier = 1 )

Save partial window as BMP file to SD-card.

Parameters
namefile name, only letters and numbers
x0top left coordinate, x-axis
y0top left coordinate, y-axis
dxwidth to be copied, x-axis
dyheight to be copied, y-axis
multipliersize of each dot, default = 1
  • Recommended 2 for small screens
  • Otherwise 1 for medium and large screens
Returns
RESULT_SUCCESS is successful, RESULT_ERROR otherwise
Note
The resulting BMP file is 5-5-5 coded.

The documentation for this class was generated from the following file: