#include <modm/driver/motion/pat9125el.hpp>
|
enum | Register : uint8_t {
ProductId1 = 0x00,
ProductId2 = 0x01,
MotionStatus = 0x02,
DeltaXLow = 0x03,
DeltaYLow = 0x04,
OperationMode = 0x05,
Configuration = 0x06,
WriteProtect = 0x09,
Sleep1 = 0x0A,
Sleep2 = 0x0B,
ResolutionX = 0x0D,
ResolutionY = 0x0E,
DeltaXYHigh = 0x12,
ShutterTime = 0x14,
AvgBrightness = 0x17,
Orientation = 0x19
} |
|
enum | MotionStatus : uint8_t { DataAvailable = (1 << 7)
} |
|
enum | WriteProtect : uint8_t { Enabled = 0,
Disabled = 0x5A
} |
|
|
static constexpr uint8_t | ProductId1 = 0x31 |
|
static constexpr bool | UseInterruptPin = !std::is_void_v<IntPin> |
|
template<typename Transport, typename IntPin = void>
class modm::pat9125el< Transport, IntPin >
Driver for PAT9125EL motion sensor. Currently only the I2C version is supported.
- Template Parameters
-
Transport | Either I2C or SPi transport layer |
- See also
- Pat9125elI2cTransport
- Template Parameters
-
IntPin | Optional interrupt pin. If pin is not connected, set to void. |
- Author
- Christopher Durand
template<typename Transport , typename IntPin = void>
modm::ResumableResult<bool> modm::pat9125el< Transport, IntPin >::configure |
( |
uint8_t |
xResolution = 0x14 , |
|
|
uint8_t |
yResolution = 0x14 |
|
) |
| |
Configure sensor resolution
- Parameters
-
xResolution | x resolution in unit of 5 counts per inch |
yResolution | y resolution in unit of 5 counts per inch |
template<typename Transport , typename IntPin = void>
Motion2D modm::pat9125el< Transport, IntPin >::getData |
( |
| ) |
const |
Returns the last measured movement data read from the device
template<typename Transport , typename IntPin = void>
bool modm::pat9125el< Transport, IntPin >::hasMoved |
( |
| ) |
const |
Check if non-zero movement data has been read form the device
template<typename Transport , typename IntPin = void>
template<typename... TransportArgs>
modm::pat9125el< Transport, IntPin >::Pat9125el |
( |
TransportArgs &&... |
args | ) |
|
template<typename Transport , typename IntPin = void>
Check if the device is available
template<typename Transport , typename IntPin = void>
Read movement measurement from the device
The documentation for this class was generated from the following file: