|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
@license MIT License More...
#include <HapticDrivers.hpp>Go to the source code of this file.
Macros | |
| #define | SENSOR_SDA 3 |
| #define | SENSOR_SCL 2 |
Functions | |
| void | printBanner () |
| void | testCapabilities () |
| void | testInit () |
| void | testActuatorType () |
| void | testLibrarySelection () |
| void | testPlayEffect () |
| void | testPlayEffectRange () |
| void | testSetSequence () |
| void | testRTP () |
| void | testStop () |
| void | testStatus () |
| void | testModes () |
| void | testCalibration () |
| void | testF0 () |
| void | testStandby () |
| void | testNormalMode () |
| void | testAutoDemo () |
| void | printHelp () |
| void | setup () |
| void | loop () |
Variables | |
| HapticDriver_DRV2605 | haptic |
@license MIT License
Copyright (c) 2026 lewis he
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file drv2605_full.ino.
| #define SENSOR_SCL 2 |
Definition at line 37 of file drv2605_full.ino.
| #define SENSOR_SDA 3 |
Definition at line 33 of file drv2605_full.ino.
| void loop | ( | ) |
Definition at line 376 of file drv2605_full.ino.
References cmd, HapticDriver_DRV2605::getVbat(), haptic, printHelp(), testActuatorType(), testAutoDemo(), testCalibration(), testCapabilities(), testF0(), testInit(), testLibrarySelection(), testModes(), testNormalMode(), testPlayEffect(), testPlayEffectRange(), testRTP(), testSetSequence(), testStandby(), testStatus(), and testStop().
| void printBanner | ( | ) |
Definition at line 42 of file drv2605_full.ino.
Referenced by setup().
| void printHelp | ( | ) |
Definition at line 326 of file drv2605_full.ino.
| void setup | ( | ) |
Definition at line 359 of file drv2605_full.ino.
References printBanner(), printHelp(), testAutoDemo(), testCapabilities(), and testInit().
| void testActuatorType | ( | ) |
Definition at line 87 of file drv2605_full.ino.
References ERM, HapticDriver_DRV2605::getActuatorType(), haptic, LRA, and HapticDriver_DRV2605::setActuatorType().
Referenced by loop(), and testAutoDemo().
| void testAutoDemo | ( | ) |
Definition at line 280 of file drv2605_full.ino.
References HapticDriver_DRV2605::calibrate(), haptic, HapticDriver_DRV2605::playEffect(), HapticDriver_DRV2605::stop(), testActuatorType(), testF0(), testLibrarySelection(), testModes(), testPlayEffectRange(), testRTP(), testSetSequence(), and testStatus().
| void testCalibration | ( | ) |
Definition at line 241 of file drv2605_full.ino.
References HapticDriver_DRV2605::calibrate(), and haptic.
Referenced by loop().
| void testCapabilities | ( | ) |
Definition at line 51 of file drv2605_full.ino.
References HapticDriver_DRV2605::getCapabilities(), and haptic.
| void testF0 | ( | ) |
Definition at line 254 of file drv2605_full.ino.
References HapticDriver_DRV2605::getF0(), and haptic.
Referenced by loop(), and testAutoDemo().
| void testInit | ( | ) |
Definition at line 69 of file drv2605_full.ino.
References I2CDeviceWithHal::begin(), HapticDriver_DRV2605::getActuatorType(), HapticDriver_DRV2605::getChipID(), HapticDriver_DRV2605::getChipName(), HapticDriver_DRV2605::getMode(), HapticDriver_DRV2605::getVbat(), haptic, LRA, SENSOR_SCL, and SENSOR_SDA.
| void testLibrarySelection | ( | ) |
Definition at line 105 of file drv2605_full.ino.
References haptic, HapticDriver_DRV2605::playEffect(), and HapticDriver_DRV2605::selectLibrary().
Referenced by loop(), and testAutoDemo().
| void testModes | ( | ) |
Definition at line 217 of file drv2605_full.ino.
References DIAGNOSTICS, HapticDriver_DRV2605::getMode(), haptic, INTERNAL_TRIGGER, REAL_TIME_PLAYBACK, HapticDriver_DRV2605::setMode(), and STANDBY.
Referenced by loop(), and testAutoDemo().
| void testNormalMode | ( | ) |
Definition at line 273 of file drv2605_full.ino.
References haptic, INTERNAL_TRIGGER, and HapticDriver_DRV2605::setMode().
Referenced by loop().
| void testPlayEffect | ( | ) |
Definition at line 129 of file drv2605_full.ino.
References haptic, and HapticDriver_DRV2605::playEffect().
Referenced by loop().
| void testPlayEffectRange | ( | ) |
Definition at line 142 of file drv2605_full.ino.
References haptic, i, and HapticDriver_DRV2605::playEffect().
Referenced by loop(), and testAutoDemo().
| void testRTP | ( | ) |
Definition at line 168 of file drv2605_full.ino.
References haptic, i, INTERNAL_TRIGGER, REAL_TIME_PLAYBACK, HapticDriver_DRV2605::setMode(), HapticDriver_DRV2605::setRealtimeValue(), and HapticDriver_DRV2605::stop().
Referenced by loop(), and testAutoDemo().
| void testSetSequence | ( | ) |
Definition at line 153 of file drv2605_full.ino.
References HapticDriver_DRV2605::clearSequence(), haptic, HapticDriver_DRV2605::playSequence(), and HapticDriver_DRV2605::setSequence().
Referenced by loop(), and testAutoDemo().
| void testStandby | ( | ) |
Definition at line 266 of file drv2605_full.ino.
References haptic, HapticDriver_DRV2605::setMode(), and STANDBY.
Referenced by loop().
| void testStatus | ( | ) |
Definition at line 200 of file drv2605_full.ino.
References CALIBRATING, ERROR, HapticDriver_DRV2605::getStatus(), haptic, IDLE, PAUSED, PLAYING, and STANDBY.
Referenced by loop(), and testAutoDemo().
| void testStop | ( | ) |
Definition at line 188 of file drv2605_full.ino.
References haptic, HapticDriver_DRV2605::isPlaying(), HapticDriver_DRV2605::playEffect(), and HapticDriver_DRV2605::stop().
Referenced by loop().
| HapticDriver_DRV2605 haptic |
Definition at line 40 of file drv2605_full.ino.
Referenced by loop(), testActuatorType(), testAutoDemo(), testCalibration(), testCapabilities(), testF0(), testInit(), testLibrarySelection(), testModes(), testNormalMode(), testPlayEffect(), testPlayEffectRange(), testRTP(), testSetSequence(), testStandby(), testStatus(), and testStop().