Commit Graph

1005 Commits

Author SHA1 Message Date
Patrick José Pereira 32c0e37512 AP_HAL_Linux: Organize and document GPIO_RPI class
- Move macros to functions and improve explanation about logic behind it
- Break code in functions to make it more readable
- Add doxygen comments about functions and how they work in a comprehensive manner
- Improve general code maintainability

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-04-29 02:12:58 -07:00
Patrick José Pereira c83ce93165 AP_HAL_Linux: Add missing wscript for GPIOTest
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-04-17 15:59:25 +10:00
Peter Barker a3e2e156e7 AP_HAL_Linux: do not create ConsoleDevices for Replay or examples
Uusally problems evidence themsleves with stdin not working correctly -
for example, "git add -p" skipping through all queries as if the
user was just pressing enter.
2020-03-31 11:22:21 +11:00
Patrick José Pereira e65cc35fb0 AP_HAL_Linux: Use template to generate raspberry pins
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-03-15 22:35:50 -07:00
Peter Barker f8058bcf70 AP_HAL_Linux: avoid segfaults during early panics
singletons failing to be singleton can cause the segfaults.  This is
more a tidiness thing - but better not to have cascading failures.
2020-03-10 10:45:09 +11:00
Peter Barker c917cd4dbb AP_HAL_Linux: make a static-const hal references references to external symbol 2020-03-03 10:12:14 +11:00
Andy Piper 127a0e9b41 AP_HAL_Linux: add in empty dsp driver 2020-02-22 11:15:37 +11:00
Andrew Tridgell cbbf61af93 HAL_Linux: fixed bitmask error on storage erase 2020-01-31 11:06:29 +11:00
Andrew Tridgell a153799e26 HAL_Linux: support inverted 115200 protocols
this allows for FrSky FPort input
2020-01-19 21:10:00 +11:00
Andrew Tridgell 4b9442dad7 AP_HAL_Linux: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell 67bd4ed396 AP_HAL_Linux: use take_blocking instead of HAL_SEMAPHORE_BLOCK_FOREVER
this makes for cleaner and smaller code as the failure case is not
needed
2020-01-19 20:19:30 +11:00
Patrick José Pereira 0c0d97debe AP_HAL_Linux: Add storage-directory argument in usage
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-01-18 17:03:20 +11:00
Patrick José Pereira 6518d6dc4d AP_HAL_LINUX: Add support for Raspberry Pi 4
The Raspberry Pi 4 uses a new BCM cpu, the BCM2711 with
a peripheral base address of 0xFE000000

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-01-16 08:03:34 +11:00
Patrick José Pereira 6230524636 AP_HAL_Linux: Add navigator board
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-01-16 08:01:54 +11:00
Daniel Magree 209bb132fa HAL_Linux: disable input modifications on serial interface for rc receiver
Make sure to clear CBAUD before setting the baud and disable
input modifications.

Fix for #12162

This change removes input options that can modify the input data stream.
INLCR: map new line to carriage return
ICRNL: map carriage return to new line
IUCLC: map upper case to lower case
IGNCR: ignore carriage return
BRKINT: send SIGINT on serial break
2019-11-13 09:02:30 -08:00
Peter Barker cbe73b91d5 AP_HAL_Linux: correct format-string warnings
Using the string template to determine the size of the array to print
into strikes issues as varargs passes the stack variables as integer
types, so the perceived range is larger.
2019-11-05 11:29:08 +11:00
Andrew Tridgell 9e9be95943 HAL_Linux: fixed build 2019-11-01 10:53:53 +11:00
Peter Barker 0f4337b7b1 AP_HAL_Linux: release mutex lock before calling write(c)
It instantly tries to take it, but we're still holding it, leading to
instant failure.

