aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-16 08:47:31 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-16 08:47:31 +0200
commit8107205b9ede8d9d36feffb50e116bb8e4dda78a (patch)
treec4b4fc06574b55c3406616da9976150671c71d5c /src
parentb08e3d21cdca5c21396b47280b0958d6592a80d2 (diff)
downloadpx4-firmware-8107205b9ede8d9d36feffb50e116bb8e4dda78a.tar.gz
px4-firmware-8107205b9ede8d9d36feffb50e116bb8e4dda78a.tar.bz2
px4-firmware-8107205b9ede8d9d36feffb50e116bb8e4dda78a.zip
device driver: Fix compile warnings
Diffstat (limited to 'src')
-rw-r--r--src/drivers/device/ringbuffer.h4
-rw-r--r--src/drivers/device/spi.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/device/ringbuffer.h b/src/drivers/device/ringbuffer.h
index a9e22eaa6..b26e2e7c8 100644
--- a/src/drivers/device/ringbuffer.h
+++ b/src/drivers/device/ringbuffer.h
@@ -162,6 +162,10 @@ private:
volatile unsigned _tail; /**< removal point in _item_size units */
unsigned _next(unsigned index);
+
+ /* we don't want this class to be copied */
+ RingBuffer(const RingBuffer&);
+ RingBuffer operator=(const RingBuffer&);
};
RingBuffer::RingBuffer(unsigned num_items, size_t item_size) :
diff --git a/src/drivers/device/spi.h b/src/drivers/device/spi.h
index 54849c8c3..1d9837689 100644
--- a/src/drivers/device/spi.h
+++ b/src/drivers/device/spi.h
@@ -129,10 +129,15 @@ private:
uint32_t _frequency;
struct spi_dev_s *_dev;
+ /* this class does not allow copying */
+ SPI(const SPI&);
+ SPI operator=(const SPI&);
+
protected:
int _bus;
int _transfer(uint8_t *send, uint8_t *recv, unsigned len);
+
};
} // namespace device