resol-vbus-c
Data Structures | Macros | Typedefs | Enumerations | Functions
ResolVBus.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  RESOLVBUS_LIVEENCODEREVENT
 
struct  RESOLVBUS_LIVEENCODER
 
struct  RESOLVBUS_LIVEDECODEREVENT
 
struct  RESOLVBUS_LIVEDECODER
 
struct  RESOLVBUS_LIVETRANSCEIVEREVENT
 
struct  RESOLVBUS_LIVETRANSCEIVEROPTIONS
 
struct  RESOLVBUS_LIVETRANSCEIVER
 

Macros

#define RESOLVBUS_CONTAINEROF(__Pointer__, __Type__, __Member__)    ((__Type__ *) (((uint8_t *) (__Pointer__)) - ((uint8_t *) (&((__Type__ *) 0)->__Member__))))
 
#define RESOLVBUS_COUNTOF(__Array__)    (sizeof (__Array__) / sizeof ((__Array__) [0]))
 
#define RESOLVBUS_PACKETFRAMECOUNTOF(__Type__)    ((sizeof (__Type__) + 3) >> 2)
 
#define RESOLVBUS_LIVEENCODER_INITIALIZER   { .BufferLength = 0, }
 
#define RESOLVBUS_LIVEDECODER_INITIALIZER   { .BufferIndex = 0, }
 
#define RESOLVBUS_LIVETRANSCEIVEROPTIONS_INITIALIZER   { .Tries = 0, }
 
#define RESOLVBUS_LIVETRANSCEIVER_INITIALIZER   { .ActionTries = 0, }
 

Typedefs

typedef enum RESOLVBUS_RESULT RESOLVBUS_RESULT
 
typedef enum RESOLVBUS_LIVEENCODEREVENTTYPE RESOLVBUS_LIVEENCODEREVENTTYPE
 
typedef enum RESOLVBUS_LIVEENCODERPHASE RESOLVBUS_LIVEENCODERPHASE
 
typedef enum RESOLVBUS_LIVEDECODEREVENTTYPE RESOLVBUS_LIVEDECODEREVENTTYPE
 
typedef enum RESOLVBUS_LIVETRANSCEIVEREVENTTYPE RESOLVBUS_LIVETRANSCEIVEREVENTTYPE
 
typedef struct RESOLVBUS_LIVEENCODEREVENT RESOLVBUS_LIVEENCODEREVENT
 
typedef struct RESOLVBUS_LIVEENCODER RESOLVBUS_LIVEENCODER
 
typedef struct RESOLVBUS_LIVEDECODEREVENT RESOLVBUS_LIVEDECODEREVENT
 
typedef struct RESOLVBUS_LIVEDECODER RESOLVBUS_LIVEDECODER
 
typedef struct RESOLVBUS_LIVETRANSCEIVEREVENT RESOLVBUS_LIVETRANSCEIVEREVENT
 
typedef struct RESOLVBUS_LIVETRANSCEIVEROPTIONS RESOLVBUS_LIVETRANSCEIVEROPTIONS
 
typedef struct RESOLVBUS_LIVETRANSCEIVER RESOLVBUS_LIVETRANSCEIVER
 
typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEENCODERHANDLER) (RESOLVBUS_LIVEENCODER *Encoder, const RESOLVBUS_LIVEENCODEREVENT *Event)
 
typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEENCODERCALLBACK) (RESOLVBUS_LIVEENCODER *Encoder, void *Context)
 
typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEDECODERHANDLER) (RESOLVBUS_LIVEDECODER *Decoder, const RESOLVBUS_LIVEDECODEREVENT *Event)
 
typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVETRANSCEIVERHANDLER) (RESOLVBUS_LIVETRANSCEIVER *Transceiver, const RESOLVBUS_LIVETRANSCEIVEREVENT *Event)
 

Enumerations

enum  RESOLVBUS_RESULT {
  RESOLVBUS_OK = 0 , RESOLVBUS_WOULDBLOCK = 1 , RESOLVBUS_ERROR_UNKNOWN = 2 , RESOLVBUS_ERROR_NYI = 3 ,
  RESOLVBUS_ERROR_NULLPOINTER = 4 , RESOLVBUS_ERROR_UNSUPPORTEDPROTOCOL = 5 , RESOLVBUS_ERROR_INDEXOUTOFBOUNDS = 6 , RESOLVBUS_ERROR_INVALIDARGUMENT = 7 ,
  RESOLVBUS_ERROR_INVALIDCHECKSUM = 8 , RESOLVBUS_ERROR_INVALIDSTATE = 9 , RESOLVBUS_ERROR_SUSPENDED = 10
}
 
enum  RESOLVBUS_LIVEENCODEREVENTTYPE { RESOLVBUS_LIVEENCODEREVENTTYPE_IDLE , RESOLVBUS_LIVEENCODEREVENTTYPE_TRANSMIT }
 