This mirrors the same code in AP_HAL_ChibiOS.
2019-10-25 11:38:16 +11:00
Patrick José Pereira 29fadc2417 AP_HAL_Linux: PCA9685: Check for device before accessing it
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-09-26 12:42:12 +10:00
Andrew Tridgell 312018898f HAL_Linux: use AP::RC() 2019-09-06 08:51:45 +10:00
Michael du Breuil 979a431e4a AP_HAL_Linux: Remove set_stop_pin from AnalogSource 2019-09-04 09:54:50 +10:00
Michael du Breuil 1484a12f4b AP_HAL_Linux: Fix bad check order on heap_realloc 2019-08-27 13:54:54 +10:00
Peter Barker 914e6c5497 AP_HAL_Linux: check return value of system command
Compilation fails on disco without this patch as system is declared with
attribute warn_unused_result
2019-08-19 14:37:13 +10:00
Peter Barker 1b3e2e3c8b AP_HAL_Linux: add missing override keywords 2019-08-15 15:14:23 +10:00
Mirko Denecke bb7f80b452 AP_HAL_Linux: UARTDriver remove unused field and tabs 2019-07-21 21:52:42 -07:00
Andrew Tridgell 019f441b2f HAL_Linux: added uartH 2019-07-12 17:01:21 +10:00
Andrew Tridgell 2bab0efc41 HAL_Linux: implement HAL_GPIO_SCRIPT support
this allows Linux boards to trigger an external script on GPIO
writes. This can be hooked up to relays with either RC options or
mavlink or mission items to trigger actions that can be scripted
2019-07-06 09:02:54 +10:00
Peter Barker a9c4f1d0d5 AP_HAL_Linux: return RC protocol being decoded 2019-06-18 11:35:38 +10:00
Peter Barker 1ce2424e49 AP_HAL_Linux: add required override keyword on configure_parity
Also remove virtual - doesn't make sense here.
2019-05-27 09:55:18 -07:00
Andrew Tridgell a159b01b26 AP_HAL_Linux: removed unusued AP_Common/Semaphore.h 2019-05-15 15:33:48 +10:00
Andrew Tridgell 48aacb9462 HAL_Linux: removed use of RCInput_SBUS and RCInput_115200 2019-05-02 17:58:51 +10:00
Andrew Tridgell 1c322d296f HAL_Linux: switch Disco to using AP_RCProtocol library for RCIN
this is the first step to using AP_RCProtocol for most (or all) RC
input on Linux boards. It also fixes a major bug on Disco where the
old SBUS decoder didn't use strict enough timing checks to filter out
bad frames when video capture is running. That led to erratic flight
mode changes and sometimes loss of control.
2019-05-02 17:58:51 +10:00
Lucas De Marchi 5520b397c2 AP_HAL_Linux: allow disco to use RCInput_UDP
This allows to use any device to send RCInput to Disco via network.
Particularly this is useful when paired to additional changes on
SkyController 2 so it can be used to control Ardupilot.

