mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
This commit overhauls the CC1101 RF driver to address physical hardware constraints, prevent register wrap-around overflows, and support accurate dBm power scaling via the standard IOCTL interface. What this change does: 1. Adds WLIOC_MSK and WLIOC_4FSK modulation support in `ioctl.h` and driver. 2. Replaces static PATABLE initialization with a dynamic Ramp-up curve generator `cc1101_ioctl_apply_power()` based on lab calibration data. 3. Modifies WLIOC_SETTXPOWER and WLIOC_GETTXPOWER to process actual dBm values with a nearest-match algorithm instead of raw array indices. 4. Removes DEBUGASSERT on user-space IOCTL pointers and replaces them with strict -EFAULT checks. 5. Implements saturation clamping (e.g., mantissa to 256-511) to prevent bitrate and frequency deviation calculation overflows. 6. Rebuilds volatile PATABLE memory upon SLEEP mode wake-up. Why it is necessary & what it fixes: - Fixes severe OOK modulation distortion and FSK spectral splatter caused by statically assigned PATABLE indices. - Fixes potential kernel panic in flat builds when IOCTL receives a NULL pointer from user space. - Fixes register wrap-around (silent failures) when users pass out-of-bounds baud rate or FDEV values. - Prevents RF silence after SLEEP mode due to PATABLE volatility. - Resolves inaccurate power output when changing frequencies dynamically. Impact: Changes the behavior of CC1101 TX power and modulation IOCTLs to strictly comply with standard `wlioc` definitions. Improves overall driver stability and hardware safety. Signed-off-by: Chip L. <chplee@gmail.com> |
||
|---|---|---|
| .. | ||
| android | ||
| arpa | ||
| crypto | ||
| cxx | ||
| net | ||
| netinet | ||
| netpacket | ||
| nuttx | ||
| ssp | ||
| sys | ||
| .gitignore | ||
| aio.h | ||
| alloca.h | ||
| assert.h | ||
| byteswap.h | ||
| ctype.h | ||
| debug.h | ||
| dirent.h | ||
| dlfcn.h | ||
| dsp.h | ||
| dspb16.h | ||
| elf.h | ||
| elf32.h | ||
| elf64.h | ||
| endian.h | ||
| err.h | ||
| errno.h | ||
| execinfo.h | ||
| fcntl.h | ||
| fixedmath.h | ||
| fnmatch.h | ||
| ftw.h | ||
| gcov.h | ||
| getopt.h | ||
| glob.h | ||
| grp.h | ||
| hex2bin.h | ||
| iconv.h | ||
| ifaddrs.h | ||
| imx_container.h | ||
| inttypes.h | ||
| iso646.h | ||
| langinfo.h | ||
| libgen.h | ||
| libintl.h | ||
| limits.h | ||
| locale.h | ||
| lzf.h | ||
| malloc.h | ||
| mqueue.h | ||
| netdb.h | ||
| nl_types.h | ||
| nxflat.h | ||
| obstack.h | ||
| poll.h | ||
| pthread.h | ||
| pty.h | ||
| pwd.h | ||
| regex.h | ||
| resolv.h | ||
| sched.h | ||
| search.h | ||
| semaphore.h | ||
| shadow.h | ||
| signal.h | ||
| spawn.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| strings.h | ||
| syscall.h | ||
| syslog.h | ||
| termios.h | ||
| threads.h | ||
| time.h | ||
| ulimit.h | ||
| unistd.h | ||
| utime.h | ||
| uuid.h | ||
| wait.h | ||
| wchar.h | ||
| wctype.h | ||