Repository Analysis

embassy-rs/embassy

Modern embedded framework, using Rust and async.

4.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of embassy-rs/embassy, a Rust project with 9,532 GitHub stars. SynthScan v2.0 examined 459,817 lines of code across 2444 source files, recording 1772 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 4.8 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

4.8
Adjusted Score
4.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.5K
Stars
Rust
Language
459.8K
Lines of Code
2.4K
Files
1.8K
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 2MEDIUM 155LOW 1614

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1772 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block1499 hits · 1470 pts
SeverityFileLineSnippetContext
LOWembassy-usb-driver/src/host.rs141pub trait UsbHostAllocator<'d>: Sized + Clone {COMMENT
LOWembassy-usb-driver/src/host.rs161}COMMENT
LOWembassy-usb-driver/src/host.rs181 /// Wait for a root-port attach/detach.COMMENT
LOWembassy-usb-driver/src/host.rs341 }COMMENT
LOWembassy-usb-driver/src/host.rs401 ///COMMENT
LOWembassy-usb-driver/src/lib.rs1#![no_std]COMMENT
LOWembassy-usb-driver/src/lib.rs41 /// Host to device (OUT)COMMENT
LOWembassy-usb-driver/src/lib.rs141/// Implement this to add support for a new hardware platform.COMMENT
LOWembassy-usb-driver/src/lib.rs161 /// * `interval_ms` - Polling interval parameter for interrupt endpoints.COMMENT
LOWembassy-usb-driver/src/lib.rs201/// This trait provides methods that act on the whole bus. It is kept owned byCOMMENT
LOWembassy-usb-driver/src/lib.rs221 /// If the endpoint is an OUT endpoint, it should be prepared to receive data again.COMMENT
LOWembassy-usb-driver/src/lib.rs241 ///COMMENT
LOWembassy-usb-driver/src/lib.rs281 }COMMENT
LOWembassy-usb-driver/src/lib.rs301/// (...processing...)COMMENT
LOWembassy-usb-driver/src/lib.rs321/// data_out(first=false, last=true)COMMENT
LOWembassy-usb-driver/src/lib.rs341/// ```not_rustCOMMENT
LOWembassy-usb-driver/src/lib.rs361 /// Read a single setup packet from the endpoint.COMMENT
LOWembassy-usb-driver/src/lib.rs481COMMENT
LOWembassy-stm32/src/jpeg.rs1//! JPEG hardware codec.COMMENT
LOWembassy-stm32/src/jpeg.rs261 }COMMENT
LOWembassy-stm32/src/cpu.rs1//! Multicore utilities.COMMENT
LOWembassy-stm32/src/csi.rs1//! CSI-2 Host controller.COMMENT
LOWembassy-stm32/src/csi.rs21//! The RM0486 §40.6 init sequence is applied in [`Csi::new`]:COMMENT
LOWembassy-stm32/src/csi.rs101/// CSI-2 Host error.COMMENT
LOWembassy-stm32/src/csi.rs121#[non_exhaustive]COMMENT
LOWembassy-stm32/src/lcd.rs21#[non_exhaustive]COMMENT
LOWembassy-stm32/src/lcd.rs61/// Your LCD datasheet should tell you what to use.COMMENT
LOWembassy-stm32/src/lcd.rs121/// A short pulse leads to lower power consumption, but displays with high internal resistanceCOMMENT
LOWembassy-stm32/src/lib.rs141// Limited to N6 for now — on H7 the metapac entry for JPEG has `rcc: None`COMMENT
LOWembassy-stm32/src/lib.rs221///COMMENT
LOWembassy-stm32/src/lib.rs241/// I2C2_3 => i2c::EventInterruptHandler<peripherals::I2C2>, i2c::ErrorInterruptHandler<peripherals::I2C2>,COMMENT
LOWembassy-stm32/src/lib.rs361/// `embassy-stm32` global configuration.COMMENT
LOWembassy-stm32/src/lib.rs381COMMENT
LOWembassy-stm32/src/lib.rs401 #[cfg(stm32wba)]COMMENT
LOWembassy-stm32/src/lib.rs421 #[cfg(stm32wba)]COMMENT
LOWembassy-stm32/src/lib.rs441 ///COMMENT
LOWembassy-stm32/src/lib.rs521COMMENT
LOWembassy-stm32/src/lib.rs541 #[repr(C)]COMMENT
LOWembassy-stm32/src/comp.rs21/// Power mode for the comparator.COMMENT
LOWembassy-stm32/src/comp.rs41 /// Low hysteresis.COMMENT
LOWembassy-stm32/src/comp.rs81COMMENT
LOWembassy-stm32/src/comp.rs101 #[cfg(any(comp_v1, comp_v2))]COMMENT
LOWembassy-stm32/src/comp.rs121 Blank2,COMMENT
LOWembassy-stm32/src/comp.rs141/// is within a voltage window defined by the two comparators' thresholds.COMMENT
LOWembassy-stm32/src/comp.rs801COMMENT
LOWembassy-stm32/src/opamp.rs101 w.set_vm_sel(vm_sel);COMMENT
LOWembassy-stm32/src/opamp.rs161 }COMMENT
LOWembassy-stm32/src/opamp.rs381 w.set_vm_sel(VmSel::from_bits(m_pin.channel()));COMMENT
LOWembassy-stm32/src/ucpd.rs1//! USB Type-C/USB Power Delivery Interface (UCPD)COMMENT
LOWembassy-stm32/src/executor.rs1//! STM32-specific `embassy-executor` platform.COMMENT
LOWembassy-stm32/src/executor.rs21//! let mut config = embassy_stm32::Config::default();COMMENT
LOWembassy-stm32/src/executor.rs81COMMENT
LOWembassy-stm32/src/executor.rs121 /// This function requires `&'static mut self`. This means you have to store theCOMMENT
LOWembassy-stm32/src/executor.rs161COMMENT
LOWembassy-stm32/src/executor.rs221 ///COMMENT
LOWembassy-stm32/src/i2s.rs41/// I2C standardCOMMENT
LOWembassy-stm32/src/i2s.rs201 /// Reset the ring buffer to its initial state.COMMENT
LOWembassy-stm32/src/i2s.rs681 // 2. Select the CKPOL bit to define the steady level for the communication clock. Set theCOMMENT
LOWembassy-stm32/src/i2s.rs821// Fs = i2s_clock / [(channel_length * 2) * ((2 * div) + odd)]` when master clock is disabledCOMMENT
LOWembassy-stm32/src/low_power.rs1//! Low-power support.COMMENT
1439 more matches not shown…
Decorative Section Separators138 hits · 472 pts
SeverityFileLineSnippetContext
MEDIUMembassy-stm32/src/dma/ringbuffer/tests/mod.rs216// ── read_latest tests ──────────────────────────────────────────────────COMMENT
MEDIUMembassy-executor/src/raw/trace.rs31//! ╔════▼════╗ (2) ┌─────────┐ (3) ┌─────────┐ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs33//! ╚═════════╝ └─────────┘ └─────────┘ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs38//! │ ┌──────┐ (5) │ │ ┌─────┐COMMENT
MEDIUMembassy-executor/src/raw/trace.rs39//! │ IDLE │◀────────────────┘ └─▶│ END │ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs40//! │ └──────┘ └─────┘COMMENT
MEDIUMembassy-executor/src/raw/trace.rs41//! ┌──────────────────────┐ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs43//! └──────────────────────┘COMMENT
MEDIUMembassy-executor/src/raw/trace.rs63//! ╔═══▼══╗ (2) ┌────────────┐ (3) ┌─────────┐ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs64//! │ ║ IDLE ║──────────▶│ SCHEDULING │──────▶│ POLLING │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs65//! ╚══════╝ └────────────┘ └─────────┘ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs68//! │ └──────────────┘ └────────────┘COMMENT
MEDIUMembassy-executor/src/raw/trace.rs69//! ┌──────────────────────────┐ │COMMENT
MEDIUMembassy-executor/src/raw/trace.rs71//! └──────────────────────────┘COMMENT
MEDIUMembassy-executor/src/raw/mod.rs79/// ┌────────────┐ ┌────────────────────────┐COMMENT
MEDIUMembassy-executor/src/raw/mod.rs82/// └─────┬──────┘ └──────▲─────────────────┘COMMENT
MEDIUMembassy-executor/src/raw/mod.rs84/// │ ┌────────────┘COMMENT
MEDIUMembassy-executor/src/raw/mod.rs86/// ┌─────▼────┴─────────┐COMMENT
MEDIUMembassy-executor/src/raw/mod.rs89/// └─────┬▲─────────────┘COMMENT
MEDIUMembassy-executor/src/raw/mod.rs92/// ┌─────▼┴─────┐COMMENT
MEDIUMembassy-executor/src/raw/mod.rs95/// └────────────┘COMMENT
MEDIUMembassy-usb-host/src/control.rs338// ── ControlPipeExt ─────────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid.rs30// ── Boot-protocol report structs ─────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs75// ── GIP USB interface identifiers ────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs83// ── GIP message types (MS-GIPUSB §2.2) ──────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs91// ── GIP flags ────────────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs102// ── Public types ─────────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs212// ── Descriptor discovery ─────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs282// ── Standard GIP parsing helpers ─────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs356// ── GipDevice trait ──────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs412// ── Xbox One S implementation ────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/gip.rs463// ── GipHost driver ───────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs26// ── Usage page constants ───────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs84// ── Input item flag constants ──────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs101// ── Parsed report field ────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs219// ── Parsed descriptor ─────────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs259 // ── Global items ──────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs289 // ── Local items ───────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs312 // ── Main: Input ───────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs396 // ── Main: Output / Feature — advance offsets, ignore ──────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs402 // ── Main: Collection / End Collection ─────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs478// ── Internal parsing state ────────────────────────────────────────────────────COMMENT
MEDIUMembassy-usb-host/src/class/hid_report.rs528// ── HID descriptor item iterator ──────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba/src/bin/saes_ecb.rs46 // ─── AES-128-ECB round-trip + NIST sanity check ──────────────────────────COMMENT
MEDIUMexamples/stm32wba/src/bin/saes_ecb.rs94 // ─── AES-256-ECB round-trip (device-specific ciphertext) ─────────────────COMMENT
MEDIUMexamples/stm32wba/src/bin/saes_gcm.rs39 // ─── GCM round-trip: no AAD, 16-byte plaintext ───────────────────────────COMMENT
MEDIUMexamples/stm32wba/src/bin/saes_gcm.rs95 // ─── GCM round-trip: larger plaintext, no AAD ────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs60// ── GATT UUIDs (Bluetooth SIG assigned) ──────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs127 // ── Build GATT server ────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs196 // ── Advertising ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs215 // ── Main loop: send HR notifications every 1 s ───────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs221 // ── GAP events ────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs246 // ── GATT events ───────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_heart_rate.rs277 // ── 1-second tick: update and send HRM notification ───────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs131 // ── Security ──────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs173 // ── GATT ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs199 // ── Advertising ───────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs219 // ── Event loop ────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs256 // ── Numeric comparison (LE SC path — the normal iOS path) ───────COMMENT
MEDIUMexamples/stm32wba6/src/bin/ble_bonding.rs271 // ── Pairing result ──────────────────────────────────────────────COMMENT
78 more matches not shown…
Verbosity Indicators54 hits · 95 pts
SeverityFileLineSnippetContext
LOWembassy-stm32/src/rcc/u5.rs321 // If both MSIS and MSIK are enabled, we need to check if they are using the same internal source.COMMENT
LOWembassy-stm32/src/rcc/u3.rs342 // If both MSIS and MSIK are enabled, we need to check if they are using the same internal source.COMMENT
LOWembassy-stm32/src/aes/mod.rs397 // Step 2: Set MODE to key derivation (MODE[1:0] = 0x1)COMMENT
LOWembassy-stm32/src/aes/mod.rs399 // Step 5: Enable AES - peripheral starts key preparationCOMMENT
LOWembassy-stm32/src/aes/mod.rs401 // Step 6: Wait for CCF flagCOMMENT
LOWembassy-stm32/src/aes/mod.rs403 // Step 7: Clear CCF flag - AES disables automaticallyCOMMENT
LOWembassy-stm32/src/aes/mod.rs454 // Step 2: Set MODE to key derivation (MODE[1:0] = 0x1)COMMENT
LOWembassy-stm32/src/aes/mod.rs456 // Step 5: Enable AES - peripheral starts key preparationCOMMENT
LOWembassy-stm32/src/aes/mod.rs458 // Step 6: Wait for CCF flagCOMMENT
LOWembassy-stm32/src/aes/mod.rs460 // Step 7: Clear CCF flag - AES disables automaticallyCOMMENT
LOWembassy-stm32/src/aes/mod.rs979 // Step 8: Select cipher mode and decryption mode (keep other params)COMMENT
LOWembassy-stm32/src/aes/mod.rs984 // Step 9: Write IV (for CBC decryption, AFTER key preparation)COMMENT
LOWembassy-usb/src/class/uac1/source.rs547 // We need to check if the request is for our feedback endpoint and return the appropriate data.COMMENT
LOWembassy-usb-host/src/lib.rs369 // Step 4: Get configuration descriptor header (9 bytes).COMMENT
LOWembassy-usb-host/src/lib.rs402 // Step 5: SET_CONFIGURATION.COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs130 // Step 1: Compute Montgomery parameter R² mod nCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs152 // Step 2: Verify n = p * q using arithmetic multiplicationCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs178 // Step 3: Validate that d < n (private exponent must be less than modulus)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs196 // Step 4: Test encryption/decryption to verify key pairCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs234 // Step 5: Demonstrate modular inverse (useful for computing d from e)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs255 // Step 6: Demonstrate modular reductionCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs180 // Step 1: Encrypt with public key (standard RSA encryption)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs197 // Step 2: Decrypt using standard RSA (for comparison)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs216 // Step 3: Decrypt using RSA-CRT (faster!)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs255 // Step 4: Verify both methods produce the same resultCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs264 // Step 5: Multiple decryption demonstrationCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs111 // Step 1: Compute Montgomery parameter for the modulusCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs127 // Step 2: Encrypt using public key (n, e)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs146 // Step 3: Decrypt using private key dCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs172 // Step 4: Demonstrate fast decryption with pre-computed Montgomery parameterCOMMENT
LOWexamples/boot/application/nrf/src/bin/a.rs48 // The following code block illustrates how to obtain a watchdog that is configuredCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs110 // Step 1: Compute Montgomery parameter R² mod nCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs132 // Step 2: Verify n = p * q using arithmetic multiplicationCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs158 // Step 3: Validate that d < n (private exponent must be less than modulus)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs176 // Step 4: Test encryption/decryption to verify key pairCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs214 // Step 5: Demonstrate modular inverse (useful for computing d from e)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs235 // Step 6: Demonstrate modular reductionCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs160 // Step 1: Encrypt with public key (standard RSA encryption)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs177 // Step 2: Decrypt using standard RSA (for comparison)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs196 // Step 3: Decrypt using RSA-CRT (faster!)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs235 // Step 4: Verify both methods produce the same resultCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs244 // Step 5: Multiple decryption demonstrationCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs91 // Step 1: Compute Montgomery parameter for the modulusCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs107 // Step 2: Encrypt using public key (n, e)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs126 // Step 3: Decrypt using private key dCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs152 // Step 4: Demonstrate fast decryption with pre-computed Montgomery parameterCOMMENT
LOWembassy-mcxa/src/executor.rs142 // Next, we need to check if any high-power peripherals exist that shouldCOMMENT
LOWembassy-mcxa/src/i3c/controller.rs1569 // Step 2: Pre-clear IBIWON in case it was already set, so AUTO_IBI doesn't return early.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1572 // Step 3: Issue AUTO_IBI with ACK — hardware handles the IBI protocol handshake.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1578 // Step 4: Wait for IBIWON — the IBI has been accepted and the address header received.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1640 // Step 6: Wait for COMPLETE (marks end of IBI reception, state transitions to NORMACT).COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1645 // Step 7: Clear status flags and emit a STOP to terminate the IBICOMMENT
LOWembassy-mcxa/src/i3c/controller.rs1544 // Step 1: Wait for SLVSTART (a target is asserting SDA low to request the bus).COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1598 // Step 5: For normal IBIs (not Hot-Join or Controller-Request), drain the RX FIFO payload.COMMENT
Structural Annotation Overuse50 hits · 89 pts
SeverityFileLineSnippetContext
LOWembassy-stm32/src/aes/mod.rs397 // Step 2: Set MODE to key derivation (MODE[1:0] = 0x1)COMMENT
LOWembassy-stm32/src/aes/mod.rs399 // Step 5: Enable AES - peripheral starts key preparationCOMMENT
LOWembassy-stm32/src/aes/mod.rs401 // Step 6: Wait for CCF flagCOMMENT
LOWembassy-stm32/src/aes/mod.rs403 // Step 7: Clear CCF flag - AES disables automaticallyCOMMENT
LOWembassy-stm32/src/aes/mod.rs454 // Step 2: Set MODE to key derivation (MODE[1:0] = 0x1)COMMENT
LOWembassy-stm32/src/aes/mod.rs456 // Step 5: Enable AES - peripheral starts key preparationCOMMENT
LOWembassy-stm32/src/aes/mod.rs458 // Step 6: Wait for CCF flagCOMMENT
LOWembassy-stm32/src/aes/mod.rs460 // Step 7: Clear CCF flag - AES disables automaticallyCOMMENT
LOWembassy-stm32/src/aes/mod.rs979 // Step 8: Select cipher mode and decryption mode (keep other params)COMMENT
LOWembassy-stm32/src/aes/mod.rs984 // Step 9: Write IV (for CBC decryption, AFTER key preparation)COMMENT
LOWembassy-usb-host/src/lib.rs369 // Step 4: Get configuration descriptor header (9 bytes).COMMENT
LOWembassy-usb-host/src/lib.rs402 // Step 5: SET_CONFIGURATION.COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs130 // Step 1: Compute Montgomery parameter R² mod nCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs152 // Step 2: Verify n = p * q using arithmetic multiplicationCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs178 // Step 3: Validate that d < n (private exponent must be less than modulus)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs196 // Step 4: Test encryption/decryption to verify key pairCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs234 // Step 5: Demonstrate modular inverse (useful for computing d from e)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_keygen.rs255 // Step 6: Demonstrate modular reductionCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs180 // Step 1: Encrypt with public key (standard RSA encryption)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs197 // Step 2: Decrypt using standard RSA (for comparison)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs216 // Step 3: Decrypt using RSA-CRT (faster!)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs255 // Step 4: Verify both methods produce the same resultCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa_crt.rs264 // Step 5: Multiple decryption demonstrationCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs111 // Step 1: Compute Montgomery parameter for the modulusCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs127 // Step 2: Encrypt using public key (n, e)COMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs146 // Step 3: Decrypt using private key dCOMMENT
LOWexamples/stm32wba/src/bin/pka_rsa.rs172 // Step 4: Demonstrate fast decryption with pre-computed Montgomery parameterCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs110 // Step 1: Compute Montgomery parameter R² mod nCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs132 // Step 2: Verify n = p * q using arithmetic multiplicationCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs158 // Step 3: Validate that d < n (private exponent must be less than modulus)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs176 // Step 4: Test encryption/decryption to verify key pairCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs214 // Step 5: Demonstrate modular inverse (useful for computing d from e)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_keygen.rs235 // Step 6: Demonstrate modular reductionCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs160 // Step 1: Encrypt with public key (standard RSA encryption)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs177 // Step 2: Decrypt using standard RSA (for comparison)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs196 // Step 3: Decrypt using RSA-CRT (faster!)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs235 // Step 4: Verify both methods produce the same resultCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa_crt.rs244 // Step 5: Multiple decryption demonstrationCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs91 // Step 1: Compute Montgomery parameter for the modulusCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs107 // Step 2: Encrypt using public key (n, e)COMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs126 // Step 3: Decrypt using private key dCOMMENT
LOWexamples/stm32wba6/src/bin/pka_rsa.rs152 // Step 4: Demonstrate fast decryption with pre-computed Montgomery parameterCOMMENT
LOWembassy-mcxa/Cargo.toml106# WARNING: This WILL cause problems if you plan to use defmt over RTT,COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1569 // Step 2: Pre-clear IBIWON in case it was already set, so AUTO_IBI doesn't return early.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1572 // Step 3: Issue AUTO_IBI with ACK — hardware handles the IBI protocol handshake.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1578 // Step 4: Wait for IBIWON — the IBI has been accepted and the address header received.COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1640 // Step 6: Wait for COMPLETE (marks end of IBI reception, state transitions to NORMACT).COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1645 // Step 7: Clear status flags and emit a STOP to terminate the IBICOMMENT
LOWembassy-mcxa/src/i3c/controller.rs1544 // Step 1: Wait for SLVSTART (a target is asserting SDA low to request the bus).COMMENT
LOWembassy-mcxa/src/i3c/controller.rs1598 // Step 5: For normal IBIs (not Hot-Join or Controller-Request), drain the RX FIFO payload.COMMENT
AI Slop Vocabulary7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMembassy-rp/src/bootsel.rs6//! to utilize outside of the rom's bootloader.COMMENT
MEDIUMembassy-rp/src/rom_data/rp2040.rs154 // can still utilize the cache, but we have to make sure it hasCOMMENT
MEDIUMembassy-sync/src/rpc_service.rs39// Fundamentally, we need some shared memory between the caller and the runnerCOMMENT
MEDIUMexamples/std/src/bin/serial.rs23 // Essentially, async_io::Async converts from AsRawFd+Read+Write to futures's AsyncRead+AsyncWriteCOMMENT
MEDIUMembassy-stm32-wpan/src/net/commands.rs296/// MLME DPS Request allows the next higher layer to request that the PHY utilize aCOMMENT
MEDIUMembassy-stm32-wpan/src/net/commands.rs305 /// the number of symbols for which the transmitter and receiver will utilize theCOMMENT
MEDIUMembassy-mcxa/src/lpuart/bbq.rs53 /// Default mode, attempts to utilize the ring buffer as maximally as possible.COMMENT
Slop Phrases4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMembassy-rp/Cargo.toml114## Have embassy-rp not provide the boot2 so you can use your own.COMMENT
MEDIUMembassy-rp/Cargo.toml135## Have embassy-rp not provide the Image Definition so you can use your own.COMMENT
MEDIUMexamples/stm32wba/src/bin/pka_rsa.rs17//! This example uses a small 512-bit key for demonstration purposes.COMMENT
MEDIUMexamples/stm32wba6/src/bin/pka_rsa.rs17//! This example uses a small 512-bit key for demonstration purposes.COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALembassy-usb-synopsys-otg/src/host.rs709 let speed_code = self.instance.state.fields.port_speed.load(Ordering::Acquire);CODE
TODO Padding6 hits · 9 pts
SeverityFileLineSnippetContext
LOWembassy-stm32/src/hspi/mod.rs899 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.COMMENT
LOWembassy-stm32/src/usb/usb.rs584 // TODO: implement VBUS detection.COMMENT
LOWembassy-stm32/src/xspi/mod.rs1845 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.COMMENT
LOWembassy-stm32/src/ospi/mod.rs1913 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.COMMENT
LOWembassy-stm32/src/ospi/mod.rs1988 // TODO: implement this using a LinkedList DMA to offload the whole transfer off the CPU.COMMENT
LOWembassy-rp/src/usb/device.rs352 // TODO: implement VBUS detection.COMMENT
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMembassy-time/Cargo.toml59## Create a time driver for `std` environments.COMMENT
MEDIUMembassy-time/Cargo.toml61## Create a time driver for WASM.COMMENT
MEDIUMembassy-hal-internal/Cargo.toml19# Define the number of NVIC priority bits.COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHembassy-stm32-wpan/src/wb/mod.rs87 // this is an inlined version of TL_Init from the STM32WB firmware as requested by AN5289.COMMENT
Excessive Try-Catch Wrapping4 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMexamples/stm32wba6/convert_wav.py26 print("Error: only 16-bit WAV files are supported")CODE
LOWexamples/stm32wba6/convert_wav.py52 except Exception as exc:CODE
MEDIUMexamples/stm32wba6/convert_wav.py53 print(f"Error: {exc}")CODE
MEDIUMexamples/stm32wba6/convert_wav.py66 print(f"Error: input file '{input_file}' not found")CODE
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWembassy-rp/src/trng.rs129/// Usage example:COMMENT
LOWembassy-mspm0/src/trng.rs148/// Usage example:COMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHexamples/stm32wba6/verify_rpa.py15 hash = ah(IRK, prand) = AES-128(IRK, 0..0 || prand)[13..16] (lower 3 bytes)STRING
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWembassy-executor/gen_config.py10CODE
LOWexamples/stm32wba6/convert_wav.py9CODE