ButtonToSwitch Library for ESP32 (Arduino) v4.0.4
A library that provides elaborated switch mechanism behavior simulation for digital signals inputs
Loading...
Searching...
No Matches
ButtonToSwitch_ESP32.cpp File Reference

: Source file for the ButtonToSwitch_ESP32 library classes More...

Include dependency graph for ButtonToSwitch_ESP32.cpp:

Functions

MpbOtpts_t otptsSttsUnpkg (uint32_t pkgOtpts)
 Unpackages a 32-bit value into a DbncdMPBttn object status.
 

Detailed Description

: Source file for the ButtonToSwitch_ESP32 library classes

The library implements classes that model several switch mechanisms replacements out of simple push buttons or similar equivalent digital signal inputs. By using just a button (a.k.a. momentary switches or momentary push buttons, MPB for short from here on) the classes implemented in this library will manage, calculate and update several parameters to generate the embedded behavior of standard electromechanical switches.

Author
: Gabriel D. Goldman
Version
v4.0.4
Date
: Created on: 06/11/2023 : Last modification: 15/09/2024
Attention
This library was developed as part of the refactoring process for an industrial machines security enforcement and productivity control (hardware & firmware update). As such every class included complies AT LEAST with the provision of the attributes and methods to make the hardware & firmware replacement transparent to the controlled machines. Generic use attribute and methods were added to extend the usability to other projects and application environments, but no fitness nor completeness of those are given but for the intended refactoring project.
Warning
Use of this library is under your own responsibility

Function Documentation

◆ otptsSttsUnpkg()

MpbOtpts_t otptsSttsUnpkg ( uint32_t pkgOtpts)

Unpackages a 32-bit value into a DbncdMPBttn object status.

The 32-bit encoded and packaged is used for inter-task object status comunication, passed as a "notification value" in a xTaskNotify() execution. For each bit value attribute flag represented see DbncdMPBttn::getOtptsSttsPkgd()

Parameters
pkgOtptsA 32-bit value holding a DbncdMPBttn status encoded
Returns
A MpbOtpts_t type element containing the information decoded