---
name: "iio_validate_scan_mask_onehot"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/iio_validate_scan_mask_onehot"
---

# iio\_validate\_scan\_mask\_onehot(9)

Validates that exactly one channel is selected

## NAME

iio\_validate\_scan\_mask\_onehot - Validates that exactly one channel is selected

## SYNOPSIS

**bool iio\_validate\_scan\_mask\_onehot(struct iio\_dev \*** *indio\_dev***, const unsigned long \*** *mask***);**

## ARGUMENTS

*indio\_dev*

the iio device

*mask*

scan mask to be checked

## DESCRIPTION

Return true if exactly one bit is set in the scan mask, false otherwise. It can be used for devices where only one channel can be active for sampling at a time.

## AUTHOR

**Daniel Baluta** \<daniel.baluta@intel.com\>

Author.

## COPYRIGHT
