Pervasive Displays Library Suite - Basic edition
5.2.0
Library for Pervasive Displays e-paper screens and EXT3 extension board
|
Utilities. More...
#include "Arduino.h"
Macros | |
#define | hV_UTILITIES_RELEASE 507 |
Library release number. | |
#define | min(a, b) ((a) < (b) ? (a) : (b)) |
#define | max(a, b) ((a) > (b) ? (a) : (b)) |
Orientation Orientation constants | |
#define | ORIENTATION_PORTRAIT 6 |
portrait or vertical, higher than large | |
#define | ORIENTATION_LANDSCAPE 7 |
landscape or horizontal, larger than high | |
Functions | |
Utilities | |
void | delay_ms (uint32_t ms) |
Blocking delay. More... | |
int32_t | cos32x100 (int32_t degreesX100) |
Cosinus. More... | |
int32_t | sin32x100 (int32_t degreesX100) |
Sinus. More... | |
void | convertPolar2Rectangle (uint16_t centerX, uint16_t centerY, uint16_t angle, uint16_t radius, uint16_t &rectangularX, uint16_t &rectangularY) |
Convert polar to rectangle coordinates. More... | |
void | convertRectangle2Polar (uint16_t centerX, uint16_t centerY, uint16_t rectangularX, uint16_t rectangularY, uint16_t &angle, uint16_t &radius) |
Convert rectangle to polar coordinates. More... | |
String | utf2iso (String s) |
UTF-8 to ISO-8859-1 Converter. More... | |
String | formatString (const char *format,...) |
Format string. More... | |
String | trimString (String text) |
Remove leading and ending characters. More... | |
Range | |
Utilities to check range, set min and max | |
uint16_t | checkRange (uint16_t value, uint16_t valueMin, uint16_t valueMax) |
Check value in range. More... | |
void | setMinMax (uint16_t value, uint16_t &valueMin, uint16_t &valueMax) |
Update min and max values. More... | |
uint32_t | roundUp (uint32_t value, uint16_t modulo) |
Round-up. More... | |
void | swap (int16_t &a, int16_t &b) |
Swap number, int16_t. More... | |
void | swap (uint16_t &a, uint16_t &b) |
Swap number, uint16_t. More... | |
void | swap (uint8_t &a, uint8_t &b) |
Swap number, uint8_t. More... | |
Utilities.
Project Pervasive Displays Library Suite
Based on highView technology
The highView Library Suite is shared under the Creative Commons licence Attribution-NonCommercial-ShareAlike 4.0 Unported (CC BY-NC-SA 4.0).
Consider the advanced or commercial editions for professionals or organisations and for commercial usage
uint16_t checkRange | ( | uint16_t | value, |
uint16_t | valueMin, | ||
uint16_t | valueMax | ||
) |
Check value in range.
value | value to check |
valueMin | range minimum |
valueMax | range maximum |
void convertPolar2Rectangle | ( | uint16_t | centerX, |
uint16_t | centerY, | ||
uint16_t | angle, | ||
uint16_t | radius, | ||
uint16_t & | rectangularX, | ||
uint16_t & | rectangularY | ||
) |
Convert polar to rectangle coordinates.
[in] | centerX | circle center, x coordinate |
[in] | centerY | circle center, y coordinate |
[in] | angle | angle, degrees 0..360° |
[in] | radius | radius, pixels |
[out] | rectangularX | x rectangular coordinate |
[out] | rectangularY | y rectangular coordinate |
void convertRectangle2Polar | ( | uint16_t | centerX, |
uint16_t | centerY, | ||
uint16_t | rectangularX, | ||
uint16_t | rectangularY, | ||
uint16_t & | angle, | ||
uint16_t & | radius | ||
) |
Convert rectangle to polar coordinates.
[in] | centerX | circle center, x coordinate |
[in] | centerY | circle center, y coordinate |
[in] | rectangularX | x rectangular coordinate |
[in] | rectangularY | y rectangular coordinate |
[out] | angle | angle in degrees 0..360° |
[out] | radius | radius in pixels |
int32_t cos32x100 | ( | int32_t | degreesX100 | ) |
Cosinus.
degreesX100 | angle in degrees, x100 |
void delay_ms | ( | uint32_t | ms | ) |
String formatString | ( | const char * | format, |
... | |||
) |
Format string.
Based on vsprint
format | format with standard codes |
... | list of values |
uint32_t roundUp | ( | uint32_t | value, |
uint16_t | modulo | ||
) |
Round-up.
value | value to round-up |
modulo | modulo |
void setMinMax | ( | uint16_t | value, |
uint16_t & | valueMin, | ||
uint16_t & | valueMax | ||
) |
Update min and max values.
value | value to consider |
valueMin | minimum value to update if value < valueMin |
valueMax | maximum value to update if value > valueMax |
int32_t sin32x100 | ( | int32_t | degreesX100 | ) |
Sinus.
degreesX100 | angle in degrees, x100 |
void swap | ( | int16_t & | a, |
int16_t & | b | ||
) |
Swap number, int16_t.
a | first number |
b | second number |
void swap | ( | uint16_t & | a, |
uint16_t & | b | ||
) |
Swap number, uint16_t.
a | first number |
b | second number |
void swap | ( | uint8_t & | a, |
uint8_t & | b | ||
) |
Swap number, uint8_t.
a | first number |
b | second number |
String trimString | ( | String | text | ) |
Remove leading and ending characters.
text | input text |
String utf2iso | ( | String | s | ) |
UTF-8 to ISO-8859-1 Converter.
s | UTF-8 string, input |