Crate ql_oe_sys

Crate ql_oe_sys 

Expand description

Low-level Rust bindings for the QuecOpen SDK.

This crate is modelled after the headers found in <sdk root>/ql-ol-extsdk/include. Specifically, ql_oe.h, which represents the main entry point. Unless otherwise stated, every module corresponds to a header file in the SDK.

In the rare cases where documentation is present in the headers, it is copied here. The documentation heavily modified though to add additional notes and correct errors.

The crate is hand-written and not generated from the headers. This is partly because the headers are not very consistent, but also because integrating bindgen is quite tricky in this case.

§Function Stubs

If this crate is compiled for non-AG35 targets, all the external functions are replaced with stubs that panic when called.

§Features

The SDK implementation is provided by the `ql_common_api shared library.

  • logging - Enables logging via the log crate by replacing the C functions internally used by the SDK with Rust implementations. This feature requires nightly Rust due to the use of c_variadic.
  • serde - Enables serde support for certain data structures.

§Missing Features

  • ADC support from ql_adc.h: Use the ql-adc crate instead.
  • GPIO support from ql_gpio.h: The GPIO uses the legacy sysfs GPIO interface. Use the ql-gpio, which also supports setting pull-up and pull-down resistors. Alternatively, use the standard Linux GPIO interface via the sysfs_gpio crate.
  • UART support from ql_uart.h: Use the serialport crate. Quectel’s UART library offers no additional features over standard POSIX serial port APIs.
  • LPM Driver support from ql_lpm.h: Use the Rust implementation from the ql-lpm crate instead.

Modules§

dev
See: <ql_dev.h>
error
Error code defines.
logging 🔒 logging
Log capture for libraries used by the Quectel SDK.
macros 🔒
mcm
Contains the ql_mcm_*.h headers.
nand
NAND.
nw
See: <ql_nw.h>
powerdown
See: <ql_powerdown.h>
simDeprecated
SIM.
sleep_wakelock
See: <ql_sleep_wakelock.h>
timer
Timer.
wifi
WiFi public function declarations.
wwan
Quectel WWAN data call lib public function declarations.