Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sx126x_driver

> 编程语言
Open source

Driver for SX126x radio

181 stars0 likes1 views
WebsiteGitHub

About

Driver for SX126x radio

SX126X driver

This package proposes an implementation in C of the driver for SX126X radio component. Please see the changelog for more information.

Structure

The driver is defined as follows:

  • sx126x.c: implementation of the driver functions
  • sx126x.h: declarations of the driver functions
  • sx126x_regs.h: definitions of all useful registers (address and fields)
  • sx126x_hal.h: declarations of the HAL functions (to be implemented by the user - see below)
  • lr_fhss_mac.c: Transceiver-independent LR-FHSS implementation
  • sx126x_lr_fhss.c: Transceiver-dependent LR-FHSS implementation
  • lr_fhss_mac.h: Transceiver-independent LR-FHSS declarations
  • sx126x_lr_fhss.h: Transceiver-dependent LR-FHSS declarations
  • lr_fhss_v1_base_types.h: LR-FHSS type interface
  • sx126x_bpsk.c: implementation of BPSK driver functions
  • sx126x_bpsk.h: declaration of BPSK driver functions

HAL

The HAL (Hardware Abstraction Layer) is a collection of functions the user shall implement to write platform-dependant calls to the host. The list of functions is the following:

  • sx126x_hal_reset
  • sx126x_hal_wakeup
  • sx126x_hal_write
  • sx126x_hal_read

Cmake usage

This driver exposes a cmake configuration allowing to integrate the driver in a cmake ready application.

Integration

If the driver code resides in a directory of the application using it, it can be integrated by adding the subdirectory to the configuration as follows:

cmake
add_subdirectory(sx126x_driver) # where sx126x_driver is the name of the folder containing the driver code

Alternatively, if the driver code is available through a code archive, it can be included directly by

cmake
include(FetchContent)
FetchContent_Declare(
    sx126x_driver
    URL "path_to_archive" # Where path_to_archive is to be replaced by the path to the archive driver
)
FetchContent_MakeAvailable(sx126x_driver)

Configuration

By default, LR-FHSS and BPSK are not included in the build of the driver. It can be added by adding the following line in the before including the driver code in the cmake suite:

cmake
set(SX126X_ENABLE_BPSK ON CACHE BOOL "") # To enable BPSK
set(SX126X_ENABLE_LR_FHSS ON CACHE BOOL "") # To enable LR-FHSS

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ccdriverfsklora

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言