blob: f539f04ccd0b6d92b97296412cd11e95b3f7b5db [file] [log] [blame] [edit]
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of libgpiod.
#
# Copyright (C) 2017-2018 Bartosz Golaszewski <bartekgola@gmail.com>
#
'''Reimplementation of the gpiodetect tool in Python.'''
import gpiod
for chip in gpiod.ChipIter():
print('{} [{}] ({} lines)'.format(chip.name(),
chip.label(),
chip.num_lines()))
chip.close()