sm8250-common: vibrator: Implement OOS style effects for LED vibrator

This change implements the following effects:
- Effect::CLICK
- Effect::DOUBLE_CLICK
- Effect::TICK
- Effect::HEAVY_CLICK

Effect write streams were dumped using following strace command:
- strace -fp `pidof vendor.oneplus.hardware.lmvibrator@1.0-service` -e openat,write

Also, these effects can easily be tested with following test app:
- https://github.com/luk1337/VibeTest

Change-Id: Ie65caa0c65dc81bb35a7bcc56870649e895ced3f
This commit is contained in:
LuK1337
2021-04-14 14:30:48 +02:00
parent dc3d086fbd
commit 04cf04fab5
2 changed files with 85 additions and 17 deletions

View File

@@ -60,7 +60,6 @@ public:
int on(int32_t timeoutMs);
int off();
bool mDetected;
private:
int write_value(const char *file, const char *value);
};