This was tested with https://github.com/lucasdemarchi/dema-rc running
on SkyController 2.
2019-05-02 16:14:17 +10:00
Jeremy Feltracco 100f06614c AP_HAL_Linux: Add support for setting uart parity on Linux boards
Pass set_parity down through UART class so that set_parity actually
works for Linux boards.
2019-04-26 00:49:25 -07:00
Michael du Breuil 7b7b852c75 AP_HAL_Linux: fix GCC warning in storage 2019-04-15 17:46:44 -07:00
Michael du Breuil 4a01cc1666 AH_HAL_Linux: add heap support to the HAL 2019-04-15 17:46:44 -07:00
Andrew Tridgell 6bae0960df HAL_Linux: added empty flash driver 2019-04-11 13:22:53 +10:00
mirkix 938865da41 AP_HAL_Linux: add override to virtual method 2019-03-24 20:46:17 -07:00
Andrew Tridgell 6251353090 HAL_Linux: removed old px4io protocol header 2019-02-27 20:32:37 +11:00
Peter Barker eb73a14da8 AP_HAL_Linux: add missing override keywords 2019-02-22 15:01:09 +00:00
Peter Barker d89f740460 AP_HAL_Linux: AP_Common no longer gives board information; use AP_HAL_Boards 2019-02-15 08:15:45 +11:00
Tom Pittenger 95820c905d AP_HAL_Linux: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Aaron Wang Shi 8350943e78 AP_HAL_Linux: reduce RCInput_RPI CPU consumption to 1/4 2019-01-24 19:12:21 -08:00
Andrew Tridgell 15853adb04 build: removed remaining make.inc files 2018-12-22 11:06:59 +11:00
Randy Mackay 790a00d8a6 AP_HAL_Linux: remove debug print when SPI device not found 2018-12-06 16:50:16 +11:00
Andrew Tridgell 63705f858b HAL_Linux: use mavlink_packetise() 2018-12-06 11:12:40 +11:00
Andrew Tridgell 48475051d9 HAL_Linux: implement get_system_id() on Linux
this is needed for UAVCAN dynamic node allocation
2018-11-29 16:36:29 +11:00
Andrew Tridgell 02519afdf4 HAL_Linux: fixed an error found with valgrind
sa_flags wasn't initialised
2018-11-27 09:38:18 +11:00
Andrew Tridgell 63556b9804 HAL_Linux: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Michael du Breuil f506a96b7f AP_HAL_Linux: Handle scripting priority 2018-10-09 10:08:52 +11:00
Lucas De Marchi 0990fc4400 AP_HAL_Linux: send warning to stderr 2018-09-19 23:21:13 -07:00
Peter Barker 220a3d19bf AP_HAL_Linux: do not attempt to run examples realtime unless root 2018-09-19 22:40:20 -07:00
Peter Barker 43c07259f3 AP_HAL_Linux: break out init_realtime 2018-09-19 22:40:20 -07:00
Lucas De Marchi ad8ab97725 AP_HAL_Linux: SPIDevice: compile out debug stuff
This should at most be behind a flag. If the device is being used by
other process/drivers, it's a problem with that specific user/distro:
don't penalize everybody else. Besides, changing the mode is not atomic
and nothing guarantees the other side doesn't get scheduled and change
it back before we get to run.
2018-09-08 09:47:33 -07:00
Lucas De Marchi 2c6dd64c67 AP_HAL_Linux: create one thread per spi bus rather than device
Do not create one thread per chardev (i.e. bus + kernel's chip select).
Since the shared resources are actually the bus controller and the bus
lines, it makes sense to have 1 thread per bus, otherwise it will just
get locked again on the mutex in the kernel side.
2018-09-08 09:47:33 -07:00
Lucas De Marchi cf4fb09881 AP_HAL_Linux: Remove hole from SPIBus
Also handle a few coding style bikesheds.
2018-09-08 09:47:33 -07:00
Lucas De Marchi 4152b555fd AP_HAL_Linux: replace kernel_cs with subdev
They are the same thing. Using both names however is confusing.
2018-09-08 09:47:33 -07:00
Francisco Ferreira 5b383bae16
AP_HAL_Linux: force Thread stack to have minimum size
Check that Thread stack size is the minimum allowed

Also add 256k to HAL-independent request stack size
2018-09-06 19:07:13 +01:00
Peter Barker 42c711a5b2 AP_HAL_Linux: remove pointless attach_interrupt override 2018-08-31 08:32:08 +10:00
Andrew Tridgell b347027e13 HAL_Linux: added Semaphore_Recursive 2018-08-25 15:44:36 +10:00
Peter Barker 8d5a9ead48 AP_HAL_Linux: attach_interrupt now takes a functor
AP_HAL_Linux: add type-safety for interrupt types
2018-08-21 20:34:01 +09:00
Andrew Tridgell f1e10b0a8f HAL_Linux: make uart writes thread safe 2018-08-16 12:40:10 +10:00
Andrew Tridgell f005e60066 HAL_Linux: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Lucas De Marchi 5068f2e8fd AP_HAL_Linux: fix log after tonealarm thread removal
../../libraries/AP_HAL_Linux/Scheduler.cpp: In member function ‘void Linux::Scheduler::_debug_stack()’:
../../libraries/AP_HAL_Linux/Scheduler.cpp:127:47: warning: format ‘%zu’ expects a matching ‘size_t’ argument [-Wformat=]
                 _uart_thread.get_stack_usage());
                                               ^
