if (Buffer->Out.ByteMask == (1 << 7))
        {
                /* Check if the end of the buffer has been reached, if so reset to start of buffer, otherwise advance to next bit */
                if (Buffer->Out.CurrentByte != &Buffer->Data[sizeof(Buffer->Data) - 1])
                  Buffer->Out.CurrentByte++;
                else
        if (Buffer->Out.ByteMask == (1 << 7))
        {
                /* Check if the end of the buffer has been reached, if so reset to start of buffer, otherwise advance to next bit */
                if (Buffer->Out.CurrentByte != &Buffer->Data[sizeof(Buffer->Data) - 1])
                  Buffer->Out.CurrentByte++;
                else