Skip to content

Commit

Permalink
Add LsBus-SiLVi slides
Browse files Browse the repository at this point in the history
  • Loading branch information
msuevern committed Nov 8, 2023
1 parent ca81817 commit cd08f0c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions ls-bus-guide/headers/fmi3LsBusUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,30 @@ typedef struct
} \
while (0)

/**
* \brief Checks whether a buffer variable is empty.
*
* \param[in] BufferInfo Pointer to variable of type \ref fmi3LsBusUtilBufferInfo.
*/
#define FMI3_LS_BUS_BUFFER_IS_EMPTY(BufferInfo) \
(BufferInfo)->writePos == (BufferInfo)->start ? fmi3True : fmi3False

/**
* \brief Returns the start address of the buffer variable.
*
* \param[in] BufferInfo Pointer to variable of type \ref fmi3LsBusUtilBufferInfo.
*/
#define FMI3_LS_BUS_BUFFER_START(BufferInfo) \
(BufferInfo)->start

/**
* \brief Returns the length of the buffer variable.
*
* \param[in] BufferInfo Pointer to variable of type \ref fmi3LsBusUtilBufferInfo.
*/
#define FMI3_LS_BUS_BUFFER_LENGTH(BufferInfo) \
(BufferInfo)->writePos - (BufferInfo)->start

/**
* \brief Reads the next bus operation from a buffer.
*
Expand Down

0 comments on commit cd08f0c

Please sign in to comment.