2018-08-12 20:29:35 -07:00
Francisco Ferreira 1d7f3e48a4
AP_HAL_Linux: remove CAN thread management
Also fix comment
2018-08-12 13:35:01 +01:00
Andrew Tridgell 03b7c08be6 HAL_Linux: added duration to toneAlarm_set_buzzer_tone
required for disco
2018-07-30 14:02:12 +10:00
Jonathan Challinger ddf0333a24 AP_HAL_Linux: reflect changes to tonealarm interface 2018-07-30 14:02:12 +10:00
Aaron Wang Shi 1304d37699 AP_HAL_Linux: fix bhat GPS SPI conflict 2018-07-24 11:28:22 -07:00
Aaron Wang Shi 4f2d9c2c4d AP_HAL_Linux: support PWM input for BH hat 2018-07-20 00:32:55 -07:00
Michael du Breuil 2e135f4fc4 AP_HAL_Linux: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil 0aaa029f9b AP_HAL_Linux: GPIO_RPi: Fix UB when reading a pin
You can't shift by more then the word width
2018-07-11 23:09:52 -07:00
Michael du Breuil 1f7ee55211 AP_HAL_Linux: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Andrew Tridgell 1d1af5fd68 HAL_Linux: don't clear buffers on no baud change 2018-07-12 11:41:31 +10:00
Lucas De Marchi d2446e1219 AP_HAL_Linux: use Thread abstraction to create thread
The open coded version has the same problem fixed by Thread abstraction:
the order of the calls matters and it's easy to call in the wrong order.
Here pthread_attr_setschedparam() and pthread_attr_setschedpolicy()
should be swapped, like in 62c2f737d5 (AP_HAL_Linux: fix setting RT priorities.)
2018-07-11 10:00:29 +10:00
Lucas De Marchi e11d268818 AP_HAL_Linux: Thread: allow loose running thread 2018-07-11 10:00:29 +10:00
Jack 4b24a61023 AP_HAL_Linux: fix spelling of generated in panics 2018-07-10 09:55:01 -07:00
Andrew Tridgell 070e3cf37b HAL_Linux: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell 492978c0fa HAL_Linux: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell 9918ae3209 HAL_Linux: implement thread_create() 2018-07-09 19:41:18 +10:00
Andrew Tridgell 9ae6734469 HAL_Linux: support uartG 2018-06-29 08:17:38 +10:00
Lucas De Marchi 49d08ba72a Global: remove minlure
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.

It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Lucas De Marchi d31e85e738 AP_HAL_Linux: fix copy and paste error on gpio table 2018-06-26 07:32:08 -07:00
Michael du Breuil 7043738f3b AP_HAL_Linux: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Hyungsub 97b93920b3 AP_HAL_Linux: fix memory leaks
Fixes #8642
2018-06-18 10:30:56 +01:00
Peter Barker c9dbdd7a5c AP_HAL_Linux: clarify method name, use common methods for setting time 2018-06-15 08:01:22 +10:00
Eugene Shamaev 7dd8308a8c AP_HAL_Linux: reducing indenting by linearizing the logic 2018-06-09 22:46:48 -07:00
mirkix b32b57ad75 AP_HAL_Linux: change SPI Bus for PocketPilot final design 2018-06-07 12:28:21 -07:00
Michael du Breuil 80d1a1de9a AP_HAL_Linux: Remove timer process suspension interface 2018-06-06 07:16:58 +10:00
Michael du Breuil 737c4ac36f AP_HAL_Linux: Remove RC overrides 2018-06-05 09:51:09 +10:00
Lucas De Marchi 88dc17fe6e AP_HAL_Linux: Storage: fix initialization
Use init() to lazily create/open storage directory and keep fd open
afterwards. This avoids duplicate code opening the storage in several
places.
2018-05-24 08:00:33 -07:00
Lucas De Marchi 1f3b7b5687 AP_HAL_Linux: Storage: fix writing garbage while creating file
By the time we create the storage we hadn't still initialized the
buffer. Remove the writes during storage creation since ftruncate() will
take care of the file size aspect and MAX storage write chunk is taken
care by Linux according to the media/fs that is there.
2018-05-24 08:00:33 -07:00
Lucas De Marchi 5526997d45 AP_HAL_Linux: Storage: prefer custom storage
If ardupilot was started with --storage-directory option, use that
directory to save/load parameters.
2018-05-24 08:00:33 -07:00
Lucas De Marchi ff6e76ea6a AP_HAL_Linux: add custom storage directory 2018-05-24 08:00:33 -07:00
Lucas De Marchi 9e538632b3 AP_HAL_Linux: use AP_HAL_STORAGE_DIRECTORY
Add mkdir_p implementation copied from kmod and create the directory
with all possible components.
2018-05-24 08:00:33 -07:00
Andrew Tridgell b396b2a2e0 HAL_Linux: take account of available bytes in receive_time_constraint_us 2018-05-21 14:53:18 +10:00
Francisco Ferreira 5e821428a1 AP_HAL_Linux: remove Qualcomm board support 2018-05-17 09:57:20 +10:00
Andrew Tridgell b8eeac41c8 HAL_Linux: implement uart timestamp API 2018-05-16 18:49:22 +10:00
Michael du Breuil 517e20093e AP_HAL_Linux: Remove set_overrides() method 2018-05-11 12:13:39 +01:00
mirkix 95fbc222d5 AP_HAL_Linux: enable GPIOs for PocketPilot 2018-05-09 16:16:42 -07:00
Peter Barker d5cad015dc AP_HAL_Linux: move delay callback handling to base HAL Scheduler class 2018-05-09 16:15:38 +10:00
Andrew Tridgell 4404c95cc8 HAL_Linux: use ceilf() 2018-05-07 11:43:23 +10:00
Lucas De Marchi b1b4b66e65 AP_HAL_Linux: minlure: fix uart path
In some point in past it may have been ttyS2, but right now on kernel
4.16+ the UART is on ttyS5. We could do like is done for I2C and search
on sysfs, but it requires additional changes.
2018-05-04 11:47:04 -07:00
Lucas De Marchi 320db1d79b AP_HAL_Linux: remove unused i2c devpaths 2018-05-04 11:47:04 -07: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
Lucas De Marchi 4f2498947b AP_HAL_Linux: remove redundant ifdef
CONFIG_HAL_BOARD_SUBTYPE should be set in the boards header.
2018-05-04 11:42:55 -07:00
mirkix 0c353d2af0 AP_HAL_Linux: change PocketPilot to final baro sensor 2018-05-04 08:00:49 +10:00
mirkix 598ae5c3f7 AP_HAL_Linux: PocketPilot: change pru to final design 2018-05-04 08:00:49 +10:00
Mark Whitehorn 7ad0318d4f AP_HAL_Linux: fix latent bug in ToneAlarm 2018-04-10 21:48:16 +10:00
Lucas De Marchi cf3a9cddc8 AP_HAL_Linux: fix build error with flexible array
Apparently this code came in part from libuavcan that defines this
struct Control. They also had the same issue detailed on
https://github.com/UAVCAN/libuavcan/issues/116.

