Commit Graph
1109 Commits
Author SHA1 Message Date
Andy Piper 34e3dc466d AP_HAL_Linux: add SPI-based serial LED driver for NeoPixel/WS2812
Add modular SPI-based serial LED driver that uses SPI MOSI to generate
WS2812 timing waveforms. Uses 8-bit encoding at 6.4MHz SPI clock where
each WS2812 bit becomes one SPI byte.

SerialLED_SPI is a standalone class that can be composed into any
RCOutput implementation. RCOutput_RPI provides the RCOutput wrapper
for Raspberry Pi boards.

Features:
- Supports MODE_NEOPIXEL (GRB) and MODE_NEOPIXELRGB (RGB) color ordering
- Up to 128 LEDs per channel
- Uses /dev/spidev0.0 (GPIO10/pin 19) on Raspberry Pi
- Thread-safe with mutex protection
- Embedded object instead of heap allocation for SerialLED_SPI
- Uses calloc/free for dynamic arrays (less overhead than new/delete)
2026-02-11 18:46:23 +11:00
Willian Galvani b622650e7a AP_HAL_Linux: add pin_to_servo_channel() to GPIO_Navigator 2025-12-16 09:01:30 +11:00
Thomas Watson e4ae16e233 AP_HAL_Linux: drop CAN interface alternate mode support
Only "NormalMode" was ever used; the others had rotted or were never
implemented.
2025-11-11 10:58:43 +11:00
Thomas Watson 07aef7ec31 AP_HAL_Linux: drop CAN filter support from HAL
Has been unused since the removal of libuavcan.
2025-11-11 10:58:43 +11:00
Peter Barker 51341124bc AP_HAL_Linux: move scheduler task update rate into hwdefs 2025-11-05 20:07:45 +11:00
Peter Barker 4f906f06a2 AP_HAL_Linux: remove HAL_BOARD_SUBTYPE_LINUX_ZYNQ
... replace with more-specific defines
2025-11-03 18:29:32 -06:00
Peter Barker 3c0f75cc8a AP_HAL_Linux: remove HAL_BOARD_SUBTYPE_LINUX_ZYNQ
... replace with more-specific defines
2025-11-03 18:29:32 -06:00
Peter Barker 87dc1eb5a0 AP_HAL_Linux: create an abstract base class for linux boards
This resolves a some oddness where the "linux" target you might use when configuring is also (sort of) the same class used when inheriting when creating a Linux board (e.g. bbbmini).

The "linux" hwdef has gained all of the bits which makes a build that works on your laptop work.
2025-11-01 10:46:28 -05:00
Peter Barker 428f27f60c AP_HAL_Linux: fix instances of flake8 B006 error
e.g.:

