Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins: cn0540: allow up to 64 GPIOs (one-bit-adc-dac) instances
The plugin supports 8 GPIOs (as is the design of the CN0540 board). With some minor customizations, more GPIOs can be adapted (for some extra controls). When that happens, OSC will crash as 'gpio_ch[++idx].gpio = iio_device_find_channel()' will go beyond the size of the gpio_ch[] array. So, a quick fix is to just allow more GPIOs (64 should be enough for anyone). But mainly, it would be guard against going above the size of the gpio_ch[] array. Signed-off-by: Alexandru Ardelean <[email protected]>
- Loading branch information