mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 14:13:42 -04:00
66ecda2544
This commit changes the way libraries headers are included in source files: - If the header is in the same directory the source belongs to, so the notation '#include ""' is used with the path relative to the directory containing the source. - If the header is outside the directory containing the source, then we use the notation '#include <>' with the path relative to libraries folder. Some of the advantages of such approach: - Only one search path for libraries headers. - OSs like Windows may have a better lookup time.
35 lines
873 B
C++
35 lines
873 B
C++
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
#ifndef __AP_ADC_ADS7844_H__
|
|
#define __AP_ADC_ADS7844_H__
|
|
|
|
|
|
#include <inttypes.h>
|
|
#include "AP_ADC.h"
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
class AP_ADC_ADS7844 : public AP_ADC
|
|
{
|
|
public:
|
|
AP_ADC_ADS7844(); // Constructor
|
|
void Init();
|
|
|
|
// Read 1 sensor value
|
|
float Ch(unsigned char ch_num);
|
|
|
|
// Read 6 sensors at once
|
|
uint32_t Ch6(const uint8_t *channel_numbers, float *result);
|
|
|
|
// check if Ch6 would block
|
|
bool new_data_available(const uint8_t *channel_numbers);
|
|
|
|
// Get minimum number of samples read from the sensors
|
|
uint16_t num_samples_available(const uint8_t *channel_numbers);
|
|
|
|
private:
|
|
void read(void);
|
|
AP_HAL::SPIDeviceDriver *_spi;
|
|
AP_HAL::Semaphore *_spi_sem;
|
|
};
|
|
|
|
#endif
|