Skip to content

Releases: AlexanderTonn/MyArduinoSnippets

byteSelect16 & selectMultipleBits16

Choose a tag to compare

@AlexanderTonn AlexanderTonn released this 08 Jan 03:52

Changes

  • added two new functions:
  • byteSelect16: Selecting the low or high byte of an uint16_t variable
  • selectMultipleBits16: Select specific bits of an uint16_t an return the result as a new uint16_t . For example: if you have a device which have a 16 bit modbus register und you want to have the bits 0-6.

corresponding commits:

  • none

⚠️ NOTE: all external libraries are in the attachement which are necessary for this library

Bit Manipulation

Choose a tag to compare

@AlexanderTonn AlexanderTonn released this 06 Jan 22:24

Changes

  • with this function it's possible to read or write (0 / 1) a single bit of any integer variables
  • the function is detecting whether the selected bit is out of range of the variable
  • works with any integer data types with a size of 1 - 8 byte.

corresponding commits:

b6dff43

⚠️ NOTE: all external libraries are in the attachement which are necessary for this library

Namespace Hotfix

Choose a tag to compare

@AlexanderTonn AlexanderTonn released this 07 Jan 10:09

Changes

  • fixed a namespace issue with the template functions

corresponding commits:

no further

⚠️ NOTE: all external libraries are in the attachement which are necessary for this library