Some basics classes/types.
More...
#include <Arduino.h>
#include "type_traits.hpp"
#include "constants.h"
Go to the source code of this file.
|
| enum class | DisplayType : uint8_t { NONE
, OLED
, SEG
, SEG_HW
} |
| |
| enum class | LoadStates : uint8_t { LOAD_OFF
, LOAD_ON
} |
| |
| enum class | OutputModes : uint8_t { ANTI_FLICKER
, NORMAL
} |
| |
| enum class | Polarities : uint8_t { NEGATIVE
, POSITIVE
} |
| |
| enum class | RotationModes : uint8_t { OFF
, AUTO
, PIN
} |
| |
| enum class | SerialOutputType { HumanReadable
, IoT
, JSON
} |
| |
|
| template<class... Ts> |
| constexpr uint8_t | ival (Ts... Vs) |
| |
| template<char... Vs> |
| constexpr integral_constant< uint8_t, ival(Vs...) > | operator""_i () |
| |
| template<typename _Tp> |
| constexpr size_t | size (const _Tp(&)[0]) noexcept |
| | Helper function for the special case of a 0-dimension C-array.
|
| |
| template<typename _Tp, size_t _Nm> |
| constexpr size_t | size (const _Tp(&)[_Nm]) noexcept |
| | Helper function to retrieve the dimension of a C-array.
|
| |
Some basics classes/types.
- Author
- Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)
- Version
- 0.1
- Date
- 2023-02-09
- Copyright
- Copyright (c) 2023
Definition in file types.h.
◆ DisplayType
Display type
| Enumerator |
|---|
| NONE | No display
|
| OLED | OLED through HW-I2C
|
| SEG | 7-segments
|
| SEG_HW | 7-segments with Pin saving hardware
|
Definition at line 66 of file types.h.
◆ LoadStates
Load state (for use if loads are active high (Rev 2 PCB))
| Enumerator |
|---|
| LOAD_OFF | load is OFF
|
| LOAD_ON | load is ON
|
Definition at line 47 of file types.h.
◆ OutputModes
Output modes
| Enumerator |
|---|
| ANTI_FLICKER | Anti-flicker mode
|
| NORMAL | Normal mode
|
Definition at line 40 of file types.h.
◆ Polarities
Polarities
| Enumerator |
|---|
| NEGATIVE | polarity is negative
|
| POSITIVE | polarity is positive
|
Definition at line 33 of file types.h.
◆ RotationModes
Rotation modes
| Enumerator |
|---|
| OFF | Off
|
| AUTO | Once a day
|
| PIN | Pin triggered
|
Definition at line 58 of file types.h.
◆ SerialOutputType
Enum for serial output types
| Enumerator |
|---|
| HumanReadable | Human-readable output for commissioning
|
| IoT | Output for HomeAssistant or similar
|
| JSON | Output in JSON format
|
Definition at line 25 of file types.h.
◆ ival()
◆ operator""_i()
◆ size() [1/2]
template<typename _Tp>
| size_t size |
( |
const | _Tp(&)[0] | ) |
|
|
constexprnoexcept |
Helper function for the special case of a 0-dimension C-array.
- Template Parameters
-
Definition at line 104 of file types.h.
◆ size() [2/2]
template<typename _Tp, size_t _Nm>
| size_t size |
( |
const | _Tp(&)[_Nm] | ) |
|
|
constexprnoexcept |
Helper function to retrieve the dimension of a C-array.
- Template Parameters
-
| _Tp | elements type |
| _Nm | dimension |
Definition at line 94 of file types.h.
Referenced by calcBufferSize().
◆ loadStateMask
| uint8_t loadStateMask { 0x7FU } |
|
inlineconstexpr |
◆ loadStateOnBit