./Tools/autotest/vehicle_test_suite.py:8607:89: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
2025-10-28 20:19:01 -05:00
Bob Long e857197cf4 AP_HAL_Linux: rename HAL_PROBE_EXTERNAL_I2C_COMPASSES to AP_COMPASS_PROBING_ENABLED
PR merge ordering caused this to get missed
2025-10-28 07:48:43 +00:00
Erkan Vatan fd6d729cea AP_HAL_Linux: add t3-gem-o1 board 2025-10-27 18:43:16 -05:00
Peter Barker 5f645ecfca AP_HAL_Linux: rename HAL_PROBE_EXTERNAL_I2C_COMPASSES to AP_COMPASS_PROBING_ENABLED
... and force it to have a value, not just be defined
2025-10-27 18:24:18 -05:00
Peter Barker e7dcc5598b AP_HAL_Linux: remove RST Zynq board
this was broken since 2019 until quite recently (and it quite possibly still broken...)
2025-10-26 16:17:13 +11:00
juvinski ff6085c00f AP_HAL_Linux: Added Pocket Beagle 2 hwdef file
This commit add the hwdef definition file for the PocketBeagle 2.
The board and folder is names as pocket2. This already include the
change of voltage scale implemented on the PR #30497.
2025-10-09 22:34:20 +11:00
juvinski c6eac5f3ea AP_HAL_Linux: Update HAL_Linux_Class to support PocketBeagle 2
This commit update the HAL_Linux_Class.cpp adding the PocketBeagle 2
GPIO, RC handling, Analog, etc.
2025-10-09 22:34:20 +11:00
juvinski c750d4c11e AP_HAL_Linux: Update RCOutput_AioPRU to support PocketBeagle 2
This commit update the RCOutput_AioPRU to be used with PocketBeagle2.
The memory address is different, the PRU running at 250 MHZ instead
200 MHZ and some registers too - this is present in the PRU firmware
file - the RcAioPRU_POCKET2_bin.h file.
Other important detail is the gcc optimization forced to 1. This is
necessary once for something the ARM64 and memcpy didn't work and a
block loading was used instead memcpy.
2025-10-09 22:34:20 +11:00
juvinski f1ede83a73 AP_HAL_Linux: Update RCInput_AioPRU to support PocketBeagle 2
This commit update the RCInput_AioPru to be used with PocketBeagle2.
The memory address is different of other beagles as well the PRU
running at 250 MHZ instead 200 MHZ.
2025-10-09 22:34:20 +11:00
juvinski de3f499561 AP_HAL_Linux: Adding PocketBeagle2 GPIO support
This add support for the PocketBeagle 2 GPIO.
On the PocketBeagle 2 to handle GPIO there is SET/GET registers, what
make the /dev/mem access safe.
2025-10-09 22:34:20 +11:00
Thomas Watson f36c8ee578 AP_HAL_Linux: don't generate no-longer-used env.py 2025-10-06 08:02:36 +11:00
Peter Barker 8a2f9930f9 AP_HAL_Linux: break out a write_device_table method 2025-09-03 11:54:13 +01:00
massout e7653551b0 AP_HAL_Linux: Two staged fix for Raspberry pi 5 "Cannot detect board-type" 2025-07-30 12:27:15 +10:00
massout 2b8c945147 AP_HAL_Linux: Fix for Raspberry pi 5 "Cannot detect board-type" 2025-07-30 12:27:15 +10:00
Peter Barker 3708936c62 global: correct shebang lines to refernce python3
also remove the odd encoding line which is not required in Py3
2025-07-22 10:45:57 +10:00
Christian Rauch 6f5db25fc6 AP_HAL_Linux: inform user of bad RPi board version 2025-07-16 10:22:40 +10:00
Peter Barker 02bd08b25c AP_HAL_Linux: only auto-build Plane on Disco, copter on bebop
various commits have made us build all vehicles on these boards rather than just the vehicle type they're embedded in
2025-07-15 09:55:20 +10:00
Peter Barker feedda07aa AP_HAL_Linux: rename IIO_VOLTAGE_SCALING to AP_HAL_LINUX_ANALOGIN_IIO_VOLTAGE_SCALING 2025-07-01 10:55:05 +10:00
Peter Barker fee426fb7a AP_HAL_Linux: move configuration of AnalogInIIO to hwdefs 2025-07-01 10:55:05 +10:00
Daniel Hiepler c3c5d0427a AP_HAL_Linux: add PilotPi support 2025-06-18 05:40:21 +10:00
Christian Clauss 6756c3c6a8 hwdef: Fix check-shebang-scripts-are-executable 2025-06-15 11:17:47 +10:00
heeplr b892968cfa AP_HAL_Linux: set BOTHER c_cflag to choose other baudrates
colcon build/test / build-test (push) Has been cancelled
Cygwin Build / build (push) Has been cancelled
ESP32 Build / build (esp32buzz, 10) (push) Has been cancelled
ESP32 Build / build (esp32s3empty, 10) (push) Has been cancelled
Macos Build / build (CubeOrange) (push) Has been cancelled
Macos Build / build (sitl) (push) Has been cancelled
QURT Build / build (push) Has been cancelled
test chibios / build (CubeOrange-EKF2, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-ODID, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-PPP, 10, chibios) (push) Has been cancelled
test chibios / build (CubeOrange-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (CubeRedPrimary-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (MatekF405-Wing, 10, chibios) (push) Has been cancelled
test chibios / build (Pixhawk6X-PPPGW, 10, chibios) (push) Has been cancelled
test chibios / build (SOHW, 10, chibios) (push) Has been cancelled
test chibios / build (build-options-defaults-test, 10, chibios) (push) Has been cancelled
test chibios / build (configure-all, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv2-plane, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv3, 10, chibios) (push) Has been cancelled
test chibios / build (fmuv3-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (iofirmware, 10, chibios) (push) Has been cancelled
test chibios / build (new-check, 10, chibios) (push) Has been cancelled
test chibios / build (periph-build, 10, chibios) (push) Has been cancelled
test chibios / build (revo-bootloader, 10, chibios) (push) Has been cancelled
test chibios / build (revo-mini, 10, chibios) (push) Has been cancelled
test chibios / build (signing, 10, chibios) (push) Has been cancelled
test chibios / build (stm32f7, 10, chibios) (push) Has been cancelled
test chibios / build (stm32h7, 10, chibios) (push) Has been cancelled
test chibios / build (stm32h7-debug, 10, chibios) (push) Has been cancelled
test dds / build (sitl) (push) Has been cancelled
test dds / build (stm32h7) (push) Has been cancelled
test Linux SBC / build (bbbmini, armhf) (push) Has been cancelled
test Linux SBC / build (bebop, armhf) (push) Has been cancelled
test Linux SBC / build (bhat, armhf) (push) Has been cancelled
test Linux SBC / build (canzero, armhf) (push) Has been cancelled
test Linux SBC / build (erlebrain2, armhf) (push) Has been cancelled
test Linux SBC / build (linux, base) (push) Has been cancelled
test Linux SBC / build (navigator, armhf-musl) (push) Has been cancelled
test Linux SBC / build (navigator64, aarch64) (push) Has been cancelled
test Linux SBC / build (navio, armhf) (push) Has been cancelled
test Linux SBC / build (navio2, armhf) (push) Has been cancelled
test Linux SBC / build (pxf, armhf) (push) Has been cancelled
test Linux SBC / build (pxfmini, armhf) (push) Has been cancelled
test scripts / build (astyle-cleanliness) (push) Has been cancelled
test scripts / build (check_autotest_options) (push) Has been cancelled
test scripts / build (logger_metadata) (push) Has been cancelled
test scripts / build (param_parse) (push) Has been cancelled
test scripts / build (python-cleanliness) (push) Has been cancelled
test scripts / build (validate_board_list) (push) Has been cancelled
test plane / build (base) (push) Has been cancelled
test plane / build (clang) (push) Has been cancelled
test plane / autotest (sitltest-plane-tests1a) (push) Has been cancelled
test plane / autotest (sitltest-plane-tests1b) (push) Has been cancelled
test plane / autotest (sitltest-quadplane) (push) Has been cancelled
test unit tests and sitl building / build (examples, base) (push) Has been cancelled
test unit tests and sitl building / build (examples, clang) (push) Has been cancelled
test unit tests and sitl building / build (sitl, base) (push) Has been cancelled
test unit tests and sitl building / build (sitl, clang) (push) Has been cancelled
test unit tests and sitl building / build (unit-tests, base) (push) Has been cancelled
test unit tests and sitl building / build (unit-tests, clang) (push) Has been cancelled
test ccache / build (10, chibios) (push) Has been cancelled
test replay / build (replay, base) (push) Has been cancelled
test replay / build (replay, clang) (push) Has been cancelled
test blimp / build (base) (push) Has been cancelled
test blimp / build (clang) (push) Has been cancelled
test blimp / autotest (sitltest-blimp) (push) Has been cancelled
test copter / build (base) (push) Has been cancelled
test copter / build (clang) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1a) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1b) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1c) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1d) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests1e) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests2a) (push) Has been cancelled
test copter / autotest (sitltest-copter-tests2b) (push) Has been cancelled
test copter / build-gcc-heli (push) Has been cancelled
test copter / autotest-heli (sitltest-heli) (push) Has been cancelled
test ap_periph / build-gcc-ap_periph (push) Has been cancelled
test ap_periph / autotest-can (sitltest-can) (push) Has been cancelled
test rover / build (base) (push) Has been cancelled
test rover / build (clang) (push) Has been cancelled
test rover / autotest (sitltest-balancebot) (push) Has been cancelled
test rover / autotest (sitltest-rover) (push) Has been cancelled
test rover / autotest (sitltest-sailboat) (push) Has been cancelled
test sub / build (base) (push) Has been cancelled
test sub / build (clang) (push) Has been cancelled
test sub / autotest (sitltest-sub) (push) Has been cancelled
test tracker / build (base) (push) Has been cancelled
test tracker / build (clang) (push) Has been cancelled
test tracker / autotest (sitltest-tracker) (push) Has been cancelled
References:
* https://man7.org/linux/man-pages/man2/TCSETS.2const.html
* https://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/
2025-06-07 15:28:25 +10:00
DrTobe da8b1680c5 AP_HAL_Linux: Only set the UART device speed if the baudrate argument is non-zero 2025-05-27 11:25:18 +10:00
Peter Barker 28a7b772e8 AP_HAL_Linux: remove bad Baro-related defines 2025-05-07 17:13:13 +10:00
Andrew Tridgell 340f43c43a HAL_Linux: fixed race in CAN send
multiple threads sending can cause this to fail
2025-05-06 10:55:12 +10:00
Peter Barker a4fc9c1582 AP_HAL_Linux: indicate native toolchain for Linux target
ie just "g++"
2025-05-03 09:57:30 +10:00
Peter Barker 110f59539f AP_HAL_Linux: factor MS56XX into MS5607, 5611, 5637 and 3847 backends 2025-04-16 17:28:42 +10:00
Andy Piper 8dc091ffa1 AP_HAL:Linux: SPI full duplex implementation 2025-04-02 19:25:21 +11:00
Peter Barker 70000fca6c AP_HAL_Linux: remove unused RCInput_UART 2025-03-25 11:45:47 +11:00
Peter Barker 420e115616 AP_HAL_Linux: correct undefing of spdev lines 2025-03-19 09:00:34 +11:00
Peter Barker ab1c62e920 AP_HAL_Linux: avoid use of OwnPtr in PCA9685 RCOU driver 2025-03-12 18:29:48 +11:00
Peter Barker be99f5452f AP_HAL_Linux: add get_device-ptr to HAL DeviceMananger API 2025-03-11 12:00:22 +11:00
Peter Barker 23ffc39afa AP_HAL_Linux: correct compilation of the Aero board
hwdef: make BMM150 internal