enum  RESOLVBUS_LIVEENCODERPHASE {
  RESOLVBUS_LIVEENCODERPHASE_IDLE = 0 , RESOLVBUS_LIVEENCODERPHASE_TRANSMITTING = 1 , RESOLVBUS_LIVEENCODERPHASE_GAININGENERGY = 2 , RESOLVBUS_LIVEENCODERPHASE_SUSPENDED = 3 ,
  RESOLVBUS_LIVEENCODERPHASE_SUSPENDEDWITHTIMEOUT = 4
}
 
enum  RESOLVBUS_LIVEDECODEREVENTTYPE {
  RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETHEADER , RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETFRAME , RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETEND , RESOLVBUS_LIVEDECODEREVENTTYPE_DATAGRAM ,
  RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMHEADER , RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMFRAME , RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMEND
}
 
enum  RESOLVBUS_LIVETRANSCEIVEREVENTTYPE { RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_ACTION , RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_TIMEOUT , RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_ENCODER , RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_DECODER }
 

Functions

void ResolVBus_ResetBacktrace (const char *Message, const char *Expression, const char *File, int Line, const char *Func)
 
void ResolVBus_AddBacktrace (const char *Expression, const char *File, int Line, const char *Func)
 
const char * ResolVBus_GetBacktrace (void)
 
void ResolVBus_PrintBacktrace (void)
 
void ResolVBus_DebugLog (const char *File, int Line, const char *Func, const char *Format,...)
 
uint16_t ResolVBus_ReadUInt16LE (const uint8_t *Buffer)
 
void ResolVBus_WriteUInt16LE (uint8_t *Buffer, uint16_t Value)
 
uint32_t ResolVBus_ReadUInt32LE (const uint8_t *Buffer)
 
void ResolVBus_WriteUInt32LE (uint8_t *Buffer, uint32_t Value)
 
RESOLVBUS_RESULT ResolVBus_CalcCrcV0 (const uint8_t *Buffer, size_t Length, uint8_t *pCrc)
 
RESOLVBUS_RESULT ResolVBus_CalcCrc (uint8_t ProtocolVersion, const uint8_t *Buffer, size_t Length, uint8_t *pCrc)
 
