Lucas De Marchi
590539f674
AP_HAL_Linux: implement threaded I2C
2016-07-30 00:55:27 -03:00
Lucas De Marchi
eaa1c39a15
AP_HAL_Linux: update Device interface
2016-07-30 00:55:27 -03:00
Lucas De Marchi
8e5aba8653
AP_HAL_Linux: I2CDevice: move implementation to outside
...
As we add methods, it's becoming too complex to be implemented together
with the declaration.
2016-07-30 00:55:27 -03:00
Gustavo Jose de Sousa
d35cf60ce1
AP_HAL_Linux: I2CDevice: use read flag in read_registers_multiple
...
Use the generic support in Device interface for read flag when we are
using read_registers_multiple() method.
2016-06-27 17:20:46 -03:00
Gustavo Jose de Sousa
d615628367
AP_HAL_Linux: I2CDevice: add missing stdio.h include
...
This was probably being included by another header, but it's not on
gcc >= 6.1 and glibc 2.23.
2016-05-16 13:12:53 -03:00
Lucas De Marchi
6a6175df1c
AP_HAL_Linux: move dirname to I2CDevice core
...
All entries would need the "devices/" prefix and it's more natural not
using it.
2016-03-17 02:55:31 -03:00
Lucas De Marchi
5194f7e5ce
AP_HAL_Linux: I2CDevice: method to read multiple times
2016-02-16 19:49:09 -02:00
Lucas De Marchi
bc2f7f2783
AP_HAL_Linux: implement function to transfer data
...
This is a similar function to what we have in I2CDriver, but it can
receive a nullptr to recv or send. It will create 2 i2c_msg structs to
send and receive data to/from the I2C slave.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
2fc534d18d
AP_HAL_Linux: implement methods to open the bus
...
These are very similar to their counterparts in I2CDriver. The changes
were:
- Don't use fixed buffer with PATH_MAX length: allocate the string
- Change the interface to use std::vector so we can simplify the
implementation
2016-02-16 19:49:08 -02:00
Lucas De Marchi
cd0e1dff82
AP_HAL_Linux: Add skeleton for I2CDevice
...
This adds the logic to maintain the I2CDevice's managed by I2CManager.
2016-02-16 19:49:08 -02:00