Lely core libraries
2.3.4
|
This file is part of the utilities library; it contains the implementation of the byte order functions. More...
Go to the source code of this file.
Functions | |
void | bcpybe (uint_least8_t *dst, int dstbit, const uint_least8_t *src, int srcbit, size_t n) |
Copies n bits from a source to a destination buffer. More... | |
void | bcpyle (uint_least8_t *dst, int dstbit, const uint_least8_t *src, int srcbit, size_t n) |
Copies n bits from a source to a destination buffer. More... | |
This file is part of the utilities library; it contains the implementation of the byte order functions.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file endian.c.
void bcpybe | ( | uint_least8_t * | dst, |
int | dstbit, | ||
const uint_least8_t * | src, | ||
int | srcbit, | ||
size_t | n | ||
) |
Copies n bits from a source to a destination buffer.
The buffers MUST NOT overlap. This function assumes a big-endian bit ordering (i.e., bit 0 is the most significant bit). On platforms where CHAR_BIT != 8
, only the 8 least significant bits of each byte are copied.
dst | a pointer to the destination buffer. |
dstbit | the destination offset (in bits) with respect to dst. |
src | a pointer to the source buffer. |
srcbit | the source offset (in bits) with respect to src. |
n | the number of bits to copy. |
void bcpyle | ( | uint_least8_t * | dst, |
int | dstbit, | ||
const uint_least8_t * | src, | ||
int | srcbit, | ||
size_t | n | ||
) |
Copies n bits from a source to a destination buffer.
The buffers MUST NOT overlap. This function assumes a little-endian bit ordering (i.e., bit 0 is the least significant bit). On platforms where CHAR_BIT != 8
, only the 8 least significant bits of each byte are copied.
dst | a pointer to the destination buffer. |
dstbit | the destination offset (in bits) with respect to dst. |
src | a pointer to the source buffer. |
srcbit | the source offset (in bits) with respect to src. |
n | the number of bits to copy. |