Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
|
Main sketch. More...
#include "PDLS_Common.h"
#include "hV_Utilities.h"
#include "hV_Font.h"
#include "hV_Font_Header.h"
#include "EPD_FLASH.h"
Classes | |
struct | fontFlash_s |
Structure for font, 8 bytes. More... | |
Macros | |
#define | MAX_FONT_NUMBER 64 |
Maximum number of fonts. | |
#define | USE_RED_GREEN_LED 0 |
Use red and green LEDs. | |
Select font families for DejaVu release 1 or 2 | |
#define | FONT_MONO 0x40 |
Fixed Monotype family. | |
#define | FONT_SANS 0x20 |
Proportional Sans Serif family. | |
#define | FONT_SERIF 0x10 |
Proportional Serif family. | |
#define | FONT_RELEASE (FONT_MONO | FONT_SANS | FONT_SERIF) |
selected families | |
Tasks to perform | |
#define | WRITE_FLASH_SECTOR_0 0 |
Write or update sector 0. | |
#define | WRITE_FLASH_FONTS 0 |
Write fonts to Flash. | |
#define | SIMULATE_FLASH_SECTOR_0 1 |
Simulate sector 0. | |
#define | READ_FLASH_SECTOR_0 1 |
Read sector 0. | |
#define | READ_FLASH_FONTS 1 |
Read fonts from Flash. | |
#define | GENERATE_FONTS_ENUMERATION 1 |
Generate code of header file with fonts enumeration. | |
Options | |
#define | OPTION_ADD_FONTS 0 |
Add fonts to existing ones. | |
#define | OPTION_FLASH_DEBUG 0 |
Debug flash operations. | |
Other SPI CS to keep high | |
Example for CC1352 #define INACTIVE_CS_1 26
#define INACTIVE_CS_2 37
#define INACTIVE_CS_3 36
|
Functions | |
void | wait (uint8_t second) |
Wait with countdown. | |
uint8_t | loadFont (font_s fontName) |
Load font. | |
void | selectFont (uint8_t font) |
Select the font. | |
void | printFont (fontFlash_s _font, uint8_t number) |
Print the details of a font. | |
void | enumerateFont (fontFlash_s _font) |
Print a summary of a font. | |
uint16_t | listFonts () |
Read sector 0 from Flash and list fonts. | |
uint16_t | enumerateFonts () |
Read sector 0 from Flash and generate fonts enumeration. | |
void | flash_program (uint16_t sector, const void *buffer, uint32_t length) |
Write to Flash. | |
void | debugSector (uint16_t sector, uint16_t length=512, uint8_t line=32, uint8_t mark=8) |
Debug sector. | |
void | debugMemory (const char *text, uint8_t *memory, uint16_t length=512, uint8_t line=32, uint8_t mark=8) |
Debug memory. | |
void | setup () |
Setup. | |
void | loop () |
Loop. | |
Main sketch.
Fonts manager for hV_screen Library Suite
General organisation
Fonts for hV_screen Library Suite
#define MAX_FONT_NUMBER 64 |
Maximum number of fonts.
In theory, sector 0= 4096 bytes / 8 bytes/font= 512 fonts
#define USE_RED_GREEN_LED 0 |
Use red and green LEDs.
If available,
void debugMemory | ( | const char * | text, |
uint8_t * | memory, | ||
uint16_t | length = 512, | ||
uint8_t | line = 32, | ||
uint8_t | mark = 8 ) |
Debug memory.
text | message |
memory | address pointer |
length | default=512 bytes to read |
line | default=32 bytes per line |
mark | display : every default=8 bytes |
void debugSector | ( | uint16_t | sector, |
uint16_t | length = 512, | ||
uint8_t | line = 32, | ||
uint8_t | mark = 8 ) |
Debug sector.
sector | 0..255 for 1 MB, sector = 4 kB |
length | default=512 bytes to read |
line | default=32 bytes per line |
mark | display : every default=8 bytes |
void enumerateFont | ( | fontFlash_s | _font | ) |
Print a summary of a font.
_font | font |
uint16_t enumerateFonts | ( | ) |
Read sector 0 from Flash and generate fonts enumeration.
void flash_program | ( | uint16_t | sector, |
const void * | buffer, | ||
uint32_t | length ) |
Write to Flash.
sector | sector number |
buffer | content to write |
length | number of bytes |
uint16_t listFonts | ( | ) |
Read sector 0 from Flash and list fonts.
uint8_t loadFont | ( | font_s | fontName | ) |
Load font.
Load the font into the fonts table
fontName | font name |
void loop | ( | ) |
Loop.
Empty
void printFont | ( | fontFlash_s | _font, |
uint8_t | number ) |
Print the details of a font.
_font | font |
number | number to displayed |
void selectFont | ( | uint8_t | font | ) |
Select the font.
font | font number |
void wait | ( | uint8_t | second | ) |
Wait with countdown.
second | duration, s |