Commit Graph

22 Commits

Author SHA1 Message Date
mirkix 9b6a826b49 AP_HAL_linux: add new board PocketPilot 2017-12-27 16:01:55 +00:00
HeBin 0e1ce2a7fd AP_HAL_Linux: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Georgii Staroselskii 4e6fab228c AP_HAL_Linux: add SPI devices for Edge 2017-10-20 13:03:08 -07:00
Lucas De Marchi 7ba82ff23a AP_HAL_Linux: remove raspilot
It's not being sold, there are just a few (different) engineering
samples built and there are no plans for this to go forward for people
that were pushing it.
2017-09-12 15:06:19 -07:00
davidaroyer 7d2e44862f AP_HAL_Linux: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
hiro2233 be06c1e8ed AP_HAL_Linux:SPIDevice: Add functions to get possible spi registered device 2017-04-19 01:05:12 -07:00
Julien Beraud 0d4ca03dcd AP_HAL_Linux: init SPIDevice speed by default
Else a speed of 0 will be sent at each transfer.
Behaviour has changed when introducing SPIDevice
2017-01-16 10:23:47 -08:00
Lucas De Marchi aadc1643fc AP_HAL_Linux: reduce speed of MPU* devices
After introducing the temperature check we are resetting the fifo
several times due to difference in temperature.
2016-11-19 14:05:22 -02:00
Andrew Tridgell 4cf6dd1818 HAL_Linux: removed panic on bad SPI device 2016-11-09 17:08:11 +11:00
Andrew Tridgell a6ac02b61f HAL_Linux: implement device IDs for I2C and SPI 2016-11-09 17:08:04 +11:00
Lucas De Marchi fa540429f9 AP_HAL_Linux: allow to teardown bus threads
Add code to teardown all bus threads. This can be called while exiting
to wait for threads to finalize.
2016-11-02 16:28:20 -02:00
Martin Evans 6f6112d7c2 AP_HAL_Linux: Add setting for GPIO for Dark board
Just like other RPI-based boards.
2016-10-24 10:00:24 -02: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
Andrew Tridgell a4c1bc3fd3 HAL_Linux: avoiding setting the SPI mode on every transfer
This was causing the Disco kernel to print a debug message on every
SPI transfer, which makes for a very noisy kernel and large kernel logs
2016-09-17 00:35:00 -03:00
Gustavo Jose de Sousa 025082b280 AP_HAL_Linux: add port to Intel Aero
Contributions from:
 - Gustavo Jose de Sousa <gustavo.sousa@intel.com>
 - José Roberto de Souza <jose.souza@intel.com>
 - Lucas De Marchi <lucas.demarchi@intel.com>
 - Patrick J.P <patrick.pereira@intel.com>
2016-09-03 01:03:07 -03: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 8541d5339d AP_HAL_Linux: Implement threaded SPI 2016-07-30 00:55:27 -03:00
Lucas De Marchi ea0595c7ac AP_HAL_Linux: SPIDevice: 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
Lucas De Marchi 7b39f3d0a7 AP_HAL_Linux: do not warn for empty table
../../libraries/AP_HAL_Linux/SPIDevice.cpp: In member function ‘virtual AP_HAL::OwnPtr<AP_HAL::SPIDevice> Linux::SPIDeviceManager::get_device(const char*)’:
../../libraries/AP_HAL_Linux/SPIDevice.cpp:337:27: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     for (uint8_t i = 0; i < _n_device_desc; i++) {
                         ~~^~~~~~~~~~~~~~~~

Define a dummy device to remove warning.
2016-07-30 00:03:23 -03:00
Lucas De Marchi 7b140da6d1 AP_HAL_Linux: remove SPIDriver
SPIDevice now controls all accesses to SPI bus.
2016-07-29 15:01:15 -03:00
Lucas De Marchi cbbd6f9d78 AP_HAL_Linux: SPIDevice: implement fullduplex transfer 2016-07-29 15:01:14 -03:00
Lucas De Marchi 61ef653181 AP_HAL_Linux: implement SPIDevice
The way this code is structured is a little bit different from the
SPIDriver implementation:

 - We only open the bus once, no matter how many devices we have in it

 - There's a single transfer() method which uses half-duplex mode
   instead of full duplex. The reason is that for all cases in the
   codebase we are using half-duplex transfers using the full-duplex
   API, i.e. a single SPI msg with both tx and rx buffers. This is
   cumbersome because the buffers need to be of the same size and the
   receive buffer using an offset of the same length as the actux data
   being written. This means the high level APIs need to copy buffers
   around.

   If later we have uses for a real full duplex case it's just a matter
   of adding another transfer_fullduplex() method or something like
   this.

 - The methods are implemented in the SPIDevice class instead of having
   proxy methods to SPIDeviceManager as is the case of SPIDriver

Also from now on we refer to the SPIDriver objects as "descriptors"
because they have the parameters of each device in the
SPIDeviceManager::devices[] table. When SPIDeviceDriver is completely
replaced we can rename them to SPIDeviceProperties.
2016-02-16 19:49:09 -02:00