Commit Graph

56 Commits

Author SHA1 Message Date
Andrew Tridgell deb86be1da AP_HAL_Linux: added old_size to heap_realloc 2023-01-16 09:19:16 +11:00
Yuri 80079b2ce7 AP_HAL_Linux: increase short board names to 23 chars 2022-09-21 17:56:42 +10:00
Peter Barker d8e4669e07 AP_HAL_Linux: tidy set/get of hw RTC 2021-12-06 12:58:43 +11:00
Lucas De Marchi 24adf18685 AP_HAL_Linux: small fixes to cpu affinity
- Do not mention x:y form in the comment since it's not supported
  - Give more detail in the help output regarding the meaning of each form
  - No prints in the helper parse function, let the caller print it
2021-10-08 16:08:52 -07:00
HefnySco 9f1cbdc0a5 AP_HAL_Linux: cpu affinity 2021-10-08 13:47:56 -07:00
Siddharth Purohit f2e947589d AP_HAL_Linux: add support for hw random number generation 2021-07-07 18:57:25 +10:00
Andrew Tridgell dfc4b37df1 AP_HAL_Linux: removed perf counters 2021-06-07 14:29:27 +10:00
Andy Piper ba96f4491d AP_HAL_Linux: allow tone alarm types 2021-05-05 17:41:24 +10:00
Andrew Tridgell fd3bf0f639 HAL_Linux: added --defaults option to Linux HAL
useful for initial parameters
2021-04-13 09:36:52 +10: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
Michael du Breuil 4a01cc1666 AH_HAL_Linux: add heap support to the HAL 2019-04-15 17:46:44 -07:00
Peter Barker eb73a14da8 AP_HAL_Linux: add missing override keywords 2019-02-22 15:01:09 +00:00
Tom Pittenger 95820c905d AP_HAL_Linux: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07: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 63556b9804 HAL_Linux: removed hal.util->new_semaphore()
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11: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
Peter Barker c9dbdd7a5c AP_HAL_Linux: clarify method name, use common methods for setting time 2018-06-15 08:01:22 +10:00
Lucas De Marchi ff6e76ea6a AP_HAL_Linux: add custom storage directory 2018-05-24 08:00:33 -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
Lucas De Marchi 16c1bc1b0e AP_HAL_Linux: Util: fix coding style for pointers 2017-04-19 00:19:40 -07:00
Lucas De Marchi 9aa2a3938c AP_HAL_Linux: Util: make get_custom_log_directory const override final
While at it, add final and override to mark this as being the overriden
final implementation of this method.

Thanks to Phillip Khandeliants (@khandeliants) for reporting.
2017-04-19 00:19:22 -07:00
Lucas De Marchi 008e631147 AP_HAL_Linux: Util: fix overriden function signature
While at it, add final and override to mark this as being the overriden
final implementation of this method.

Thanks to Phillip Khandeliants (@khandeliants) for reporting.
2017-04-18 23:57:54 -07:00
Mathieu OTHACEHE 60ba91aead Disco: add buzzer support
Use ToneAlarm class to handle Disco buzzer.
2016-11-07 18:02:21 -03:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Lucas De Marchi f37a560295 AP_HAL_Linux: remove private headers
This centralized private header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.
2016-07-29 20:29:46 -03:00
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
This centralized namespace header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.

While at it, do some whitespace cleanups and minor changes to adhere to
coding style.
2016-07-29 20:25:03 -03:00
Andrew Tridgell aaaa6d38c7 HAL_Linux: initial support for Disco 2016-07-20 13:35:51 +10:00
Andrew Tridgell 461c159b22 HAL_Linux: use set_imu_target_temp() API 2016-07-01 15:29:52 +10:00
Lucas De Marchi 619ce23799 AP_HAL_Linux: Perf: rework integration with other tools
The idea is to leave the internal perf enabled all the time, like it is
in PX4, and then allow the integration with lttng on top. Next step
would be to runtime enable/disable only the perf counters we are
interested in.

