2016-02-17 21:25:44 -04:00
|
|
|
#pragma once
|
2015-07-06 16:24:06 -03:00
|
|
|
|
|
|
|
#include "RangeFinder.h"
|
|
|
|
#include "RangeFinder_Backend.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define PRU0_CTRL_BASE 0x4a322000
|
|
|
|
|
|
|
|
#define PRU0_IRAM_BASE 0x4a334000
|
|
|
|
#define PRU0_IRAM_SIZE 0x2000
|
|
|
|
|
|
|
|
#define PRU0_DRAM_BASE 0x4a300000
|
2016-01-18 15:54:43 -04:00
|
|
|
#define PRU0_DRAM_SIZE 0x2000
|
2015-07-06 16:24:06 -03:00
|
|
|
|
|
|
|
struct range {
|
|
|
|
uint32_t distance;
|
|
|
|
uint32_t status;
|
|
|
|
};
|
|
|
|
|
|
|
|
class AP_RangeFinder_BBB_PRU : public AP_RangeFinder_Backend
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// constructor
|
2017-08-07 00:41:01 -03:00
|
|
|
AP_RangeFinder_BBB_PRU(RangeFinder::RangeFinder_State &_state);
|
2015-07-06 16:24:06 -03:00
|
|
|
|
|
|
|
// static detection function
|
2017-08-07 00:41:01 -03:00
|
|
|
static bool detect();
|
2015-07-06 16:24:06 -03:00
|
|
|
|
|
|
|
// update state
|
|
|
|
void update(void);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
};
|