Commit graph

582 commits

Author SHA1 Message Date
Ryan Turner
578c48a39c drivers: tones: add SDL-based beep generator
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-07-25 20:25:10 +02:00
Ryan Turner
5c0df5478e drivers: audio: add SDL-based audio output driver
The Linux emulator had no working audio output: the speaker endpoint had a
NULL driver (streams returned -ENODEV). This adds an SDL2 audio playback
driver for the output path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-07-25 20:25:10 +02:00
Silvano Seva
0d3d2a37ce drivers: audio_linux: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-07-25 20:25:10 +02:00
Vlastimil Slinták
c8e31252cb drivers: NVM: add missing spi_acquire in W25Qx write path
W25Qx_writePage released the SPI bus mutex without ever acquiring it,
leaving page programs unguarded on shared buses and unlocking a mutex
possibly held by another thread. The lock was lost in the extended
addressing refactor (404e8403).

Fixes #476

Signed-off-by: Vlastimil Slinták <slintak@uart.cz>
2026-07-05 17:05:48 +02:00
Behnood Abdollahi
1fc055fbf2 drivers: NVM: fix out-of-bounds access in settings block rollover
Replace hard-coded block limit (2047) with ARRAY_SIZE(memory->data)
to correctly bound access to the 1024-entry NVM data array.
2026-06-06 08:51:17 +02:00
Behnood Abdollahi
a3ad4105c7 drivers: NVM: fix eraseSector return type 2026-06-06 08:40:50 +02:00
Silvano Seva
e54d74d336 drivers: ADC: add ADC Driver for AT32F423 2026-05-17 12:19:30 +02:00
marco
7502aa4065 drivers: GPIO: add gpio driver for AT32F423 2026-05-17 12:19:30 +02:00
Silvano Seva
3030cdc20f NVM: posix_file: make posixFile_init() return 1 on file creation
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-05-16 16:50:04 +02:00
Morgan Diepart
65d26c188b NVM: posix_file: return 0 on read/write success 2026-05-16 16:50:04 +02:00
Silvano Seva
1d185e26ff NVM: posix_file: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-05-16 16:50:04 +02:00
Ryan Turner
99d0b85a5c drivers: fix Linux platform unable to read baseband audio file sources
fileSource_data() assigned dest from ctx->buffer but never wrote the
pointer back to the caller's *buf, leaving the consumer with the
original (uninitialized or stale) pointer it passed in. On the Linux
platform this meant baseband audio streamed from file sources was
silently dropped, breaking loopback and file-based baseband tests.

Set *buf = dest immediately after dest is initialized so the caller
always receives the valid buffer pointer.

Co-authored-by: GitHub Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-05-10 10:56:06 +02:00
Silvano Seva
1ade63e469 drivers: SKY72310: set phase detector gain during init
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-04-28 21:14:04 +02:00
Silvano Seva
dc82283bd0 drivers: SKY72310: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-04-28 19:55:47 +02:00
marco
94f0e31113 MD9600: read hardware info from external flash 2026-04-22 19:01:18 +02:00
Joshua Murphy
9a7363df8e drivers: gpio_stm32: fix OPEN_DRAIN_PU setup mode
It looks like this might be have been a typo. OPEN_DRAIN
and OPEN_DRAIN_PU are identical case statements, but
the pullup should be set.

Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
2026-04-17 18:22:22 +02:00
Joshua Murphy
08113428b2 audio: Cx000: reduce sine table amplitude to avoid clipping
The sine table used by the HR Cx000 DACs ranged from +32767 to
-32767, causing clipping on devices like the CS 7000P. The values
have been scaled down by a value of 2 so that clipping is prevented.

Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
2026-04-10 21:31:10 +02:00
Morgan Diepart
d0af737f6b drivers: nvm: add driver for stm32 internal flash 2026-03-22 21:29:39 +01:00
Silvano Seva
9cc6115cc4 nvm: linux: update partition access indexes
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
90e18512ab nvm: CS7000: update partition access indexes
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
a71ea8a2d7 nvmem: move nvm_getDesc function to nvmem access API
With the introduction of the nonvolatile memory area descriptor table,
the nvm_getDesc function is not anymore required as part of the low-level
platform interface API. The function is now moved to the application
API, to provide safe access to NVM area information.

TG-795

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
63db6e6457 nvmem: add nonvolatile memory device table
Add a data structure carrying information about the nonvolatile memory
devices present on a given target. The table contains a list of NVM area
descriptors and their number.
From now on, each target must define the "nvmTab" symbol of type "const
struct nvmTable", which represents the entry point for all the
user-space APIs to access the nonvolatile memory.

TG-795

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
22174f0f67 nvmem: move device access API to a separate file
Moved all the helper function for low-level NVM device access to a
dedicated header file.

