Screen printed to serial console.
More...
#include <hV_Serial_System.h>
|
| Serial_System () |
| Constructor object.
|
|
uint8_t | beginFileSystem (uint8_t pinCS=NOT_CONNECTED, uint8_t port=0, int8_t pinDetect=-1, int level=LOW) |
| File system and SD-card 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 printed to serial console.
|
|
uint8_t | saveWindow (STRING_CONST_TYPE name, uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint8_t multiplier=1) |
| Partial window printed to serial console.
|
|
uint8_t | readScreen (STRING_CONST_TYPE name, uint8_t multiplier=1) |
| Load and display header file.
|
|
Screen printed to serial console.
- Warning
- Requires an SD-card library
◆ Serial_System()
Serial_System::Serial_System |
( |
| ) |
|
Constructor object.
- Parameters
-
◆ beginFileSystem()
uint8_t Serial_System::beginFileSystem |
( |
uint8_t | pinCS = NOT_CONNECTED, |
|
|
uint8_t | port = 0, |
|
|
int8_t | pinDetect = -1, |
|
|
int | level = LOW ) |
File system and SD-card initialisation.
- Parameters
-
pinCS | SD selection |
port | SPI port, default = 0, |
pinDetect | SD detection, default = -1 = none |
level | expected level when SD-card available, default = LOW |
- Returns
- RESULT_SUCCESS if SD card available, RESULT_ERROR otherwise
- Note
- Only for compatibility with Files, not implemented for Serial
- Warning
- FAT16 only SD-card
- Note
- Generally,
myFileBMP.beginFileSystem(myBoard.cardCS);
◆ endFileSystem()
uint8_t Serial_System::endFileSystem |
( |
| ) |
|
Close file system.
- Returns
- RESULT_SUCCESS is successful, RESULT_ERROR otherwise
◆ readScreen()
uint8_t Serial_System::readScreen |
( |
STRING_CONST_TYPE | name, |
|
|
uint8_t | multiplier = 1 ) |
Load and display header file.
- Parameters
-
- Note
- The BMP file should be 5-5-5 coded.
- Parameters
-
multiplier | size 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()
◆ resumeFileSystem()
uint8_t Serial_System::resumeFileSystem |
( |
| ) |
|
Resume file system after suspend.
Switch to SD-card SPI bus, if any
- Returns
- RESULT_SUCCESS is successful, RESULT_ERROR otherwise
- Note
- Only for compatibility with Files, not implemented for Serial
◆ saveScreen()
uint8_t Serial_System::saveScreen |
( |
STRING_CONST_TYPE | name, |
|
|
uint8_t | multiplier = 1 ) |
Screen printed to serial console.
- Parameters
-
name | file name, only letters and numbers |
multiplier | size 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 Serial_System::saveWindow |
( |
STRING_CONST_TYPE | name, |
|
|
uint16_t | x0, |
|
|
uint16_t | y0, |
|
|
uint16_t | dx, |
|
|
uint16_t | dy, |
|
|
uint8_t | multiplier = 1 ) |
Partial window printed to serial console.
- Parameters
-
name | file name, only letters and numbers |
x0 | top left coordinate, x-axis |
y0 | top left coordinate, y-axis |
dx | width to be copied, x-axis |
dy | height to be copied, y-axis |
multiplier | size 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.
◆ setFolder()
uint8_t Serial_System::setFolder |
( |
STRING_CONST_TYPE | name | ) |
|
Set the folder for files.
The folder is created if it does not exist
- Parameters
-
name | folder name, ony letters and numbers |
- Returns
- RESULT_SUCCESS is successful, RESULT_ERROR otherwise
- Note
- Only for compatibility with Files, not implemented for Serial
◆ suspendFileSystem()
uint8_t Serial_System::suspendFileSystem |
( |
| ) |
|
Suspend file system.
Switch to main SPI and ensure SD-card /CS HIGH
- Returns
- RESULT_SUCCESS is successful, RESULT_ERROR otherwise
- Note
- Only for compatibility with Files, not implemented for Serial
The documentation for this class was generated from the following file: