| ButtonToSwitch Library for ESP32 (Arduino) v4.3.1 A library that provides elaborated switch mechanism behavior simulation for digital signals inputs

Loading...
Searching...
No Matches
Functions
ButtonToSwitch_ESP32.cpp File Reference

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

`#include "ButtonToSwitch_ESP32.h"`
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.3.0

Date
  First release: 06/11/2023 Last update: 19/01/2025 16:00 (GMT+0300 DST)

Copyright
  GPL-3.0 license

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

  pkgOtpts | A 32-bit value holding a DbncdMPBttn status encoded

Returns
  A MpbOtpts_t type element containing the information decoded