1
0
Fork 0

haptic: Feature to disable it when usb port is not configured or suspended. (#12692)

This also add support for specifying a LED pin to indicate haptic status,
and also adds support for a haptic-enable pin, which is useful to turn off
the boost converter on the solenoid driver.
This commit is contained in:
Purdea Andrei 2021-11-02 07:54:29 +02:00 committed by GitHub
parent 85d94d0c4d
commit 76fb54403c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 115 additions and 11 deletions

View file

@ -49,6 +49,14 @@
# error SOLENOID_PIN not defined
#endif
#ifdef SOLENOID_PIN_ACTIVE_LOW
# define SOLENOID_PIN_WRITE_ACTIVE() writePinLow(SOLENOID_PIN)
# define SOLENOID_PIN_WRITE_INACTIVE() writePinHigh(SOLENOID_PIN)
#else
# define SOLENOID_PIN_WRITE_ACTIVE() writePinHigh(SOLENOID_PIN)
# define SOLENOID_PIN_WRITE_INACTIVE() writePinLow(SOLENOID_PIN)
#endif
void solenoid_buzz_on(void);
void solenoid_buzz_off(void);
void solenoid_set_buzz(int buzz);