Commit Graph

8 Commits

Author SHA1 Message Date
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 57ec968b44 AP_HAL: remove SPIDriver
SPIDevice now controls all accesses to SPI bus.
2016-07-29 15:01:15 -03:00
Lucas De Marchi 01452bf922 AP_HAL: SPIDevice: add fullduplex method
This method is needed when we want to transfer both tx and rx at the
same time, as opposed to common cases for sensors in which they are like
in the I2C interface: half-duplex.
2016-07-29 15:01:14 -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 66f644c50d AP_HAL: add interface for SPIDevice devices
In order to interoperate with SPIDeviceDriver this is re-using the same
SPIDeviceManager interface.
2016-02-16 19:49:09 -02:00