mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 16:23:56 -04:00
git-svn-id: https://arducopter.googlecode.com/svn/trunk@938 f9c3cf11-9bcb-44bc-f272-b75c42450872
34 lines
791 B
C++
34 lines
791 B
C++
#ifndef APM_ADC_h
|
|
#define APM_ADC_h
|
|
|
|
#define bit_set(p,m) ((p) |= ( 1<<m))
|
|
#define bit_clear(p,m) ((p) &= ~(1<<m))
|
|
|
|
// We use Serial Port 2 in SPI Mode
|
|
#define ADC_DATAOUT 51 // MOSI
|
|
#define ADC_DATAIN 50 // MISO
|
|
#define ADC_SPICLOCK 52 // SCK
|
|
#define ADC_CHIP_SELECT 33 // PC4 9 // PH6 Puerto:0x08 Bit mask : 0x40
|
|
|
|
class APM_ADC_Class
|
|
{
|
|
private:
|
|
public:
|
|
APM_ADC_Class(); // Constructor
|
|
void Init();
|
|
int Ch(unsigned char ch_num);
|
|
};
|
|
|
|
class APM_ADC_HIL_Class
|
|
{
|
|
private:
|
|
public:
|
|
APM_ADC_HIL_Class(); // Constructor
|
|
void Init();
|
|
int Ch(unsigned char ch_num);
|
|
int setHIL(int16_t p, int16_t q, int16_t r, int16_t gyroTemp,
|
|
int16_t aX, int16_t aY, int16_t aZ, int16_t diffPress);
|
|
};
|
|
|
|
#endif
|