On Thu, Jul 07, 2022 at 10:41:21AM +0200, Bartosz Golaszewski wrote: > On Thu, Jul 7, 2022 at 4:27 AM Kent Gibson <warthog618@xxxxxxxxx> wrote: > > > > On Wed, Jul 06, 2022 at 10:46:28PM +0200, Bartosz Golaszewski wrote: > > > On Mon, Jun 27, 2022 at 3:46 PM Kent Gibson <warthog618@xxxxxxxxx> wrote: > > > > > > > > Add a gpiowatch tool, based on gpiomon, but reporting line info change > > > > events similar to the gpio-watch tool in the linux kernel. > > > > > > > > + } ... > > > > > > Moar newlines, I really like between blocks of code, it really helps me, thanks. > > > > > > > Oh, ok, I see this as being one block. Where would you like the splits? > > > > I will add them myself later, don't worry about it. > I think I know what you mean. Anyway, I'll add a tonne of whitespace... > > > > + print_event_time(evtime, event_clock_mode); > > > > + printf(" %s", evname); Like here > > > > + if (chip_id) > > > > + printf(" %s %d", chip_id, gpiod_line_info_get_offset(info)); and here. > > > > + print_line_info(info); > > > > + printf("\n"); > > > > +} > > > > + ... > > > > > > > > > > Looks good to me, I would have probably added a machine-readable > > > output formatting like gpiomon but we can always extend it later. > > > > > > > You mean the format option? > > > > Yes. But that can be easily added later. > I was thinking the Python bindings would be the way to go if you want to extract specific bits. Turns out when I created a new libgpiod workspace in my editor it defaulted tabs to 4 spaces, which might've been the cause of some unfortunate formatting. Sorted for the next version. Cheers, Kent.