Commit graph

302 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
5a50737689 targets: linux: platform.c: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-07-25 20:25:10 +02:00
Silvano Seva
0793f0c213 targets: linux: emulator: apply clang-format
Signed-off-by: Silvano Seva <silseva@fastwebnet.it>
2026-07-25 20:25:10 +02:00
marco
94f0e31113 MD9600: read hardware info from external flash 2026-04-22 19:01:18 +02:00
Jetse Verschuren
4a83e8f6f4 targets: add mic oversampling configuration
Add oversampling for each target:
  - MD-3x0, MD-UV3x0, MD-9600, DM-1701, CS7000: 8  (64 kHz)
  - CS7000-PLUS: 6  (48 kHz, LPTIM3 cannot trigger ADC at 64 kHz)
  - All other targets default to 1 via #ifndef guard (no oversampling)

Co-authored-by: Ryan Turner <ryan@turnrye.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-20 20:21:52 +02:00
Ryan Turner
cec0043351 core: audio_codec: move mic gain to hwconfig files
Replace the platform-specific #ifdef chain for micGain in audio_codec.c
with a CONFIG_MIC_GAIN macro defined in each target's hwconfig.h. This
removes code forking in the codec and makes mic gain a per-device
hardware configuration parameter.

Co-authored-by: opencode <noreply@opencode.ai>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-04-20 20:04:29 +02:00
Ryan Turner
711c653fc2 style: apply clang-format to hwconfig files
Co-authored-by: opencode <noreply@opencode.ai>
Signed-off-by: Ryan Turner <ryan@turnrye.com>
2026-04-20 20:04:29 +02:00
Joshua Murphy
088d906cb5 cs7000p: Update platform_getMicLevel() to use VOX input
platform_getMicLevel() now samples data from the ADC
configured for the hardware VOX circuit instead of the
microphone input ADC, which has a fixed 1.65V bias and
is unsuitable for checking mic level.

Normalization is performed specific to the characteristics
of the hardware VOX circuit. Values are output between 0-255
to ensure API compatibility.

Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
2026-04-11 19:38:21 +02:00
Joshua Murphy
0541d6e96c cs7000p: Update pinmap for VOX circuit, add ADC channel
The CS7000P schematic indicates the hardware VOX circuit
is connected to PC4 on the STM32H7. The pinmap.h file has
been updated to reflect this. The existing assignment of
AIN_VBAT to GPIOC,4 looks like a holdover from another
devices pinmap.

Create a new ADC channel, ADC_VOX_CH
assigned to the ADC matching the GPIO pin that
the VOX circuit is connected to.

Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
2026-04-11 19:38:21 +02:00
Joshua Murphy
3cd41d7f52 CS7000 Plus: add support for vibration motor
Signed-off-by: Joshua Murphy <hello@joshmurphy.ca>
2026-04-08 17:45:00 +02: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
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
f1486c9a41 CS7000 Plus: enabled GPS 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
6cdec19cb7 MD-UV3x0: using new STM32 GPS driver 2025-08-15 20:07:32 +02:00
Silvano Seva
5d50439312 MD3x0: 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
280d5ad350 Fixed compilation errors with GCC 15.1 2025-07-08 21:36:25 +02:00
Silvano Seva
0962b533c7 core: battery: added Li-Ion battery type, updated targets accordingly 2025-07-08 21:18:41 +02:00
Silvano Seva
71c144d426 core: battery: split configurations for battery chemistry and cells number 2025-07-05 14:05:49 +02:00
Silvano Seva
03d1ae5546 Updated year in copyright headers 2025-04-04 21:15:39 +02:00
fred
e469c856cc Initial BSP for Baofeng DM-1701 2025-04-02 19:28:22 +02:00
Silvano Seva
fb9dd20147 CS7000P: added radio driver 2025-03-26 19:58:14 +01:00
Silvano Seva
8625184030 CS7000P: enabled audio management system 2025-03-26 19:58:14 +01:00
Silvano Seva
891f18cac7 CS7000P: enabled NVM storage 2025-03-26 19:58:14 +01:00
Silvano Seva
894d7b8b57 Initial BSP for Connect Systems CS7000-PLUS 2025-03-26 19:58:14 +01:00
Silvano Seva
f5012e0f63 Drivers: ADC: added driver for STM32H7 devices 2025-03-20 20:35:23 +01:00
Silvano Seva
6ff868c7a4 Moved STM32F4xx ADC driver under platform/drivers/ADC 2025-03-16 17:44:26 +01:00
Silvano Seva
8f844c9f99 CS7000: radio: added detection of CTCSS tones 2025-03-16 10:13:00 +01:00
Silvano Seva
4244d85405 CS7000: use hardware SPI for HR_C6000 control interface 2025-03-16 10:13:00 +01:00
Silvano Seva
6513d5593a CS7000: driver for channel selector knob 2025-03-16 10:13:00 +01:00
Silvano Seva
cb338ceb3d CS7000: added GPS support 2025-03-16 10:13:00 +01:00
Silvano Seva
ebff73a95f CS7000: audio driver 2025-03-16 10:13:00 +01:00
Silvano Seva
68b001310e CS7000: radio driver 2025-03-16 10:13:00 +01:00
Silvano Seva
1f8a2092b3 CS7000: nonvolatile memory driver 2025-03-16 10:13:00 +01:00
Silvano Seva
d85287e692 CS7000: platform: added Vbat, mic and volume level measurement 2025-03-16 10:13:00 +01:00
Silvano Seva
4a76d67184 Build target for Connect Systems CS7000 2025-03-16 10:13:00 +01:00
marco
52d0c71323 MD9600: Enable Screen Backlight 2024-12-29 00:44:03 +01:00
Silvano Seva
e1572f8eb5 MD-9600: using STM32 ADC driver 2024-11-10 13:59:35 +01:00
Silvano Seva
10d7ded93f MD-UV3x0: using STM32 ADC driver 2024-11-10 13:59:35 +01:00
Silvano Seva
81c55b5377 MD-3x0: using STM32 ADC driver 2024-11-10 12:04:10 +01:00
Silvano Seva
3ff2d31a70 UV3x0: renamed PA_EN_1 and PA_EN_2 gpios to, respectively, TX_PA_EN and RF_APC_SW 2024-11-09 13:09:56 +01:00
Silvano Seva
3469feb065 MD-UV3x0: using HR_C6000 DAC for "beep" tones 2024-11-09 12:02:46 +01:00
Silvano Seva
2d0bf51873 MDUV3x0: using HR_C6000 for MCU to speaker audio 2024-10-12 12:24:05 +02:00
Silvano Seva
98978b907f GDx: updated radio driver 2024-10-09 22:02:51 +02:00
Silvano Seva
8f9502cade MDUV3x0: updated radio driver 2024-10-09 22:00:10 +02:00
Silvano Seva
0c4a0435a8 MD3x0: update radio driver 2024-10-09 22:00:10 +02:00