The solution here is much simpler though: stick to the design of cmsg()
even if it's C. As per cmsg(3), use a union together with CMSG_SPACE().
2018-03-22 00:49:58 -07:00
chobits 15b8ae99fe AP_HAL_Linux: fixed AP_MODULE_SUPPORTED on static build 2018-03-02 10:13:19 +11:00
mirkix 234dcc1939 AP_HAL_Linux: fix BeagleBone Blue voltage divider 2018-02-23 18:35:55 +10:00
Lucas De Marchi 755b1cdced AP_HAL_Linux: rpi: sort include headers 2018-02-12 09:05:21 -08:00
Lucas De Marchi 90160a9c52 AP_HAL_Linux: rpi: use const var and fix formatting
Use a const variable instead of a define so we don't polute the
environment with a define specific to this function.

Also remove tabs and replace with proper coding style.
2018-02-12 08:46:36 -08:00
Dmitri Ranfft 05ebabbf6b AP_HAL_Linux: fixed RPi version detection on kernel 4.9 2018-02-12 08:36:58 -08:00
Siddharth Purohit a55f1c85af HAL_Linux: add support for api change in AP_HAL::CANManager 2018-02-07 20:33:45 +11:00
Andrew Tridgell 26161ee467 HAL_Linux: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell 22de99dd58 HAL_Linux: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
mirkix bf758098d7 AP_HAL_Linux: fix deallocation 2018-02-05 11:05:12 +11:00
mirkix c5eb52bf8d AP_HAL_Linux: fix comment 2018-01-23 13:32:12 -08:00
mirkix 700171a0fc AP_HAL_Linux: add second RCIN port for Blue 2018-01-17 15:25:51 -08:00
Nikita Tomilov 1549b1a52a AP_BoardConfig: CAN: Merge PX4 and Linux CAN setup
Here we merge PX4 and Linux CAN bus setup since the interface is almost
the same for both of them.
2018-01-17 07:24:17 -08:00
Tom Pittenger d713d57904 AP_HAL_Linux: update software license referencing UAVCAN submodule 2018-01-17 07:24:17 -08:00
Nikita Tomilov 3ac2e4e8c5 AP_HAL_Linux: CAN: _pollRead no more than 100 iterations
This adds a counter here to only loop to a maximum number of iterations.
Now we avoid situations in which we would be stuck processing packets here.
This also adds some other meaningful defines
2018-01-17 07:24:17 -08:00
Nikita Tomilov 43bfcbc8e2 AP_HAL_Linux: CAN: Rename CANDriver -> CANManager 2018-01-17 07:24:17 -08:00
Nikita Tomilov d0fc481202 AP_HAL_Linux: CAN: Rename Linux::LinuxCAN -> Linux::CAN 2018-01-17 07:24:17 -08:00
Alexey Bulatov e0acbd3e53 AP_HAL_LINUX: Add CAN to timer_task 2018-01-17 07:24:17 -08:00
Nikita Tomilov a50e6c6dd7 AP_HAL: board: linux: Add default CAN interface name 2018-01-17 07:24:17 -08:00
Nikita Tomilov b6665f7e58 AP_HAL_Linux: CAN: get rid of RaiiCloser 2018-01-17 07:24:17 -08:00
Alexey Bulatov 976500960f AP_HAL_LINUX: Add CAN driver 2018-01-17 07:24:17 -08:00
Andrew Tridgell 8fea99e1da HAL_Linux: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell 43c1bd0ae9 HAL_Linux: fixed I2C get_device() interface
just stubs for now
2018-01-15 11:46:02 +11:00
mirkix 8d7000db2c AP_HAL_Linux: fix typo 2018-01-09 12:54:03 -08:00
mirkix 9b6a826b49 AP_HAL_linux: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix eecd8fcfa6 AP_HAL_Linux: Add VOLTAGE_SCALING for BeagleBone Blue 2017-12-19 09:17:06 +11:00
mirkix 26f3a62db7 AP_HAL_Linux: remove BBBmini from RCInput_PRU.cpp 2017-12-14 12:40:37 -08:00
HeBin 0e1ce2a7fd AP_HAL_Linux: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Georgii Staroselskii 56534b34c5 AP_HAL_Linux: use GPIO_Sysfs for Navio
/boot/config.txt: dtoverlay=navio-rgb should be disabled for this thing
to work, though.
2017-11-17 09:20:55 -08:00
Georgii Staroselskii 5254ee03c2 AP_HAL_Linux: use GPIO_Sysfs for Edge 2017-11-17 09:18:36 -08:00
Georgii Staroselskii 8fcd30c611 AP_HAL_Linux: use GPIO_Sysfs for Navio 2 2017-11-17 09:18:35 -08:00
alexshirley 8058fdf093 AP_HAL_Linux: combine ppm and sbus on ocpoc_zynq
Removes compile-time selection of RCInput driver for ocpoc_zynq.
PPM and SBUS input are now colocated on the ocpoc board, and it
only needs to run RCInput_ZYNQ. Pulse input is also inverted
to accommodate SBUS input, which has no effect on PPM input.
2017-11-01 10:28:40 -07:00
Lucas De Marchi cbb9dcc2a1 AP_HAL_Linux: Storage: use define from HAL for directory 2017-10-30 16:57:37 -07:00
Georgii Staroselskii 79c14a92a9 AP_HAL_Linux: adapt Heat_Pwm for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii 4e6fab228c AP_HAL_Linux: add SPI devices for Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii 3ade179700 AP_HAL_Linux: make use of RCInput_Navio2 in Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii 2a99bb0c95 AP_HAL: use Raspberry Pi GPIO and Util classes for Edge
As it's a yet another Raspberry Pi based board, we may reuse the code.
2017-10-20 13:03:08 -07:00
Staroselskii Georgii 2a7e8d66ee AP_HAL_Linux: add Edge support
Just some usual boilerplate code.
2017-10-20 13:03:08 -07:00
Georgii Staroselskii 2dd68243a2 AP_HAL: add Edge support 2017-10-20 13:03:08 -07:00
Georgii Staroselskii d214a36e0a AP_HAL_Linux: reset duty cycle before setting period
On kernels 4.7+ duty_cycle should always be less than period.
Otherways, we'll get a EINVAL.

It makes sense to set duty_cycle to 0, as
duty_cycle doesn't really make sense without a proper period.

A proper way to handle these errors might be to call pwm_adjust_config
in every pwmchip backend but it's unrealistic to hope that all vendors
will do it quickly.
2017-10-17 13:28:34 -07:00
Lucas De Marchi 4d5aed1d69 AP_HAL_Linux: UARTDevice: never be the controlling terminal
If we are the controlling terminal for a tty device we will receive a
SIGHUP when the device disappears. Currently what happens is that we
simply stop the whole process. We don't want to fall off the sky due
to a bad device. This can happen for any reason, but it's more likely
if the UART is behind a USB connection.
2017-10-02 11:05:09 -07:00
Lucas De Marchi 5ebc8c2cb3 AP_HAL_Linux: ToneAlarm: ifdef out bogus message
These messages are only valid in a small subset of Linux boards (those
based on BBB and variants).  The ToneAlarm class should actually be
split allowing different implementations, but for now let's just disable
the message.
2017-09-28 09:00:26 -07:00