joan2937 / pigpio

pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
The Unlicense
1.43k stars 403 forks source link

Save and restore PWM, PCM, and clock state #568

Open dspinellis opened 1 year ago

dspinellis commented 1 year ago

This prevents pigpio wave output from disrupting sound output performed at a later point.

Tests have been added and all tests run successfully. (Strangely, fewer than imagined tests fail when the state is not restored.) The C interface has been extended with two internal functions prefixed with gpioInternal, which are only used for testing and are therefore not included in the header file.

Issue: joan2937/pigpio#567