diff options
| author | goodhoko <[email protected]> | 2025-12-02 17:04:50 +0100 |
|---|---|---|
| committer | goodhoko <[email protected]> | 2025-12-02 17:16:49 +0100 |
| commit | 907e8065b2fe0a18295d7470fb3bee34a4833b01 (patch) | |
| tree | 18c072d5aae5a6d52e943096cbbed5b37cc45ff4 /embassy-usb/src | |
| parent | 7d8168b9cc35bfa28105cf629631bb72d507afc7 (diff) | |
Expose dtr() and rts() on cdc_acm::ControlChanged
What purpose that sturct has otherwise?
Diffstat (limited to 'embassy-usb/src')
| -rw-r--r-- | embassy-usb/src/class/cdc_acm.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy-usb/src/class/cdc_acm.rs b/embassy-usb/src/class/cdc_acm.rs index c990b679e..ab2311f4e 100644 --- a/embassy-usb/src/class/cdc_acm.rs +++ b/embassy-usb/src/class/cdc_acm.rs | |||
| @@ -366,6 +366,16 @@ impl<'d> ControlChanged<'d> { | |||
| 366 | pub async fn control_changed(&self) { | 366 | pub async fn control_changed(&self) { |
| 367 | self.control.changed().await; | 367 | self.control.changed().await; |
| 368 | } | 368 | } |
| 369 | |||
| 370 | /// Gets the DTR (data terminal ready) state | ||
| 371 | pub fn dtr(&self) -> bool { | ||
| 372 | self.control.dtr.load(Ordering::Relaxed) | ||
| 373 | } | ||
| 374 | |||
| 375 | /// Gets the RTS (request to send) state | ||
| 376 | pub fn rts(&self) -> bool { | ||
| 377 | self.control.rts.load(Ordering::Relaxed) | ||
| 378 | } | ||
| 369 | } | 379 | } |
| 370 | 380 | ||
| 371 | /// CDC ACM class packet sender. | 381 | /// CDC ACM class packet sender. |
