Skip to content

Releases: GabyGold67/mpbAsSwitch_STM32

v3.0.0 Upgrade release

04 Jul 07:25
9c73306
Compare
Choose a tag to compare
  • The task notification mechanism is modified replacing the xTaskNotifyGive() macro that was in use. The change is NOT backward compatible, so the version number had to be kicked to v3.x.x.

    • xTaskNotify() macro replaces the xTaskNotifyGive() due to it's capacity to pass an arbitrary notification value to the notified task.
    • A method to encode the object current attribute flags status into a 32-bit value to be passed as the notification value was added. The method has no public access as it's invoked automatically when needed.
    • A type was defined (MpbOtpts_t) to hold the decoded status of all the available significant output attribute flags for all classes implemented. The type is available for the developer using the library.
    • A decoding function was implemented to decode the 32-bit notification value into the type MpbOtpts_t, MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts) implemented for the developer using the library.
  • Several application examples were added and a basic explanation of what each uses and does was added to each one. More are expected to be added.

v2.0.0 Upgrade release

11 Jun 11:56
Compare
Choose a tag to compare

Changes:

General:

_ Verifies the input pin port to be valid from GPIOC and on (previous version verified from GPIOE and on), due to the fact that at the moment the STM32 mcu with smaller ports quantity have two ports (usually defined as GPIOA and GPIOB).
_ Volatile type qualifier added to attributes that can be modified by setters and by software timer update service.
_ Return values for many attribute setters changed from boolean to void. The only ones that keep a boolean return value are those which need value validation, in wich case will return true if the value passed as parameter is valid, or false if the parameter was out of range of valid values.
_ isOn2 renamed to isOnScndry, and declaration moved up to DblActnLtchMPBttn class to make it available for all subclasses.
_ The isOn2 (now isOnScndry) attribute direct value asignation was refactored into turnOffScndry() and trnOnScndry() methods to set the bases for complete implementation of related actions to the attribute flag value change.
_ All the trnOn() and trnOff() facilities added to the turnOffScndry() and trnOnScndry(), including a taskHandle management to resume/suspend a task while isOnScndry = true, a function pointer to a function to be executed when isOnScndry changes values.
_ getFrcOtptLvldWhnVdd(), getStOnWhnOtpFrcd(), setFrcdOtptWhnVdd(), setStOnWhnOtpFrcd() methods added to VdblMPBttn to configure the isOn attribute flag behavior when the objects enter the voided state. These won't be used at this point as the only subclass developed -TmVdblMPBttn- requires a fixed setup for both frcOtptLvlWhnVdd and stOnWhnOtptFrcd attribute flags.

v1.1.0 Update release

27 May 15:53
Compare
Choose a tag to compare

Changes:

Attributes and methods:

_ strtDelay attribute moved up from the DbncdDlydMPBttn class to the DbncdMPBttn class
_ getStrtDelay() method moved up from the DbncdDlydMPBttn class to the DbncdMPBttn class
_ updValidPressesStatus() method from the DbncdMPBttn class modified to include strtDelay in the calculations
_ updValidPressesStatus() method from the DbncdDlydMPBttn class removed as becoming unneeded by the move of the strtDelay attribute
_ DbncdDlydMPBttn() constructor modified to accomodate strtDelay value initialization out of the initialization list (subclass initialization of non static parameter)

v1.0.0 Initial Release

24 May 09:02
Compare
Choose a tag to compare

This release includes:

Instantiable classes:

  • DbncdMPBttn: Base class, implements a Debounced Momentary Push Button (D-MPB)
  • DbncdDlydMPBttn: Implements a Debounced Delayed MPB (DD-MPB)
  • TgglLtchMPBttn: Implements a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB)
  • TmLtchMPBttn: Implements a Timer Latch DD-MPB, a.k.a. a Timer Switch (TiLDD-MPB)
  • XtrnUnltchMPBttn: Implements an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
  • HntdTmLtchMPBttn: Implements a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB)
  • TmVdblMPBttn: Implements a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
  • SldrDALtchMPBttn: Implements a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio switch)(S-DALDD-MPB)
  • DDlydDALtchMPBttn: Implements a Debounced Delayed DALDD-MPB combo switch, a.k.a. Dobule Debounced Delayed Latched MPB combo switch (DD-DALDD-MPB)

Embedded simulated behavior output retrieval mechanisms implemeted:

  • Flags value getters: Return the value of each significant output flag.
  • General flags value change getter: Returns a value indicating if any of the significant output flags' values has changed.
  • RTOS lightweight mailbox: Implementation of a xTaskNotifyGive() FreeRTOS macro to unblock a developer defined task, every time any of the output flags' values changes.
  • Task Resume/Suspend: A mechanism is provided to run a developer defined task while the object is in On State.
  • Functions execution: A developer defined function might be set to be executed every time the instantiated object enters the On State, and a function might be set to be executed every time the instantiated object enters the Off State. The functions are to be independently defined, so one, the other or both might be defined, and even the same function might be used for both events.

Example files:

  • At least two example files for each instantiable class, showing the working setting and the effecto of the disable()/enable() methods of each of them