This also changes the structure so it's easy to allow another thread to
pull data from the Perf object. A rw lock protects from addition of new
counters and an atomic unsigned int allows other threads to do a
lockless copy of the data.

In order for this to work the allocation was changed to use a single
memory pool instead of returning a calloc'ed data for each perf counter.
Since most of our counters are of ' elapsed' type, don't bother using a
smaller struct for the 'count' type
2016-06-23 19:06:30 -03:00
Lucas De Marchi c1623c21cc AP_HAL_Linux: rename ToneAlarmDriver to follow other names
We don't add "Driver" to the name of the files anymore.
2016-03-18 21:51:37 -03:00
Pritam Ghanghas 6de5b52974 AP_HAL_Linux: separate class for tone alarm driver 2016-03-18 21:51:36 -03:00
Lucas De Marchi 705393b30c AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Julien BERAUD b6f51233db AP_HAL_Linux: Make RPI get_hw method public
Valid also on Bebop
2015-12-27 16:11:36 -02:00
Andrew Tridgell c77e3c89c5 HAL_Linux: implement new_semaphore() 2015-12-20 17:55:39 +11:00
Lucas De Marchi d19c5035b6 Global: Rename printf format attribute
As commented in 8218140 ("AP_Common: add scanf format macro"), "FORMAT"
was a bad name for this macro since there's also the scanf. Rename to
FMT_PRINTF to follow the scanf name.
2015-12-01 07:22:12 +11:00
José Roberto de Souza 5ff67a41a1 AP_HAL_Linux: Implement perf API
Initial implementation of perf API on Linux, for now just saving
perf data, in a further patch this data will be exported.
2015-11-13 12:16:19 +11:00
Lucas De Marchi 392879112e AP_HAL_Linux: document functions to write file
Document function and add attributes to mark then as printf- and
scanf-like functions.
2015-11-10 17:05:34 +11:00
José Roberto de Souza 39bd5fa80e AP_HAL_Linux: Add PWM_Sysfs
This class makes easy to use Linux PWM sysfs interface, available since
Linux 3.10.

More information https://www.kernel.org/doc/Documentation/pwm.txt
2015-11-10 17:05:34 +11:00
Andrew Tridgell 883ac59e4a HAL_Linux: always report 256k of available memory 2015-11-05 16:09:00 +11:00
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.
2015-10-21 10:11:19 +11:00
Julien BERAUD ffbb892a01 AP_HAL_Linux: add support for a pwm heater
It uses a heating resistor controlled by a pwm.
By changing the duty cycle of the pwm, we can control the temperature.
A simple PI algorithm is used in order to get to the correct temperature
fast enough and without too much overshoot
It is implemented as a member of the Util class in order not to make to much
modification to the current codebase
2015-10-06 15:21:39 +11:00
Lucas De Marchi 54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
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.
2015-08-11 16:28:43 +10:00
Andrew Tridgell a3c7297d8e HAL_Linux: fixed setting of custom directories 2015-06-30 15:08:10 +10:00
Víctor Mayoral Vilches 2e7a4aa1e6 HAL_Linux: Implement custom dir. methods 2015-06-30 14:36:42 +10:00
Víctor Mayoral Vilches 790f4ec56c HAL_Linux: Util fix indentation 2015-06-30 14:35:59 +10:00
Lucas De Marchi acc571c2c5 AP_HAL_Linux: add function to check if path is chardev
Utility function to allow checking if a certain path is a character
device.
2015-06-30 09:10:54 +10:00
Víctor Mayoral Vilches 974f243c7e HAL_Linux: Add set_system_clock 2015-01-22 15:43:16 +11:00
bugobliterator 329c1f5190 HAL_Linux:create ToneAlarmDriver as a separate class
ToneAlarm is now declared as a separate class instance of which is added as a private member of LinuxUtil
Some minor fixes in this patch include changing return type of tonealarm_init() to bool and use dprintf
2014-11-15 16:59:06 +11:00