PX4 Firmware
PX4 Autopilot Software http://px4.io
PixArt_PAW3902JF_Registers.hpp
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* Copyright (c) 2019 PX4 Development Team. All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in
13
* the documentation and/or other materials provided with the
14
* distribution.
15
* 3. Neither the name PX4 nor the names of its contributors may be
16
* used to endorse or promote products derived from this software
17
* without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
* POSSIBILITY OF SUCH DAMAGE.
31
*
32
****************************************************************************/
33
34
#pragma once
35
36
namespace
PixArt_PAW3902JF
37
{
38
39
static
constexpr uint8_t
PRODUCT_ID
= 0x49;
// shared with the PMW3901
40
static
constexpr uint8_t
REVISION_ID
= 0x01;
41
42
static
constexpr uint32_t
SAMPLE_INTERVAL_MODE_0
{1000000 / 126};
// 126 fps
43
static
constexpr uint32_t
SAMPLE_INTERVAL_MODE_1
{1000000 / 126};
// 126 fps
44
static
constexpr uint32_t
SAMPLE_INTERVAL_MODE_2
{1000000 / 50};
// 50 fps
45
46
static
constexpr uint64_t
T_SWW
{11};
// 10.5 microseconds
47
static
constexpr uint64_t
T_SRR
{2};
// 1.5 microseconds
48
49
enum
Register
: uint8_t {
50
Product_ID
= 0x00,
51
Revision_ID
= 0x01,
52
Motion
= 0x02,
53
Delta_X_L
= 0x03,
54
Delta_X_H
= 0x04,
55
Delta_Y_L
= 0x05,
56
Delta_Y_H
= 0x06,
57
Squal
= 0x07,
58
RawData_Sum
= 0x08,
59
Maximum_RawData
= 0x09,
60
Minimum_RawData
= 0x0A,
61
Shutter_Lower
= 0x0B,
62
Shutter_Upper
= 0x0C,
63
64
Observation
= 0x15,
65
Motion_Burst
= 0x16,
66
67
Power_Up_Reset
= 0x3A,
68
69
Resolution
= 0x4E,
70
71
};
72
73
enum
Product_ID_Bit
: uint8_t {
74
Reset
= 0x5A,
75
};
76
77
78
enum class
Mode
{
79
Bright
= 0,
80
LowLight
= 1,
81
SuperLowLight
= 2,
82
};
83
84
struct
BURST_TRANSFER
{
85
uint8_t
Motion
;
86
uint8_t
Observation
;
87
uint8_t
Delta_X_L
;
88
uint8_t
Delta_X_H
;
89
uint8_t
Delta_Y_L
;
90
uint8_t
Delta_Y_H
;
91
uint8_t
SQUAL
;
92
uint8_t
RawData_Sum
;
93
uint8_t
Maximum_RawData
;
94
uint8_t
Minimum_RawData
;
95
uint8_t
Shutter_Upper
;
96
uint8_t
Shutter_Lower
;
97
};
98
99
}
PixArt_PAW3902JF::Reset
Definition:
PixArt_PAW3902JF_Registers.hpp:74
PixArt_PAW3902JF
Definition:
PixArt_PAW3902JF_Registers.hpp:36
PixArt_PAW3902JF::T_SRR
static constexpr uint64_t T_SRR
Definition:
PixArt_PAW3902JF_Registers.hpp:47
PixArt_PAW3902JF::Observation
Definition:
PixArt_PAW3902JF_Registers.hpp:64
PixArt_PAW3902JF::T_SWW
static constexpr uint64_t T_SWW
Definition:
PixArt_PAW3902JF_Registers.hpp:46
PixArt_PAW3902JF::BURST_TRANSFER::RawData_Sum
uint8_t RawData_Sum
Definition:
PixArt_PAW3902JF_Registers.hpp:92
PixArt_PAW3902JF::SAMPLE_INTERVAL_MODE_2
static constexpr uint32_t SAMPLE_INTERVAL_MODE_2
Definition:
PixArt_PAW3902JF_Registers.hpp:44
PixArt_PAW3902JF::BURST_TRANSFER::Delta_Y_H
uint8_t Delta_Y_H
Definition:
PixArt_PAW3902JF_Registers.hpp:90
PixArt_PAW3902JF::BURST_TRANSFER::Observation
uint8_t Observation
Definition:
PixArt_PAW3902JF_Registers.hpp:86
PixArt_PAW3902JF::Motion_Burst
Definition:
PixArt_PAW3902JF_Registers.hpp:65
PixArt_PAW3902JF::SAMPLE_INTERVAL_MODE_0
static constexpr uint32_t SAMPLE_INTERVAL_MODE_0
Definition:
PixArt_PAW3902JF_Registers.hpp:42
PixArt_PAW3902JF::SAMPLE_INTERVAL_MODE_1
static constexpr uint32_t SAMPLE_INTERVAL_MODE_1
Definition:
PixArt_PAW3902JF_Registers.hpp:43
PixArt_PAW3902JF::BURST_TRANSFER::Delta_X_L
uint8_t Delta_X_L
Definition:
PixArt_PAW3902JF_Registers.hpp:87
PixArt_PAW3902JF::Mode
Mode
Definition:
PixArt_PAW3902JF_Registers.hpp:78
PixArt_PAW3902JF::Delta_Y_L
Definition:
PixArt_PAW3902JF_Registers.hpp:55
PixArt_PAW3902JF::BURST_TRANSFER
Definition:
PixArt_PAW3902JF_Registers.hpp:84
PixArt_PAW3902JF::Register
Register
Definition:
PixArt_PAW3902JF_Registers.hpp:49
PixArt_PAW3902JF::Squal
Definition:
PixArt_PAW3902JF_Registers.hpp:57
PixArt_PAW3902JF::Delta_X_H
Definition:
PixArt_PAW3902JF_Registers.hpp:54
PixArt_PAW3902JF::BURST_TRANSFER::Maximum_RawData
uint8_t Maximum_RawData
Definition:
PixArt_PAW3902JF_Registers.hpp:93
PixArt_PAW3902JF::Delta_Y_H
Definition:
PixArt_PAW3902JF_Registers.hpp:56
PixArt_PAW3902JF::BURST_TRANSFER::Minimum_RawData
uint8_t Minimum_RawData
Definition:
PixArt_PAW3902JF_Registers.hpp:94
PixArt_PAW3902JF::Product_ID
Definition:
PixArt_PAW3902JF_Registers.hpp:50
PixArt_PAW3902JF::Power_Up_Reset
Definition:
PixArt_PAW3902JF_Registers.hpp:67
PixArt_PAW3902JF::RawData_Sum
Definition:
PixArt_PAW3902JF_Registers.hpp:58
PixArt_PAW3902JF::Product_ID_Bit
Product_ID_Bit
Definition:
PixArt_PAW3902JF_Registers.hpp:73
PixArt_PAW3902JF::BURST_TRANSFER::Delta_Y_L
uint8_t Delta_Y_L
Definition:
PixArt_PAW3902JF_Registers.hpp:89
PixArt_PAW3902JF::BURST_TRANSFER::Motion
uint8_t Motion
Definition:
PixArt_PAW3902JF_Registers.hpp:85
PixArt_PAW3902JF::Minimum_RawData
Definition:
PixArt_PAW3902JF_Registers.hpp:60
PixArt_PAW3902JF::Revision_ID
Definition:
PixArt_PAW3902JF_Registers.hpp:51
PixArt_PAW3902JF::PRODUCT_ID
static constexpr uint8_t PRODUCT_ID
Definition:
PixArt_PAW3902JF_Registers.hpp:39
PixArt_PAW3902JF::Maximum_RawData
Definition:
PixArt_PAW3902JF_Registers.hpp:59
PixArt_PAW3902JF::Delta_X_L
Definition:
PixArt_PAW3902JF_Registers.hpp:53
PixArt_PAW3902JF::Motion
Definition:
PixArt_PAW3902JF_Registers.hpp:52
PixArt_PAW3902JF::Mode::SuperLowLight
PixArt_PAW3902JF::Resolution
Definition:
PixArt_PAW3902JF_Registers.hpp:69
PixArt_PAW3902JF::Mode::Bright
PixArt_PAW3902JF::Shutter_Upper
Definition:
PixArt_PAW3902JF_Registers.hpp:62
PixArt_PAW3902JF::BURST_TRANSFER::Shutter_Upper
uint8_t Shutter_Upper
Definition:
PixArt_PAW3902JF_Registers.hpp:95
PixArt_PAW3902JF::Shutter_Lower
Definition:
PixArt_PAW3902JF_Registers.hpp:61
PixArt_PAW3902JF::Mode::LowLight
PixArt_PAW3902JF::BURST_TRANSFER::Shutter_Lower
uint8_t Shutter_Lower
Definition:
PixArt_PAW3902JF_Registers.hpp:96
PixArt_PAW3902JF::BURST_TRANSFER::Delta_X_H
uint8_t Delta_X_H
Definition:
PixArt_PAW3902JF_Registers.hpp:88
PixArt_PAW3902JF::BURST_TRANSFER::SQUAL
uint8_t SQUAL
Definition:
PixArt_PAW3902JF_Registers.hpp:91
PixArt_PAW3902JF::REVISION_ID
static constexpr uint8_t REVISION_ID
Definition:
PixArt_PAW3902JF_Registers.hpp:40
src
drivers
optical_flow
paw3902
PixArt_PAW3902JF_Registers.hpp
Generated by
1.8.13