Software Reference Manual 10.0.2
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
hV_Utilities.h File Reference

Utilities for Pervasive Displays Library Suite - Basic edition. More...

#include "hV_HAL_Peripherals.h"
#include "hV_List_Boards.h"
#include "hV_List_Types.h"
#include "hV_List_Constants.h"
Include dependency graph for hV_Utilities.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  touch_t
 Structure for touch. More...
class  GridXY
 Grid class, x- and y-axis. More...

Macros

#define hV_UTILITIES_RELEASE   1000
 Library release number.
Orientation constants
#define ORIENTATION_PORTRAIT   6
 portrait or vertical, higher than large
#define ORIENTATION_LANDSCAPE   7
 landscape or horizontal, larger than high

Functions

Text format functions

Utilities to format float, 64-bit unsigned integer, hexadecimal and period into string

STRING_TYPE utf2iso (STRING_TYPE s)
 UTF-8 to ISO-8859-1 Converter.
uint16_t utf8to16 (STRING_CONST_TYPE inUTF8, STRING16_BYREF_TYPE outUTF16, uint8_t limit=0)
 UTF-8 to UTF-16 converter.
STRING_TYPE formatString (const char *format,...)
 Format string or char array.
Miscellaneous functions

Swap and miscellaneous functions

Check value in range

Parameters
valuevalue to check
valueMinrange minimum
valueMaxrange maximum
Returns
value within range
Note
Assuming valueMin < valueMax
  • if value < valueMin, return valueMin
  • if value > valueMax, return valueMax Otherwise, if valueMin > valueMax, valueMin and valueMax are swapped

Detailed Description

Utilities for Pervasive Displays Library Suite - Basic edition.

Project Pervasive Displays Library Suite
Based on highView technology

Date
21 Dec 2025
Version
1001
  • Basic edition: for hobbyists and for basic usage
    Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
    See also
    https://creativecommons.org/licenses/by-sa/4.0/

    Consider the Evaluation or Commercial editions for professionals or organisations and for commercial usage
  • Evaluation edition: for professionals or organisations, evaluation only, no commercial usage
    All rights reserved
  • Commercial edition: for professionals or organisations, commercial usage
    All rights reserved
  • Viewer edition: for professionals or organisations
    All rights reserved
  • Documentation
    All rights reserved

Function Documentation

◆ formatString()

STRING_TYPE formatString ( const char * format,
... )

Format string or char array.

Based on vsprint

Parameters
formatformat with standard codes
...list of values
Returns
string or character array with values formatted
Note
All inputs are const char *, use c_str() on Arduino strings
See also
http://www.cplusplus.com/reference/cstdio/printf/?kw=printf for codes

◆ utf2iso()

STRING_TYPE utf2iso ( STRING_TYPE s)

UTF-8 to ISO-8859-1 Converter.

Parameters
sUTF-8 string, input
Returns
ISO-8859-1 string, output
Deprecated
No longer required. Use UTF-8 instead with gText(), Graphics and GUI elements (10.0.0)
See also
The Unicode Consortium. The Unicode Standard, Version 6.2.0, (Mountain View, CA: The Unicode Consortium, 2012. ISBN 978-1-936213-07-8) http://www.unicode.org/versions/Unicode6.2.0/

◆ utf8to16()

uint16_t utf8to16 ( STRING_CONST_TYPE inUTF8,
STRING16_BYREF_TYPE outUTF16,
uint8_t limit = 0 )

UTF-8 to UTF-16 converter.

Parameters
[in]inUTF8UTF-8 string, input
[out]outUTF16UTF-16 string, output
[in]limitmaximum number of characters converted, 0 = no check
Returns
number of UTF-16 characters converted
See also