Expand description
§a121-sys Crate Documentation
Welcome to the a121-sys crate, the direct line to the Acconeer A121 radar sensor from your Rust applications.
This crate provides the raw FFI bindings needed to harness the power of the A121 sensor, enabling you to build advanced radar sensing capabilities into your projects.
§Quickstart
Add a121-sys to your Cargo.toml:
[dependencies]
a121-sys = { version = "0.1", features = ["distance", "presence"] }
§Features
- Distance Measurement: Activate the
distancefeature to measure distances with high precision. - Presence Detection: Use the
presencefeature to detect objects or people in specific areas.
Enable these features as needed to keep your compile times short and your binary size small.
§Logging with the C Log Wrapper
For those needing to integrate with the sensor’s native logging, a121-sys offers a way to hook into the C library’s logging mechanism. By defining a rust_log function in your Rust code, you can capture log messages from the sensor:
use core::ffi::c_char;
#[no_mangle]
pub extern "C" fn rust_log(level: u32, message: *const c_char) {
// Your logging implementation here
}Structs§
- @brief Information about calibration.
- @brief The result from a completed calibration.
- @defgroup config Config @ingroup service
- @brief This struct contains function pointers that are optional to support different optimizations
- @brief Data type for interger-based representation of complex numbers
- @brief Generic processing handle
- @brief Metadata that will be populated by the processing module during creation
- @brief Result provided by the processing module
- @brief The acc_rss_assembly_test instance
- @brief The result struct of acc_rss_assembly_test
- @defgroup service Service
Constants§
- The deepest state where as much of the sensor hardware is shut down.
- The shallowest state where most of the sensor hardware is kept on.
- The deepest state where as much of the sensor hardware is shut down.
- 5.2 MHz
- 6.5 MHz
- 8.7 MHz
- 13.0 MHz
- 15.6 MHz
- 19.5 MHz
- The profile with the highest depth resolution and lowest radar loop gain.
- The profile with the highest depth resolution and lowest radar loop gain.
- The profile with the highest depth resolution and lowest radar loop gain.
- The profile with the highest depth resolution and lowest radar loop gain.
- The profile with the lowest depth resolution and highest radar loop gain.
- DEBUG log level.
- ERROR log level.
- INFO log level.
- VERBOSE log level.
- WARNING log level.
- Test SPI basic read functionality.
- Test clock and supply stability.
- Test SPI communication.
- Test enable pin.
- Test interrupt pin.
- Test sensor calibration.
- The test status is OK
- The test has timed out
- The test is complete
- The test is ongoing, the application should call test function again
- The application should toggle enable pin and then call test function again
- The application should wait for interrupt and then call test function again
Functions§
- a64l⚠
- abs⚠
- @brief Calculate CRC32 checksum on byte array
- @brief Get continuous sweep mode
- @brief Set continuous sweep mode
- @brief Create a configuration
- @brief Destroy a configuration freeing any resources allocated
- @brief Get the double buffering configuration
- @brief Enable or disable double buffering
- @brief Get the enable loopback configuration
- @brief Enable or disable loopback
- @brief Get transmitter enable configuration
- @brief Enable or disable the transmitter
- @brief Get the frame rate
- @brief Set the frame rate
- @brief Get the hardware accelerated average samples (HWAAS)
- @brief Set the hardware accelerated average samples (HWAAS)
- @brief Get inter frame idle state
- @brief Set inter frame idle state
- @brief Get inter sweep idle state
- @brief Set inter sweep idle state
- @brief Print a configuration to the log
- @brief Get the number of data points to measure
- @brief Set the number of data points to measure
- @brief Get the number of subsweeps to use
- @brief Set the number of subsweeps to use
- @brief Get the phase enhancement configuration
- @brief Enable or disable phase enhancement
- @brief Get Pulse Repetition Frequency
- @brief Set Pulse Repetition Frequency
- @brief Get the currently used profile
- @brief Set a profile
- @brief Get receiver gain setting
- @brief Set receiver gain setting
- @brief Get the starting point of the sweep
- @brief Set the starting point of the sweep
- @brief Get the step length in a sweep
- @brief Set the step length in a sweep
- @brief Get the enable loopback configuration
- @brief Set the loopback enabled configuration
- @brief Get transmitter enable mode
- @brief Enable or disable the transmitter
- @brief Get the hardware accelerated average samples (HWAAS)
- @brief Set the hardware accelerated average samples (HWAAS)
- @brief Get the number of data points to measure
- @brief Set the number of data points to measure
- @brief Get the phase enhancement enabled configuration
- @brief Set the phase enhancement enabled configuration
- @brief Get Pulse Repetition Frequency
- @brief Set Pulse Repetition Frequency
- @brief Get the currently used profile
- @brief Set a profile
- @brief Get receiver gain setting
- @brief Set receiver gain setting
- @brief Get the starting point of the sweep
- @brief Set the starting point of the sweep
- @brief Get the step length in a sweep
- @brief Set the step length in a sweep
- @brief Get the sweep rate
- @brief Set the sweep rate
- @brief Get the number of sweeps per frame
- @brief Set sweeps per frame
- @brief Create a processing instance with the provided configuration
- @brief Destroy a processing instance identified with the provided processing handle
- @brief Process the data according to the configuration used in create
- @brief Convert a distance or step length in meter to points
- @brief Convert a distance or step length in points to meter
- @brief Create a sensor assembly test instance
- @brief Destroy a sensor assembly test instance freeing any resources allocated.
- @brief Disable a test in assembly test
- @brief Disable all assembly tests
- @brief Enable a test in assembly test
- @brief Enable all assembly tests
- @brief Enable disagnostic logs for the assembly test,
- @brief Execute the assembly test
- @brief A function to get the results from the sensor assembly test
- @brief Get the buffer size needed for the specified config
- @brief Register an integration
- @brief Set the log level that determines when the integration HAL logger function is called
- @brief Calibrate a sensor
- @brief Check if a sensor is connected and responsive
- @brief Create a sensor instance
- @brief Destroy a sensor instance freeing any resources allocated.
- @brief Gets calibration information from a calibration result
- @brief Restore sensor after exiting hibernation
- @brief Prepare sensor for entering hibernation
- @brief Start a radar measurement with previously prepared configuration
- @brief Prepare a sensor to do a measurement
- @brief Read out radar data
- @brief Check the status of the sensor
- @brief Validate calibration result
- @brief Get the version of the Acconeer software
- @brief Get the version of the Acconeer software as a hex number
- atof⚠
- atoi⚠
- atol⚠
- div⚠
- ecvt⚠
- exit⚠
- fcvt⚠
- free⚠
- gcvt⚠
- l64a⚠
- labs⚠
- ldiv⚠
- rand⚠
Type Aliases§
- @brief Idle state
- @brief Pulse Repetition Frequency
- @brief Profile
- @brief Definition of a log function
- @brief Definition of a memory allocation function
- @brief Definition of a memory free function
- @brief Definition of a sensor transfer function
- @brief Definition of an optimized 16-bit sensor transfer function
- @brief This enum represents the different log levels for RSS
- @brief Test identity enum for acc_rss_assembly_test
- @brief Integration status for rss tests
- @brief Return code for rss tests
- @brief Type representing a sensor ID