APM:Libraries
Macros | Variables
AP_OpticalFlow_Pixart.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/edc.h>
#include <AP_AHRS/AP_AHRS.h>
#include <utility>
#include "OpticalFlow.h"
#include "AP_OpticalFlow_Pixart.h"
#include "AP_OpticalFlow_Pixart_SROM.h"
#include <stdio.h>
Include dependency graph for AP_OpticalFlow_Pixart.cpp:

Go to the source code of this file.

Macros

#define debug(fmt, args ...)   do {printf(fmt, ## args); } while(0)
 
#define PIXART_REG_PRODUCT_ID   0x00
 
#define PIXART_REG_REVISION_ID   0x01
 
#define PIXART_REG_MOTION   0x02
 
#define PIXART_REG_DELTA_X_L   0x03
 
#define PIXART_REG_DELTA_X_H   0x04
 
#define PIXART_REG_DELTA_Y_L   0x05
 
#define PIXART_REG_DELTA_Y_H   0x06
 
#define PIXART_REG_SQUAL   0x07
 
#define PIXART_REG_RAWDATA_SUM   0x08
 
#define PIXART_REG_RAWDATA_MAX   0x09
 
#define PIXART_REG_RAWDATA_MIN   0x0A
 
#define PIXART_REG_SHUTTER_LOW   0x0B
 
#define PIXART_REG_SHUTTER_HI   0x0C
 
#define PIXART_REG_CONFIG1   0x0F
 
#define PIXART_REG_CONFIG2   0x10
 
#define PIXART_REG_FRAME_CAP   0x12
 
#define PIXART_REG_SROM_EN   0x13
 
#define PIXART_REG_RUN_DS   0x14
 
#define PIXART_REG_REST1_RATE   0x15
 
#define PIXART_REG_REST1_DS   0x16
 
#define PIXART_REG_REST2_RATE   0x17
 
#define PIXART_REG_REST2_DS   0x18
 
#define PIXART_REG_REST3_RATE   0x19
 
#define PIXART_REG_OBS   0x24
 
#define PIXART_REG_DOUT_L   0x25
 
#define PIXART_REG_DOUT_H   0x26
 
#define PIXART_REG_RAW_GRAB   0x29
 
#define PIXART_REG_SROM_ID   0x2A
 
#define PIXART_REG_POWER_RST   0x3A
 
#define PIXART_REG_SHUTDOWN   0x3B
 
#define PIXART_REG_INV_PROD_ID   0x3F
 
#define PIXART_REG_INV_PROD_ID2   0x5F
 
#define PIXART_REG_MOT_BURST   0x50
 
#define PIXART_REG_MOT_BURST2   0x16
 
#define PIXART_REG_SROM_BURST   0x62
 
#define PIXART_REG_RAW_BURST   0x64
 
#define PIXART_WRITE_FLAG   0x80
 
#define PIXART_Tsrad   300
 
#define PIXART_SROM_CRC_RESULT   0xBEEF
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Macro Definition Documentation

◆ debug

#define debug (   fmt,
  args ... 
)    do {printf(fmt, ## args); } while(0)

◆ PIXART_REG_CONFIG1

#define PIXART_REG_CONFIG1   0x0F

Definition at line 49 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_CONFIG2

#define PIXART_REG_CONFIG2   0x10

Definition at line 50 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DELTA_X_H

#define PIXART_REG_DELTA_X_H   0x04

Definition at line 40 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DELTA_X_L

#define PIXART_REG_DELTA_X_L   0x03

Definition at line 39 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DELTA_Y_H

#define PIXART_REG_DELTA_Y_H   0x06

Definition at line 42 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DELTA_Y_L

#define PIXART_REG_DELTA_Y_L   0x05

Definition at line 41 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DOUT_H

#define PIXART_REG_DOUT_H   0x26

Definition at line 61 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_DOUT_L

#define PIXART_REG_DOUT_L   0x25

Definition at line 60 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_REG_FRAME_CAP

#define PIXART_REG_FRAME_CAP   0x12

Definition at line 51 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_INV_PROD_ID

#define PIXART_REG_INV_PROD_ID   0x3F

Definition at line 66 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_REG_INV_PROD_ID2

#define PIXART_REG_INV_PROD_ID2   0x5F

Definition at line 67 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_REG_MOT_BURST

#define PIXART_REG_MOT_BURST   0x50

Definition at line 68 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::motion_burst().

◆ PIXART_REG_MOT_BURST2

#define PIXART_REG_MOT_BURST2   0x16

Definition at line 69 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::motion_burst().

◆ PIXART_REG_MOTION

#define PIXART_REG_MOTION   0x02

Definition at line 38 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_OBS

#define PIXART_REG_OBS   0x24

Definition at line 59 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_POWER_RST

#define PIXART_REG_POWER_RST   0x3A

Definition at line 64 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_REG_PRODUCT_ID

#define PIXART_REG_PRODUCT_ID   0x00

Definition at line 36 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_REG_RAW_BURST

#define PIXART_REG_RAW_BURST   0x64

Definition at line 71 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_RAW_GRAB

#define PIXART_REG_RAW_GRAB   0x29

Definition at line 62 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_RAWDATA_MAX

#define PIXART_REG_RAWDATA_MAX   0x09

Definition at line 45 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_RAWDATA_MIN

#define PIXART_REG_RAWDATA_MIN   0x0A

Definition at line 46 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_RAWDATA_SUM

#define PIXART_REG_RAWDATA_SUM   0x08

Definition at line 44 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REST1_DS

#define PIXART_REG_REST1_DS   0x16

Definition at line 55 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REST1_RATE

#define PIXART_REG_REST1_RATE   0x15

Definition at line 54 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REST2_DS

#define PIXART_REG_REST2_DS   0x18

Definition at line 57 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REST2_RATE

#define PIXART_REG_REST2_RATE   0x17

Definition at line 56 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REST3_RATE

#define PIXART_REG_REST3_RATE   0x19

Definition at line 58 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_REVISION_ID

#define PIXART_REG_REVISION_ID   0x01

Definition at line 37 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_RUN_DS

#define PIXART_REG_RUN_DS   0x14

Definition at line 53 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_SHUTDOWN

#define PIXART_REG_SHUTDOWN   0x3B

Definition at line 65 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_SHUTTER_HI

#define PIXART_REG_SHUTTER_HI   0x0C

Definition at line 48 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_SHUTTER_LOW

#define PIXART_REG_SHUTTER_LOW   0x0B

Definition at line 47 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_SQUAL

#define PIXART_REG_SQUAL   0x07

Definition at line 43 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_REG_SROM_BURST

#define PIXART_REG_SROM_BURST   0x62

Definition at line 70 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::srom_download().

◆ PIXART_REG_SROM_EN

#define PIXART_REG_SROM_EN   0x13

◆ PIXART_REG_SROM_ID

#define PIXART_REG_SROM_ID   0x2A

Definition at line 63 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::setup_sensor().

◆ PIXART_SROM_CRC_RESULT

#define PIXART_SROM_CRC_RESULT   0xBEEF

Definition at line 80 of file AP_OpticalFlow_Pixart.cpp.

◆ PIXART_Tsrad

#define PIXART_Tsrad   300

Definition at line 77 of file AP_OpticalFlow_Pixart.cpp.

Referenced by AP_OpticalFlow_Pixart::reg_write().

◆ PIXART_WRITE_FLAG

#define PIXART_WRITE_FLAG   0x80

Variable Documentation

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.