APM:Libraries
libraries
AP_RangeFinder
AP_RangeFinder_BBB_PRU.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RangeFinder.h
"
4
#include "
RangeFinder_Backend.h
"
5
6
7
#define PRU0_CTRL_BASE 0x4a322000
8
9
#define PRU0_IRAM_BASE 0x4a334000
10
#define PRU0_IRAM_SIZE 0x2000
11
12
#define PRU0_DRAM_BASE 0x4a300000
13
#define PRU0_DRAM_SIZE 0x2000
14
15
struct
range
{
16
uint32_t
distance
;
17
uint32_t
status
;
18
};
19
20
class
AP_RangeFinder_BBB_PRU
:
public
AP_RangeFinder_Backend
21
{
22
public
:
23
// constructor
24
AP_RangeFinder_BBB_PRU
(
RangeFinder::RangeFinder_State
&_state);
25
26
// static detection function
27
static
bool
detect();
28
29
// update state
30
void
update(
void
);
31
32
protected
:
33
34
MAV_DISTANCE_SENSOR
_get_mav_distance_sensor_type
()
const override
{
35
return
MAV_DISTANCE_SENSOR_ULTRASOUND;
36
}
37
38
private
:
39
40
};
range::status
uint32_t status
Definition:
AP_RangeFinder_BBB_PRU.h:17
AP_RangeFinder_Backend
Definition:
RangeFinder_Backend.h:21
range
Definition:
AP_RangeFinder_BBB_PRU.h:15
AP_RangeFinder_BBB_PRU
Definition:
AP_RangeFinder_BBB_PRU.h:20
RangeFinder_Backend.h
RangeFinder.h
RangeFinder::RangeFinder_State
Definition:
RangeFinder.h:82
AP_RangeFinder_BBB_PRU::_get_mav_distance_sensor_type
MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override
Definition:
AP_RangeFinder_BBB_PRU.h:34
range::distance
uint32_t distance
Definition:
AP_RangeFinder_BBB_PRU.h:16
Generated on Sun Jun 17 2018 14:18:51 for APM:Libraries by
1.8.13