Commit Graph

15 Commits

Author SHA1 Message Date
Andrew Tridgell b34d0c9c87 AP_HAL: removed vector based I2C get_device
this is unused and prevents building on QURT
2024-07-11 11:20:47 +10:00
Andrew Tridgell eec3a2ab31 AP_HAL: added FOREACH_I2C_MASK() macro 2018-09-07 08:36:02 +10:00
Andrew Tridgell 281a1b6569 AP_HAL: added I2C bus mask functions and macros 2018-07-10 15:39:47 +10:00
Lucas De Marchi 2000e17646 AP_HAL: move get_device() method from AP_HAL_Linux
This way it's possible to use the method in platform-independent code
without a need to up cast.
2018-05-04 11:47:04 -07:00
Andrew Tridgell 2b0a3272fd AP_HAL: support LPS25H on MPU AUX 2018-03-02 12:52:50 +11:00
Andrew Tridgell 8260b3f65f AP_HAL: allow bus speed and SMBUS enable on I2C
this allows a driver to request a bus speed for a device, and whether
the device should be in SMBUS mode. It also allows a min timeout to be
specified, to allow for slow devices
2018-01-15 11:46:02 +11:00
Lucas De Marchi 0a381dfa1b AP_HAL: document method to split transfers 2017-02-23 22:38:15 -08:00
Andrew Tridgell dc26cbc074 AP_HAL: added set_split_transfers() API for I2C 2017-02-23 22:38:15 -08:00
Andrew Tridgell 28a318145c AP_HAL: move set_retries() up to Device class
we really need set_retries() high during init for nearly all i2c
devices, and as many are written against the generic device class
moving it to the Device class makes this a lot easier. It is a NOP on
SPI.
2016-12-02 09:47:51 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi e1ab44f4a3 Global: remove get_fd() from Device API
This was there for compatibility with I2CDriver and SPIDriver. We don't
use them anymore so we can remove the compat method.
2016-08-29 10:27:36 -03:00
Lucas De Marchi 37de995960 AP_HAL: update Device interface for periodic tasks
Replace the previous not-implemented interface with a set of new methods
that can be resonably implemented:

    - register_periodic_callback() now receives a functor returning bool
      to easily allow "oneshot" timers

    - adjust_periodic_callback() allows the caller to change the timer
      for a specific handle. This way drivers like MS5611 can adjust the
      timer depending on its state machine: the time to sample
      temperature is smaller than the time to get a pressure sample

    - add unregister_callback(): since we have an opaque pointer, we
      can't tell the user to just delete it in order to unregister the
      callback
2016-07-30 00:55:27 -03:00
Lucas De Marchi 1f96336f7c Global: rename bus type enum entries 2016-06-27 17:51:41 -03:00
Gustavo Jose de Sousa 4693501d9d AP_HAL: Device: add bus_type field
Sometimes it's necessary to know the type of bus to make some decisions where
AP_HAL::Device abstraction is used.
2016-06-27 17:18:35 -03:00
Lucas De Marchi 872b255384 AP_HAL: Add interface for I2CDevice
This is a new interface to replace I2CDriver in future, when all drivers
are converted.
2016-02-16 19:49:08 -02:00