Need to choose force-external or not, assuming this one is on-board
2025-02-26 23:42:07 +11:00
Peter Barker d005e9cfbc AP_HAL_Linux: allow linux hwdefs to specify WITH_CAN in hwdef env 2025-02-26 23:42:07 +11:00
Peter Barker 4147e4fc7b AP_HAL_Linux: move definition of CONFIG_HAL_BOARD_SUBTYPE into hwdefs 2025-02-26 23:42:07 +11:00
Peter Barker 7c95668fd6 AP_HAL_Linux: extract toolchain from hwdef 2025-02-26 23:42:07 +11:00
Peter Barker f451f83d68 AP_HAL_Linux: make linux hwdef write out env.py 2025-02-26 23:42:07 +11:00
Peter Barker 0d05814d30 AP_HAL_Linux: move BARO lines to hwdef 2025-02-25 14:38:45 +11:00
Peter Barker 1fa2cf38d5 AP_HAL_Linux: move parsing of BARO lines up to AP_HAL hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker 0714b3abc2 AP_HAL_Linux: move COMPASS definitions to hwdef 2025-02-25 14:38:45 +11:00
Peter Barker bdce6f2779 AP_HAL_Linux: move parsing of COMPASS hwdef lines up to hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker 2998190c4b AP_HAL_Linux: hwdef: best-guess IMU fix on rst-zynq 2025-02-25 14:38:45 +11:00