---
name: "modbus_set_bits_from_bytes"
section: "3"
platform: "linux"
package: "libmodbus-dev"
version: "3.1.6-2.1"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/modbus_set_bits_from_bytes"
---

# modbus\_set\_bits\_from\_bytes(3)

set many bits from an array of bytes

## NAME

modbus\_set\_bits\_from\_bytes - set many bits from an array of bytes

## SYNOPSIS

**void modbus\_set\_bits\_from\_bytes(uint8\_t \****dest***, int** *index***, unsigned int** *nb\_bits***, const uint8\_t \****tab\_byte***);**

## DESCRIPTION

The **modbus\_set\_bits\_from\_bytes** function shall set bits by reading an array of bytes. All the bits of the bytes read from the first position of the array *tab\_byte* are written as bits in the *dest* array starting at position *index*.

## RETURN VALUE

There is no return values.

## SEE ALSO

[**modbus\_set\_bits\_from\_byte**(3)](/modbus_set_bits_from_byte/3.md) [**modbus\_get\_byte\_from\_bits**(3)](/modbus_get_byte_from_bits/3.md)

## AUTHORS

The libmodbus documentation was written by Stéphane Raimbault \<stephane.raimbault@gmail.com\>
