some refactoring and clippies
Build and Release Firmware / build-and-release (push) Failing after 48s
Build and Release Firmware / build-and-release (push) Failing after 48s
This commit is contained in:
1 parent
bb7f701f20
commit
e255636f3a
8 files changed
+119
-102
No files matched your search
+2
-9
@@ -9,13 +9,14 @@ use num_enum::TryFromPrimitive;
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Copy, Debug, NoUninit, Eq, PartialEq, TryFromPrimitive)]
|
||||
#[derive(Clone, Copy, Debug, Default, NoUninit, Eq, PartialEq, TryFromPrimitive)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[repr(u8)]
|
||||
pub enum AudioState {
|
||||
/// Knowingly stopped, ie. AltSetting=0. DAC muted, I2S disabled.
|
||||
///
|
||||
/// AltSetting = 1 -> ARMED
|
||||
#[default]
|
||||
Stopped = 0,
|
||||
/// Waiting for data. DAC muted, I2S running sending 0s (FIFO not serviced).
|
||||
///
|
||||
@@ -52,11 +53,6 @@ pub enum AudioState {
|
||||
Stopping = 6,
|
||||
}
|
||||
|
||||
impl Default for AudioState {
|
||||
fn default() -> Self {
|
||||
AudioState::Stopped
|
||||
}
|
||||
}
|
||||
impl defmt::Format for AudioState {
|
||||
fn format(&self, fmt: defmt::Formatter) {
|
||||
defmt::write!(
|
||||
@@ -125,9 +121,6 @@ pub mod hid {
|
||||
use deku::{DekuContainerWrite, DekuWrite};
|
||||
use usbd_hid::descriptor::generator_prelude::*;
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{AudioDeviceCommand, AudioState, AudioTelemetrySnapshot};
|
||||
|
||||
/// HID usage IDs identifying each vendor interface. `gen_hid_descriptor` only accepts
|
||||
|
||||
Reference in new issue
Block a user