Andrew Tridgell
20cd5026d8
device: use bitfields to keep DeviceStructure small
...
this keeps it small enough to fit in a float, which makes it possible
to see the full value in a MAVLink tlog
Conflicts:
mavlink/include/mavlink/v1.0
2014-07-12 16:27:19 +02:00
Andrew Tridgell
6cffa948fe
device: pass CDev::ioctl() to superclass
...
this allows DEVIOCGDEVICEID to work.
2014-07-12 16:26:21 +02:00
Andrew Tridgell
93d444d1aa
device: added a _device_id to all drivers
...
this device ID identifies a specific device via the tuple of (bus, bus
type, address, devtype). This allows device specific configuration
data to be stored along with a device ID, so the code can know when
the user has changed device configuration (such as removing an
external compass), and either invalidate the device configuration or
force the user to re-calibrate
2014-07-12 16:25:43 +02:00
Lorenz Meier
a2f528c5ba
Merged master
2014-07-12 16:11:43 +02:00
Lorenz Meier
a6b52f1c9f
HMC5883 post merge cleanup
2014-07-08 13:49:24 +02:00
Andrew Tridgell
fea4845ed9
SPI: make _bus protected
...
this allows runtime use of internal/external bus to determine if DRDY
should be used on the L3GD20
2014-07-08 11:43:58 +02:00
px4dev
ef6c99c1ab
Restructure the locking around SPI transfers
2014-07-06 11:40:28 -07:00
Lorenz Meier
bb7962936e
CDev: Fixed printf format specifier
2014-03-16 18:37:16 +01:00
Lorenz Meier
bb8956c84e
Fixed return value
2014-01-14 16:04:12 +01:00
Lorenz Meier
9bf512cac8
Framework to support disabling publications via IOCTL
2014-01-12 11:52:41 +01:00
Andrew Tridgell
b2b9665e44
device: added register_class_devname() API
...
this allows drivers to register generic device names for a device
class, with automatic class instance handling
2013-12-10 11:31:04 +01:00
Andrew Tridgell
244c3602f2
SPI: added set_frequency() API
...
this allows the bus speed to be changed on the fly by device
drivers. This is needed for the MPU6000
2013-11-30 20:17:09 +11:00
px4dev
19fdaf2009
Use the generic device::SPI locking strategy.
2013-09-12 23:56:53 -07:00
Andrew Tridgell
760b3ab2e7
ringbuffer: converted to item_size units
...
this fixes a number of indexing bugs
2013-09-12 00:53:14 +02:00
px4dev
cefc7ac00e
Rework the ringbuffer class so that it's not templated, and refactor its clients so they aren't dancing around the linker anymore.
2013-09-12 00:53:08 +02:00
Andrew Tridgell
3329e3c38c
ringbuffer: added resize() and print_info() methods
...
this simplifies the drivers
2013-09-12 00:51:34 +02:00
px4dev
1828b57c58
ringbuffer: added force() and use lockless methods
...
this adds force() which can be used for drivers wanting consumers to
get the latest data when the buffer overflows
2013-09-12 00:51:24 +02:00
px4dev
1acbbe46d1
Make it possible to create a cdev without automatically creating a device node.
2013-08-04 19:49:19 -07:00
px4dev
1fb4705ab7
Add size and flush methods to the ringbuffer class.
2013-08-04 19:48:46 -07:00
px4dev
4b4f33e6a4
Add direct-access methods to the base Device class, so that there's a common way of talking to drivers regardless of which of the specialised classes they derive from.
...
Make the Device destructor public and virtual, so that arbitrary devices can be deleted. Likewise for classes that derive from it.
Make Device::init public so that arbitrary devices can be initialised after being returned by factories.
2013-08-04 19:48:20 -07:00
px4dev
234ad24081
Simple ring-buffer template class, because re-implementing the wheel in every driver is silly.
2013-08-03 18:23:48 -07:00
Lorenz Meier
3152dae3dc
Merged with master
2013-05-09 15:52:36 +02:00
Lorenz Meier
13fc670386
Moved last libs, drivers and headers, cleaned up IO build
2013-04-28 09:54:11 +02:00