ButtonToSwitch Library for ESP32 (Arduino) v4.4.1
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.

Repository: https://github.com/GabyGold67/ButtonToSwitch_ESP32

Framework: Arduino
Platform: ESP32

Author
Gabriel D. Goldman
mail gdgol.nosp@m.dman.nosp@m.67@ho.nosp@m.tmai.nosp@m.l.com
Github https://github.com/GabyGold67
Version
v4.4.1
Date
First release: 06/11/2023
Last update: 15/05/2025 16:10 (GMT+0200) DST
Attention
This library was originally 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 attributes 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, and for the author's projects requirements.
Warning
Use of this library is under your own responsibility
The use of this library falls in the category described by The Alan Parsons Project (c) 1980 Games People play disclaimer:
Games people play, you take it or you leave it
Things that they say aren't alright
If I promised you the moon and the stars, would you believe it?

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