Lucas De Marchi
2296139516
AP_HAL_Linux: remove unused constant
9 years ago
Lucas De Marchi
5bb2716081
AP_HAL_Linux: add name to SPI device table
...
A string name allows to more easily expand the table: the board is
responsible for the name and doesn't have to declare it as a enum or
define. It's also easier to add 2 sensors of the same type.
9 years ago
Lucas De Marchi
9d5fb97819
Global: rename enum SPIDevice to SPIDeviceType
...
Free the SPIDevice name so to have a consistent name for I2C/SPI device
classes.
9 years ago
Víctor Mayoral Vilches
1c49b086eb
HAL_Linux: SPIDriver add PXFmini support
9 years ago
Aaron Wang Shi
a712e9572f
AP_HAL_Linux: instatiate SPI device for BH hat
9 years ago
Lucas De Marchi
2439826c19
AP_HAL_Linux: use init() method without arguments
...
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
9 years ago
Caio Marcelo de Oliveira Filho
7675913d5b
AP_HAL_Linux: use millis/micros/panic functions
9 years ago
Víctor Mayoral Vilches
8ae8f47538
AP_HAL_Linux: SPIDriver, add Erle-Brain 2
9 years ago
Lucas De Marchi
959e061514
AP_HAL_Linux: add spi device for minlure
9 years ago
Lucas De Marchi
2ac96b942c
AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
...
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
9 years ago
mirkix
93941c3349
AP_HAL_Linux: Add support for using SPI devices of the same type.
10 years ago
raspilot
25cddbcbaa
AP_HAL_Linux: added SPI support for raspilot
10 years ago
Víctor Mayoral Vilches
728921f7c5
AP_HAL_Linux: ERLEBOARD legacy support
...
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
10 years ago
Gustavo Jose de Sousa
4af2a9a9cc
AP_HAL_Linux: SPI: adapt to the new signature of transaction()
10 years ago
Gustavo Jose de Sousa
124b750c10
AP_HAL_Linux: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Staroselskii Georgii
72820303d4
AP_HAL_Linux: set higher SPI speed for Navio
...
We can set a higher speed on newer Linux kernels since
52469b2a38
.
The older ones will just floor the value.
10 years ago
Lucas De Marchi
b211b86204
AP_HAL_Linux: don't manually define number of spi devices
...
It's error-prone, let's make the compiler define it for us.
10 years ago
Staroselskii Georgii
716fd56c62
AP_HAL_Linux: added support for dynamic speed configration in LinuxSPIUARTDriver
10 years ago
mirkix
a6b018eab9
AP_HAL_Linux: BBBMINI use kernel CS now
10 years ago
Staroselskii Georgii
4034004194
AP_HAL_Linux: switch NavIO to kernel CS handling
10 years ago
mirkix
c58a022111
AP_HAL_Linux: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black
10 years ago
John Williams
d0e467aea0
AP_HAL_Linux: Bypass manual CS assertion for SPI_CS_KERNEL mode
...
Missed from initial patch series
Signed-off-by: John Williams <john@whelanwilliams.net>
10 years ago
Andrew Tridgell
22cb1c8525
HAL_Linux: tidy up SPI debugging a bit
10 years ago
John Williams
0fe3959d7e
AP_HAL_Linux: Add support for in-kernel SPI CS handling
...
Add support for /dev/spidev<bus>.<cs> in-kernel SPI CS handling, and convert
existing SPI devices over.
* Add a new member _subdev to the LinuxSPIDeviceDriver class, and initialiser
in LinuxSPIDevice constructor. Use subdev 0 for GPIO-managed CS
* Extend the _cs_pin to signed 16 bits and define SPI_CS_KERNEL (-1) for
kernel-managed CS
* Move to per-device file descriptors (required for in-kernel CS)
* Extend spidev filenames to include bus and subdevice numbers, possibly
longer than 1 digit each
* Allow support for platforms enumerating /dev/spidevNNN from non-zero bases
* Convert existing users over to the new API
Signed-off-by: John Williams <john@whelanwilliams.net>
10 years ago
Staroselskii Georgii
ef420a2544
AP_HAL_Linux: changed SPI mode for MPU9250
10 years ago
Staroselskii Georgii
bf860ee41f
AP_HAL_Linux: Ublox SPI stub
10 years ago
Andrew Tridgell
8506e8b5fb
HAL_Linux: fixed linux build
10 years ago
Andrew Tridgell
c87b0adc29
HAL_Linux: the MS5611 seems to be a bit happier at higher speed
...
still getting some bogus data, but less
11 years ago
Andrew Tridgell
a4ef512f10
SPIDriver: fixed handling of 0 based SPI bus numbers
11 years ago
Mikhail Avkhimenia
a09fbb4171
HAL_Linux: Add SPI configuration for Navio
...
This changes the SPI bus number to be zero based on Linux
11 years ago
Andrew Tridgell
03e8e5f2b9
HAL_Linux: setup for all 6 SPI devices for PXF cape
11 years ago
Andrew Tridgell
bcc8768358
HAL_Linux: fixed a build warning
11 years ago
Andrew Tridgell
224515f3eb
HAL_Linux: fixed indexing of device array for SPI
11 years ago
Andrew Tridgell
3292055af2
HAL_Linux: fixed dataflash SPI
11 years ago
Andrew Tridgell
6312b9f8c0
HAL_Linux: allow different SPI and GPIO devices on different boards
...
this fixes the Replay utility, which uses subtype NONE, and will make
it easier to port to new boards
11 years ago
Andrew Tridgell
a46d8dbd51
HAL_Linux: make the spi driver fd part of the manager, not device
...
it should be one connection to the kernel per bus, not one per device
11 years ago
Andrew Tridgell
9f8f27090a
HAL_Linux: MPU9250 is restricted to 1MHz for setup
...
(see datasheet)
11 years ago
Andrew Tridgell
549e08446a
HAL_Linux: use BBB pin names in SPIDriver
...
easier to find the pins on the board
11 years ago
Andrew Tridgell
8e5915ef7d
HAL_Linux: fixed some valgrind errors
11 years ago
Andrew Tridgell
130f831c1c
HAL_Linux: use MODE_3 for MPU9250
...
this fixes the MS5611 (probably due to idle state?)
11 years ago
Andrew Tridgell
fc8068adfe
HAL_Linux: use board subtypes
11 years ago
Andrew Tridgell
5b438471a7
HAL_Linux: added set_bus_speed() support to SPI driver
...
used by MPU6000 driver for setup registers
11 years ago
Andrew Tridgell
0b64d834c3
HAL_Linux: MS5611 and MPU6000 should be MODE3
...
this doesn't solve the MPU6000 problem, but is correct
11 years ago
Andrew Tridgell
1c89f54934
HAL_Linux: fixed SPI mode handling per-device
...
the mode must be set per-device, not per bus.
11 years ago
Andrew Tridgell
d0b007248f
HAL_Linux: fixed SPI semaphore, and panic on CS error
...
This adds a check for trying to assert two CS pins on the same bus
at the same time. The change involves moving the _device handles into the
DeviceManager class, and accessing via static methods.
This also moves the semaphore to be per-bus rather than per-device,
which fixes the problem with bad MS5611 transfers.
Pair-Programmed-With: Victor, Sid, Anuj and Philip
11 years ago
Víctor Mayoral Vilches
f11f0d9f2a
HAL_Linux: Fix FRAM code
11 years ago
Víctor Mayoral Vilches
b0742fbb5b
HAL_Linux: Add FRAM SPI support.
11 years ago
Víctor Mayoral Vilches
245618e298
HAL_Linux: Improve error handling SPIDriver
11 years ago
Víctor Mayoral Vilches
d330cbecb3
HAL_Linux: Make the CS variables more readable in SPIDriver
11 years ago
Víctor Mayoral Vilches
665bf4a247
HAL_Linux: BUS_SPEED selected individually in SPIDriver
11 years ago