TG-796

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
4a19c61b71 nvm: rename nvmDescriptor field "partNum" to "nbPart"
Renamed the "partNum" field of nvmDescriptor data structure to "nbPart"
to reduce abiguity. The older notation could have been interpreted as
"partition number" instead of "number of partitions".

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
a93be2e323 nvm: drop the NVM_BITWRITE flag
There is no need for this flag, at least in the planned developments: to
avoid confusion and to keep the code clean, it is being removed.

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
8133dad049 nvm: update W25Qx security register driver
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
78fcca80ba nvm: add base address field to nvmDescriptor struct
Added a field to nvmDescriptor data structure holding the absoute base
address of the memory area. The value is dependent on the specific
instance of the descriptor.

Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
83757f422a nvm: removed size field from nvmDevice data structure
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
9f75be0835 nvm: add size field to nvmDescriptor data structure
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-03-03 18:34:07 +01:00
Silvano Seva
821b6cb288 audio: apply clang-format to file_source
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-02-14 15:32:52 +01:00
Ryan Turner
996d25c585 audio: file_source: fix runtime bugs
Previous to this, the file source that is used on linux was not
working for me. This change addresses those issues found.

Co-authored-by: GitHub Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-02-14 15:32:52 +01:00
Ryan Turner
95fdcd5fe2 copyright-and-license: adopt SPDX-compliant header
This change removes the old copyright header from project sources and
replaces it with a new simplified SPDX-compliant header. Note that files
that were missing the header but reasonably understood to be licensed
according to the root license were not corrected.

Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-01-14 20:10:07 +01:00
Ryan Turner
d2ddddf478 Fix incorrect include paths for platform-unique header files 2025-10-02 19:43:55 +02:00
Ryan Turner
35788b9c1c HR_C6000: add method to read 16-bit addressed registers
Acked-by: Silvano Seva <silseva@fastwebnet.it>
2025-09-28 18:11:48 +02:00
Ryan Turner
00a4dbb063 style: resolve ambiguous paths on include macros
Update meson and cmake config to only include openrtx and platform paths.
Update files to use <..> for system and external libraries, ".." for
project files and new relative paths as necessary.

Did not attempt to fix areas where includes that should be <..> were
previously ".."

Inspired by #96, closes #359.

Acked-by: Silvano Seva <silseva@fastwebnet.it>
2025-09-28 17:27:45 +02:00
Silvano Seva
44d0774b39 ttwrplus: updated GPS driver 2025-08-15 20:07:32 +02:00
Silvano Seva
7684c11328 linux: updated GPS driver to new API 2025-08-15 20:07:32 +02:00
Silvano Seva
f8dcefb76b MD-9600: using new STM32 GPS driver 2025-08-15 20:07:32 +02:00
Silvano Seva
29ebf95966 CS7000: using new STM32 GPS driver 2025-08-15 20:07:27 +02:00
Silvano Seva
b8e220c276 drivers: gps: generic driver for STM32 USART peripherals 2025-08-15 20:00:20 +02:00
Silvano Seva
e66125fafc STM32H: drivers: renamed pll sources to "rcc" 2025-08-13 18:56:25 +02:00
Silvano Seva
2230c48d5d drivers: gps: added ring buffer for storing NMEA sentences.
Added implementation for a lock-free ring buffer designed for storage and
retrieval of full NMEA sentences. Data can be inserted either by char or
by sentence and extracted only by full sentences.
The size of the buffer, in byte, is defined via the CONFIG_NMEA_RBUF_SIZE
macro.
2025-08-13 18:56:25 +02:00
Silvano Seva
0d47410b6c CS7000: radio: added transmission of 1750Hz tone 2025-07-11 20:10:46 +02:00
Silvano Seva
22dba93295 drivers: baseband: HR_C6000: renamed disableCtcss() to disableTones() 2025-07-11 20:10:46 +02:00
Silvano Seva
ac6127684a linux: nvmem: fixed wrong bound check in nvm_getDesc 2025-07-11 20:10:34 +02:00
Silvano Seva
28aa4378c2 MD3x0: radio: fixed broken 1750Hz tone 2025-07-05 14:05:49 +02:00
Silvano Seva
c64057780f CS7000: display: added delay between data write and WR line assertion 2025-07-05 14:05:49 +02:00
Morgan Diepart
6cd4583677 Fixed maximum audio for MDUV3x0 out of bounds 2025-07-05 11:29:09 +02:00
Silvano Seva
03d1ae5546 Updated year in copyright headers 2025-04-04 21:15:39 +02:00
Silvano Seva
15a544e2ad DM-1701: radio driver 2025-04-02 19:28:22 +02:00