RESOLVBUS_RESULT ResolVBus_CalcAndSetCrc (uint8_t ProtocolVersion, uint8_t *Buffer, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_CalcAndCompareCrc (uint8_t ProtocolVersion, const uint8_t *Buffer, size_t Length, bool *pCrcIsValid)
 
RESOLVBUS_RESULT ResolVBus_InjectSeptett (const uint8_t *Source, uint8_t *Destination, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_ExtractSeptett (const uint8_t *Source, uint8_t *Destination, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_Initialize (RESOLVBUS_LIVEENCODER *Encoder, uint8_t *Buffer, size_t Length, RESOLVBUS_LIVEENCODERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_GetTimeout (RESOLVBUS_LIVEENCODER *Encoder, uint32_t *pMicroseconds)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_HandleTimer (RESOLVBUS_LIVEENCODER *Encoder, uint32_t Microseconds)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_Suspend (RESOLVBUS_LIVEENCODER *Encoder)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_SuspendWithTimeout (RESOLVBUS_LIVEENCODER *Encoder, uint32_t Microseconds)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_SuspendWithTimeoutAndCallback (RESOLVBUS_LIVEENCODER *Encoder, uint32_t Microseconds, RESOLVBUS_LIVEENCODERCALLBACK Callback, void *Context)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_Resume (RESOLVBUS_LIVEENCODER *Encoder)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketHeader (RESOLVBUS_LIVEENCODER *Encoder, uint16_t DestinationAddress, uint16_t SourceAddress, uint8_t MinorVersion, uint16_t Command, uint8_t FrameCount)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketFrame (RESOLVBUS_LIVEENCODER *Encoder, const uint8_t *FourBytes)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketFrames (RESOLVBUS_LIVEENCODER *Encoder, const void *Bytes, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueDatagram (RESOLVBUS_LIVEENCODER *Encoder, uint16_t DestinationAddress, uint16_t SourceAddress, uint8_t MinorVersion, uint16_t Command, uint16_t Param16, uint32_t Param32)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramHeader (RESOLVBUS_LIVEENCODER *Encoder, uint16_t DestinationAddress, uint16_t SourceAddress, uint8_t MinorVersion, uint8_t Command, uint8_t FrameCount)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramFrame (RESOLVBUS_LIVEENCODER *Encoder, const uint8_t *SevenBytes)
 
RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramFrames (RESOLVBUS_LIVEENCODER *Encoder, const void *Bytes, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_LiveDecoder_Initialize (RESOLVBUS_LIVEDECODER *Decoder, void *FrameDataBuffer, size_t FrameDataBufferLength, RESOLVBUS_LIVEDECODERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveDecoder_Decode (RESOLVBUS_LIVEDECODER *Decoder, const uint8_t *Bytes, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_Initialize (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint8_t *EncoderBuffer, size_t EncoderBufferLength, void *DecoderBuffer, size_t DecoderBufferLength, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetTimeout (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint32_t *pMicroseconds)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_HandleTimer (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint32_t Microseconds)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetEncoder (RESOLVBUS_LIVETRANSCEIVER *Transceiver, RESOLVBUS_LIVEENCODER **pEncoder)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_Decode (RESOLVBUS_LIVETRANSCEIVER *Transceiver, const uint8_t *Bytes, size_t Length)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_WaitForFreeBus (RESOLVBUS_LIVETRANSCEIVER *Transceiver, const RESOLVBUS_LIVETRANSCEIVEROPTIONS *CustomOptions, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_ReleaseBus (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint16_t PeerAddress, const RESOLVBUS_LIVETRANSCEIVEROPTIONS *CustomOptions, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetValueById (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint16_t PeerAddress, uint16_t ValueId, uint8_t ValueSubIndex, const RESOLVBUS_LIVETRANSCEIVEROPTIONS *CustomOptions, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_SetValueById (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint16_t PeerAddress, uint16_t ValueId, uint8_t ValueSubIndex, uint32_t Value, const RESOLVBUS_LIVETRANSCEIVEROPTIONS *CustomOptions, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 
RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetValueIdByIdHash (RESOLVBUS_LIVETRANSCEIVER *Transceiver, uint16_t PeerAddress, uint32_t ValueIdHash, const RESOLVBUS_LIVETRANSCEIVEROPTIONS *CustomOptions, RESOLVBUS_LIVETRANSCEIVERHANDLER Handler)
 

Macro Definition Documentation

◆ RESOLVBUS_CONTAINEROF

#define RESOLVBUS_CONTAINEROF (   __Pointer__,
  __Type__,
  __Member__ 
)     ((__Type__ *) (((uint8_t *) (__Pointer__)) - ((uint8_t *) (&((__Type__ *) 0)->__Member__))))

◆ RESOLVBUS_COUNTOF

#define RESOLVBUS_COUNTOF (   __Array__)     (sizeof (__Array__) / sizeof ((__Array__) [0]))

◆ RESOLVBUS_LIVEDECODER_INITIALIZER

#define RESOLVBUS_LIVEDECODER_INITIALIZER   { .BufferIndex = 0, }

◆ RESOLVBUS_LIVEENCODER_INITIALIZER

#define RESOLVBUS_LIVEENCODER_INITIALIZER   { .BufferLength = 0, }

◆ RESOLVBUS_LIVETRANSCEIVER_INITIALIZER

#define RESOLVBUS_LIVETRANSCEIVER_INITIALIZER   { .ActionTries = 0, }

◆ RESOLVBUS_LIVETRANSCEIVEROPTIONS_INITIALIZER

#define RESOLVBUS_LIVETRANSCEIVEROPTIONS_INITIALIZER   { .Tries = 0, }

◆ RESOLVBUS_PACKETFRAMECOUNTOF

#define RESOLVBUS_PACKETFRAMECOUNTOF (   __Type__)     ((sizeof (__Type__) + 3) >> 2)

Typedef Documentation

◆ RESOLVBUS_LIVEDECODER

◆ RESOLVBUS_LIVEDECODEREVENT

◆ RESOLVBUS_LIVEDECODEREVENTTYPE

◆ RESOLVBUS_LIVEDECODERHANDLER

typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEDECODERHANDLER) (RESOLVBUS_LIVEDECODER *Decoder, const RESOLVBUS_LIVEDECODEREVENT *Event)

◆ RESOLVBUS_LIVEENCODER

◆ RESOLVBUS_LIVEENCODERCALLBACK

typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEENCODERCALLBACK) (RESOLVBUS_LIVEENCODER *Encoder, void *Context)

◆ RESOLVBUS_LIVEENCODEREVENT

◆ RESOLVBUS_LIVEENCODEREVENTTYPE

◆ RESOLVBUS_LIVEENCODERHANDLER

typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVEENCODERHANDLER) (RESOLVBUS_LIVEENCODER *Encoder, const RESOLVBUS_LIVEENCODEREVENT *Event)

◆ RESOLVBUS_LIVEENCODERPHASE

◆ RESOLVBUS_LIVETRANSCEIVER

◆ RESOLVBUS_LIVETRANSCEIVEREVENT

◆ RESOLVBUS_LIVETRANSCEIVEREVENTTYPE

◆ RESOLVBUS_LIVETRANSCEIVERHANDLER

typedef RESOLVBUS_RESULT(* RESOLVBUS_LIVETRANSCEIVERHANDLER) (RESOLVBUS_LIVETRANSCEIVER *Transceiver, const RESOLVBUS_LIVETRANSCEIVEREVENT *Event)

◆ RESOLVBUS_LIVETRANSCEIVEROPTIONS

◆ RESOLVBUS_RESULT

Used as return type for most functions.

It is guaranteed, that RESOLVBUS_OK always has 0 assigned to it. That means, that if (Result == RESOLVBUS_OK) ... and if (Result == 0) ... are equivalent.

It is also guaranteed, that RESOLVBUS_WOULDBLOCK always has 1 assigned to it.

All other values are not guaranteed to keep their numerical value and / or their order.

Enumeration Type Documentation

◆ RESOLVBUS_LIVEDECODEREVENTTYPE

Enumerator
RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETHEADER 

Emitted when the header of a VBus packet has been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETFRAME 

Emitted when a frame of a VBus packet has been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
  • FrameIndex
  • FrameData
  • FrameDataLength
  • FrameDataBuffer
RESOLVBUS_LIVEDECODEREVENTTYPE_PACKETEND 

Emitted when the header and all of its associated frames of a VBus packet have been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
  • FrameIndex
  • FrameData
  • FrameDataLength
  • FrameDataBuffer
RESOLVBUS_LIVEDECODEREVENTTYPE_DATAGRAM 

Emitted when a VBus datagram has been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • Param16
  • Param32
RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMHEADER 

Emitted when the header of a VBus telegram has been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMFRAME 

Emitted when a frame of a VBus telegram has been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
  • FrameIndex
  • FrameData
  • FrameDataLength
  • FrameDataBuffer
RESOLVBUS_LIVEDECODEREVENTTYPE_TELEGRAMEND 

Emitted when the header and all of its associated frames of a VBus telegram have been decoded.

The following fields of the decoder contain additional information:

  • DestinationAddress
  • SourceAddress
  • ProtocolVersion
  • MajorVersion
  • Command
  • FrameCount
  • FrameIndex
  • FrameData
  • FrameDataLength
  • FrameDataBuffer

◆ RESOLVBUS_LIVEENCODEREVENTTYPE

Enumerator
RESOLVBUS_LIVEENCODEREVENTTYPE_IDLE 

Emitted when buffers are empty and timeouts have run out.

Receiving this event can e.g. be used to send another piece of information.

RESOLVBUS_LIVEENCODEREVENTTYPE_TRANSMIT 

Emitted when raw data are ready to be transmitted.

Raw data is passed in the TransmitBytes and TransmitLength fields of the event struct.

◆ RESOLVBUS_LIVEENCODERPHASE

Enumerator
RESOLVBUS_LIVEENCODERPHASE_IDLE 

The encoder has no work to do at the moment.

RESOLVBUS_LIVEENCODERPHASE_TRANSMITTING 

The encoder is currently transmitting data.

RESOLVBUS_LIVEENCODERPHASE_GAININGENERGY 

The encoder is waiting for the VBus to regain energy.

RESOLVBUS_LIVEENCODERPHASE_SUSPENDED 

The encoder has been suspended without a timeout.

RESOLVBUS_LIVEENCODERPHASE_SUSPENDEDWITHTIMEOUT 

The encoder has been suspended with a timeout.

◆ RESOLVBUS_LIVETRANSCEIVEREVENTTYPE

Enumerator
RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_ACTION 

Emitted when the active action needs to send its request.

RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_TIMEOUT 

Emitted when the active action timed out.

RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_ENCODER 

Forwards an event emitted by the Encoder (e.g. to transmit data).

RESOLVBUS_LIVETRANSCEIVEREVENTTYPE_DECODER 

Forwards an event emitted by the Decoder.

◆ RESOLVBUS_RESULT

Used as return type for most functions.

It is guaranteed, that RESOLVBUS_OK always has 0 assigned to it. That means, that if (Result == RESOLVBUS_OK) ... and if (Result == 0) ... are equivalent.

It is also guaranteed, that RESOLVBUS_WOULDBLOCK always has 1 assigned to it.

All other values are not guaranteed to keep their numerical value and / or their order.

Enumerator
RESOLVBUS_OK 
RESOLVBUS_WOULDBLOCK 
RESOLVBUS_ERROR_UNKNOWN 
RESOLVBUS_ERROR_NYI 
RESOLVBUS_ERROR_NULLPOINTER 
RESOLVBUS_ERROR_UNSUPPORTEDPROTOCOL 
RESOLVBUS_ERROR_INDEXOUTOFBOUNDS 
RESOLVBUS_ERROR_INVALIDARGUMENT 
RESOLVBUS_ERROR_INVALIDCHECKSUM 
RESOLVBUS_ERROR_INVALIDSTATE 
RESOLVBUS_ERROR_SUSPENDED 

Function Documentation

◆ ResolVBus_AddBacktrace()

void ResolVBus_AddBacktrace ( const char *  Expression,
const char *  File,
int  Line,
const char *  Func 
)

Adds another line to the backtrace.

Parameters
ExpressionExpression used in the backtrace line
FileFilename used in the backtrace line
LineLine number used in the backtrace line
FuncFunction name used in the backtrace line

◆ ResolVBus_CalcAndCompareCrc()

RESOLVBUS_RESULT ResolVBus_CalcAndCompareCrc ( uint8_t  ProtocolVersion,
const uint8_t *  Buffer,
size_t  Length,
bool *  pCrcIsValid 
)

Calculate the checksum over (Length - 1) bytes and compare the result to the last byte of the buffer.

Parameters
ProtocolVersionProtocol version to select checksum algorithm
BufferBuffer to calculate and compare checksum
LengthSize of buffer including checksum byte at the end
pCrcIsValidPointer to store checksum comparison result into
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_CalcAndSetCrc()

RESOLVBUS_RESULT ResolVBus_CalcAndSetCrc ( uint8_t  ProtocolVersion,
uint8_t *  Buffer,
size_t  Length 
)

Calculate the checksum over (Length - 1) bytes and set the result into the last byte of the buffer.

Parameters
ProtocolVersionProtocol version to select checksum algorithm
BufferBuffer to calculate and store checksum
LengthSize of buffer including checksum byte at the end
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_CalcCrc()

RESOLVBUS_RESULT ResolVBus_CalcCrc ( uint8_t  ProtocolVersion,
const uint8_t *  Buffer,
size_t  Length,
uint8_t *  pCrc 
)

Calculate the checksum according to the provided protocol version.

Parameters
ProtocolVersionProtocol version to select checksum algorithm
BufferBuffer to calculate checksum over
LengthSize of buffer to calculate checksum over
pCrcPointer to store calculated checksum into
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_CalcCrcV0()

RESOLVBUS_RESULT ResolVBus_CalcCrcV0 ( const uint8_t *  Buffer,
size_t  Length,
uint8_t *  pCrc 
)

Calculate the checksum according to VBus protocol version X.0.

Parameters
BufferBuffer to calculate checksum over
LengthSize of buffer to calculate checksum over
pCrcPointer to store calculated checksum into
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_DebugLog()

void ResolVBus_DebugLog ( const char *  File,
int  Line,
const char *  Func,
const char *  Format,
  ... 
)

Print debug related information on stdout.

Will print something like FormattedMessage [Func (File:Line)]\n to stdout.

Parameters
FileFilename used in the debug output
LineLine number used in the debug output
FuncFunction name used in the debug output
Formatprintf-style format string followed by optional arguments

◆ ResolVBus_ExtractSeptett()

RESOLVBUS_RESULT ResolVBus_ExtractSeptett ( const uint8_t *  Source,
uint8_t *  Destination,
size_t  Length 
)

Extract the MSBs into a septett byte.

This function converts Length bytes of Source data into Length + 1 bytes of destination data. The MSBs of up to 7 Source bytes get extracted into a septett byte which is stored at Destination [Length].

Parameters
SourceBuffer of Length bytes
DestinationBuffer of Length + 1 bytes (data plus septett byte)
LengthSize of buffers without the septett byte (can be between 1 and 7)
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_GetBacktrace()

const char * ResolVBus_GetBacktrace ( void  )

Get the currently stored backtrace.

Returns
Pointer to the currently stored backtrace

◆ ResolVBus_InjectSeptett()

RESOLVBUS_RESULT ResolVBus_InjectSeptett ( const uint8_t *  Source,
uint8_t *  Destination,
size_t  Length 
)

Inject a septett byte into the MSBs.

This function converts Length + 1 bytes of Source data into Length bytes of destination data. The MSBs of up to 7 Destination bytes are injected from a septett byte which is stored at Source [Length].

Parameters
SourceBuffer of Length + 1 bytes (data plus septett byte)
DestinationBuffer of Length bytes
LengthSize of buffers without the septett byte (can be between 1 and 7)
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveDecoder_Decode()

RESOLVBUS_RESULT ResolVBus_LiveDecoder_Decode ( RESOLVBUS_LIVEDECODER Decoder,
const uint8_t *  Bytes,
size_t  Length 
)

Decode the provided bytes.

This function decodes the provided bytes and emits events every time a valid VBus primitive is reconstructed.

Parameters
DecoderDecoder instance
BytesData to decode
LengthLength of the Bytes buffer
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveDecoder_Initialize()

RESOLVBUS_RESULT ResolVBus_LiveDecoder_Initialize ( RESOLVBUS_LIVEDECODER Decoder,
void *  FrameDataBuffer,
size_t  FrameDataBufferLength,
RESOLVBUS_LIVEDECODERHANDLER  Handler 
)

Initialize a RESOLVBUS_LIVEDECODER instance.

Lifetime: FrameDataBuffer must outlive Decoder.

Parameters
DecoderDecoder instance to initialize
FrameDataBufferOptional buffer to reconstruct frame data into
FrameDataBufferLengthLength of the optional FrameDataBuffer
HandlerHandler that is called when an event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_GetTimeout()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_GetTimeout ( RESOLVBUS_LIVEENCODER Encoder,
uint32_t *  pMicroseconds 
)

Return the amount of time that the encoder needs to pass into another phase.

The resulting timeout depends on the phase the encoder is currently in:

  • ..._IDLE: timeout is always 0, because it will emit ..._IDLE events every time ResolVBus_LiveEncoder_HandleTimer is called
  • ..._TRANSMITTING: calculates remaining time for the data to be transmitted at the configured baudrate
  • ..._GAININGENERGY: calculates remaining time for the VBus to reach full energy level
  • ..._SUSPENDED: timeout is always UINT32_MAX
  • ..._SUSPENDEDWITHTIMEOUT: calculates remaining time for the encoder to automatically resume
Parameters
EncoderEncoder instance
pMicrosecondsPointer to store the timeout value into
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_HandleTimer()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_HandleTimer ( RESOLVBUS_LIVEENCODER Encoder,
uint32_t  Microseconds 
)

Inform the encoder that a certain amount of time has passed.

This function should be called "frequently" to update the internal state machine of the encoder:

  • after the amount of time returned by ResolVBus_LiveEncoder_GetTimeout has passed
  • after resuming the encoder using ResolVBus_LiveEncoder_Resume
  • after sending VBus primitives using ResolVBus_LiveEncoder_Send...

Whenever the internal state machine transitions into the IDLE phase, the encoder checks whether it can automatically transition into another phase:

  • if data has been queued in the transmit buffer it will emit a TRANSMIT event and transition into the TRANSMITTING phase
  • if a suspend without a timeout has been requested while the encoder was not idle it will transition into the SUSPENDED phase now
  • if a suspend with a timeout has been requested while the encoder was not idle it will transition into the SUSPENDEDWITHTIMEOUT phase now
  • otherwise it emits an IDLE event and stays in the IDLE phase
Parameters
EncoderEncoder instance
MicrosecondsAmount of time passed since last call to this function
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_Initialize()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_Initialize ( RESOLVBUS_LIVEENCODER Encoder,
uint8_t *  Buffer,
size_t  Length,
RESOLVBUS_LIVEENCODERHANDLER  Handler 
)

Initialize a RESOLVBUS_LIVEENCODER instance.

Lifetime: Buffer must outlive Encoder.

Parameters
EncoderEncoder instance to initialize
BufferTransmit buffer to construct VBus primitives into
LengthLength of the Buffer
HandlerHandler that is called when an event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueueDatagram()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueDatagram ( RESOLVBUS_LIVEENCODER Encoder,
uint16_t  DestinationAddress,
uint16_t  SourceAddress,
uint8_t  MinorVersion,
uint16_t  Command,
uint16_t  Param16,
uint32_t  Param32 
)

Queue a VBus datagram into the transmit buffer.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
DestinationAddressDestination address of the datagram
SourceAddressSource address of the datagram
MinorVersionMinor protocol version of the datagram (major version will always be 0x20)
CommandCommand of the datagram
Param1616-bit parameter of the datagram
Param3232-bit parameter of the datagram
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueuePacketFrame()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketFrame ( RESOLVBUS_LIVEENCODER Encoder,
const uint8_t *  FourBytes 
)

Queue a VBus packet frame into the transmit buffer.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
FourBytesBuffer containing the four bytes payload of the frame
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueuePacketFrames()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketFrames ( RESOLVBUS_LIVEENCODER Encoder,
const void *  Bytes,
size_t  Length 
)

Queue one or more VBus packet frames into the transmit buffer.

If Length is not a multiple of four, the last frame is padded with 0xFF.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
BytesBuffer containing the payload of the frames
LengthLength of the Bytes buffer
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueuePacketHeader()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueuePacketHeader ( RESOLVBUS_LIVEENCODER Encoder,
uint16_t  DestinationAddress,
uint16_t  SourceAddress,
uint8_t  MinorVersion,
uint16_t  Command,
uint8_t  FrameCount 
)

Queue a VBus packet header into the transmit buffer.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
DestinationAddressDestination address of the packet
SourceAddressSource address of the packet
MinorVersionMinor protocol version of the packet (major version will always be 0x10)
CommandCommand of the packet
FrameCountFrame count of the packet
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueueTelegramFrame()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramFrame ( RESOLVBUS_LIVEENCODER Encoder,
const uint8_t *  SevenBytes 
)

Queue a VBus telegram frame into the transmit buffer.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
SevenBytesBuffer containing the seven bytes payload of the frame
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueueTelegramFrames()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramFrames ( RESOLVBUS_LIVEENCODER Encoder,
const void *  Bytes,
size_t  Length 
)

Queue one or more VBus telegram frames into the transmit buffer.

If Length is not a multiple of seven, the last frame is padded with 0xFF.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
BytesBuffer containing the payload of the frames
LengthLength of the Bytes buffer
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_QueueTelegramHeader()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_QueueTelegramHeader ( RESOLVBUS_LIVEENCODER Encoder,
uint16_t  DestinationAddress,
uint16_t  SourceAddress,
uint8_t  MinorVersion,
uint8_t  Command,
uint8_t  FrameCount 
)

Queue a VBus telegram header into the transmit buffer.

See ResolVBus_LiveEncoder_HandleTimer for transmit buffer handling details.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state.

Parameters
EncoderEncoder instance
DestinationAddressDestination address of the telegram
SourceAddressSource address of the telegram
MinorVersionMinor protocol version of the telegram (major version will always be 0x30)
CommandCommand of the telegram
FrameCountFrame count of the telegram
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_Resume()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_Resume ( RESOLVBUS_LIVEENCODER Encoder)

Resume operation of a suspended encoder.

Parameters
EncoderEncoder instance
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_Suspend()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_Suspend ( RESOLVBUS_LIVEENCODER Encoder)

Suspend the encoder indefinitely.

If the encoder is idle, it will be suspended immediately. If the encoder is not idle, it will complete the currently running operation first. After that it will enter a suspended state indefinitely. The encoder must be manually resumed using ResolVBus_LiveEncoder_Resume to continue operation.

Parameters
EncoderEncoder instance
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_SuspendWithTimeout()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_SuspendWithTimeout ( RESOLVBUS_LIVEENCODER Encoder,
uint32_t  Microseconds 
)

Suspend the encoder for the provided time.

If the encoder is not idle, it will complete the currently running operation first. After that it will enter a suspended state for the provided time. After that time has passed, the encoder will automatically resume operation again. The encoder can be manually resumed before the timeout has passed by using ResolVBus_LiveEncoder_Resume.

Parameters
EncoderEncoder instance
MicrosecondsAmount of time after which the encoder automatically resumes operation
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveEncoder_SuspendWithTimeoutAndCallback()

RESOLVBUS_RESULT ResolVBus_LiveEncoder_SuspendWithTimeoutAndCallback ( RESOLVBUS_LIVEENCODER Encoder,
uint32_t  Microseconds,
RESOLVBUS_LIVEENCODERCALLBACK  Callback,
void *  Context 
)

Suspend the encoder for the provided time, calling the callback after the time has passed.

If the encoder is not idle, it will complete the currently running operation first. After that it will enter a suspended state for the provided time. After that time has passed, the encoder will call the provided callback and automatically resume operation again. The encoder can be manually resumed before the timeout has passed by using ResolVBus_LiveEncoder_Resume. In that case the callback is not called.

This function will return RESOLVBUS_ERROR_SUSPENDED if the encoder is already flagged for or running in a suspended state. Calling ResolVBus_LiveEncoder_Resume directly before this function makes sure that the encoder is in a safe state.

Parameters
EncoderEncoder instance
MicrosecondsAmount of time after which the encoder automatically resumes operation
CallbackFunction to call after the timeout has passed
ContextContext to pass into the callback
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_Decode()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_Decode ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
const uint8_t *  Bytes,
size_t  Length 
)

Decode the provided bytes.

This function decodes the provided bytes and emits events every time a valid VBus primitive is reconstructed.

Parameters
TransceiverTransceiver instance
BytesData to decode
LengthLength of the Bytes buffer
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_GetEncoder()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetEncoder ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
RESOLVBUS_LIVEENCODER **  pEncoder 
)

Get access to the transceiver's encoder.

Parameters
TransceiverTransceiver instance
pEncoderPointer to store the Encoder instance into
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_GetTimeout()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetTimeout ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint32_t *  pMicroseconds 
)

Returns the amount of time that the transceiver needs to pass into another phase.

The resulting timeout depends on the phase the transceiver's encoder is currently in as well as the remaining time until the currently active action times out.

Parameters
TransceiverTransceiver instance
pMicrosecondsPointer to store the timeout value into
Returns
RESOLVBUS_OK if no error occured

◆ ResolVBus_LiveTransceiver_GetValueById()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetValueById ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint16_t  PeerAddress,
uint16_t  ValueId,
uint8_t  ValueSubIndex,
const RESOLVBUS_LIVETRANSCEIVEROPTIONS CustomOptions,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Start an action to get a value from the controller.

Parameters
TransceiverTransceiver instance
PeerAddressVBus address to pass bus control back to
ValueIdID of the value to read
ValueSubIndexSubindex of the value to read (if supported)
CustomOptionsOptional custom options
HandlerHandler that is called when an action related event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_GetValueIdByIdHash()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_GetValueIdByIdHash ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint16_t  PeerAddress,
uint32_t  ValueIdHash,
const RESOLVBUS_LIVETRANSCEIVEROPTIONS CustomOptions,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Start an action to lookup a value's ID based on its ID hash.

Parameters
TransceiverTransceiver instance
PeerAddressVBus address to pass bus control back to
ValueIdHashID hash of the value to lookup
CustomOptionsOptional custom options
HandlerHandler that is called when an action related event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_HandleTimer()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_HandleTimer ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint32_t  Microseconds 
)

Inform the transceiver that a certain amount of time has passed.

This function should be called "frequently" to update the internal state machine of the encoder:

  • after the amount of time returned by ResolVBus_LiveTransceiver_GetTimeout has passed
  • after responding to a event
  • after starting an action
Parameters
TransceiverTransceiver instance
MicrosecondsAmount of time passed since last call to this function
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_Initialize()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_Initialize ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint8_t *  EncoderBuffer,
size_t  EncoderBufferLength,
void *  DecoderBuffer,
size_t  DecoderBufferLength,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Initialize a RESOLVBUS_LIVETRANSCEIVER instance.

Lifetime: EncoderBuffer and DecoderBuffer must outlive Transceiver.

Parameters
TransceiverTransceiver instance to initialize
EncoderBufferTransmit buffer to construct VBus primitives into
EncoderBufferLengthLength of the EncoderBuffer
DecoderBufferOptional buffer to reconstruct frame data into
DecoderBufferLengthLength of the optional DecoderBuffer
HandlerHandler that is called when an event is emitted
Returns
RESOLVBUS_OK if no error occured

◆ ResolVBus_LiveTransceiver_ReleaseBus()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_ReleaseBus ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint16_t  PeerAddress,
const RESOLVBUS_LIVETRANSCEIVEROPTIONS CustomOptions,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Start an action to release bus control back to the controller.

Parameters
TransceiverTransceiver instance
PeerAddressVBus address to pass bus control back to
CustomOptionsOptional custom options
HandlerHandler that is called when an action related event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_SetValueById()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_SetValueById ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
uint16_t  PeerAddress,
uint16_t  ValueId,
uint8_t  ValueSubIndex,
uint32_t  Value,
const RESOLVBUS_LIVETRANSCEIVEROPTIONS CustomOptions,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Start an action to set a value in the controller.

Parameters
TransceiverTransceiver instance
PeerAddressVBus address to pass bus control back to
ValueIdID of the value to write
ValueSubIndexSubindex of the value to write (if supported)
ValueValue to write
CustomOptionsOptional custom options
HandlerHandler that is called when an action related event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_LiveTransceiver_WaitForFreeBus()

RESOLVBUS_RESULT ResolVBus_LiveTransceiver_WaitForFreeBus ( RESOLVBUS_LIVETRANSCEIVER Transceiver,
const RESOLVBUS_LIVETRANSCEIVEROPTIONS CustomOptions,
RESOLVBUS_LIVETRANSCEIVERHANDLER  Handler 
)

Start an action to wait for the controller to offer bus control.

Parameters
TransceiverTransceiver instance
CustomOptionsOptional custom options
HandlerHandler that is called when an action related event is emitted
Returns
RESOLVBUS_OK if no error occurred

◆ ResolVBus_PrintBacktrace()

void ResolVBus_PrintBacktrace ( void  )

Print the currently stored backtrace.

◆ ResolVBus_ReadUInt16LE()

uint16_t ResolVBus_ReadUInt16LE ( const uint8_t *  Buffer)

Read an unsigned, little-endian 16-bit integer from the buffer.

Parameters
BufferBuffer of at least 2 bytes to read integer from
Returns
Read integer

◆ ResolVBus_ReadUInt32LE()

uint32_t ResolVBus_ReadUInt32LE ( const uint8_t *  Buffer)

Read an unsigned, little-endian 32-bit integer from the buffer.

Parameters
BufferBuffer of at least 4 bytes to read integer from
Returns
Read integer

◆ ResolVBus_ResetBacktrace()

void ResolVBus_ResetBacktrace ( const char *  Message,
const char *  Expression,
const char *  File,
int  Line,
const char *  Func 
)

Clear the backtrace buffer and fill it with the provided information.

Parameters
MessageMessage to put above the backtrace
ExpressionExpression used in the backtrace line
FileFilename used in the backtrace line
LineLine number used in the backtrace line
FuncFunction name used in the backtrace line

◆ ResolVBus_WriteUInt16LE()

void ResolVBus_WriteUInt16LE ( uint8_t *  Buffer,
uint16_t  Value 
)

Write an unsigned, little-endian 16-bit integer to the buffer.

Parameters
BufferBuffer of at least 2 bytes to write integer into
ValueInteger to write

◆ ResolVBus_WriteUInt32LE()

void ResolVBus_WriteUInt32LE ( uint8_t *  Buffer,
uint32_t  Value 
)

Write an unsigned, little-endian 32-bit integer to the buffer.

Parameters
BufferBuffer of at least 4 bytes to write integer into
ValueInteger to write