Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ embedded-hal = "1.0"
embedded-hal-async = "1.0"
embedded-services = { path = "./embedded-service" }
embedded-storage-async = "0.4.1"
embedded-usb-pd = { git = "https://github.com/OpenDevicePartnership/embedded-usb-pd", tag = "v0.1.0" , default-features = false }
embedded-usb-pd = { git = "https://github.com/OpenDevicePartnership/embedded-usb-pd", tag = "v0.1.0", default-features = false }
mctp-rs = { git = "https://github.com/OpenDevicePartnership/mctp-rs", tag = "v0.1.0" }
num_enum = { version = "0.7.5", default-features = false }
portable-atomic = { version = "1.11", default-features = false }
power-policy-service = { path = "./power-policy-service" }
heapless = "0.9.2"
log = "0.4"
proc-macro2 = "1.0"
Expand Down
14 changes: 7 additions & 7 deletions embedded-service/src/type_c/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{GlobalRawMutex, IntrusiveNode, broadcaster::immediate as broadcaster
pub const MAX_NUM_DATA_OBJECTS: usize = 7; // 7 VDOs of 4 bytes each

/// Port status
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PortStatus {
/// Current available source contract
Expand Down Expand Up @@ -144,7 +144,7 @@ pub struct DpPinConfig {
}

/// DisplayPort status data
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct DpStatus {
/// DP alt-mode entered
Expand All @@ -154,7 +154,7 @@ pub struct DpStatus {
}

/// DisplayPort configuration data
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct DpConfig {
/// DP alt-mode enabled
Expand Down Expand Up @@ -214,7 +214,7 @@ impl Default for SendVdm {

/// USB control configuration
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct UsbControlConfig {
/// Enable USB2 data path
pub usb2_enabled: bool,
Expand All @@ -236,15 +236,15 @@ impl Default for UsbControlConfig {

/// Thunderbolt control configuration
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Debug, Clone, Default, Copy, PartialEq)]
#[derive(Debug, Clone, Default, Copy, PartialEq, Eq)]
pub struct TbtConfig {
/// Enable Thunderbolt
pub tbt_enabled: bool,
}

/// PD state-machine configuration
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Debug, Clone, Default, Copy, PartialEq)]
#[derive(Debug, Clone, Default, Copy, PartialEq, Eq)]
pub struct PdStateMachineConfig {
/// Enable or disable the PD state-machine
pub enabled: bool,
Expand Down Expand Up @@ -523,7 +523,7 @@ pub enum Response<'a> {
}

/// Controller status
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ControllerStatus<'a> {
/// Current controller mode
Expand Down
4 changes: 0 additions & 4 deletions examples/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ path = "src/bin/type_c/basic.rs"
name = "type-c-service"
path = "src/bin/type_c/service.rs"

[[bin]]
name = "type-c-external"
path = "src/bin/type_c/external.rs"

[[bin]]
name = "type-c-unconstrained"
path = "src/bin/type_c/unconstrained.rs"
Expand Down
116 changes: 0 additions & 116 deletions examples/std/src/bin/type_c/external.rs

This file was deleted.

14 changes: 10 additions & 4 deletions type-c-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@ static_cell = { workspace = true }
tps6699x = { workspace = true, features = ["embassy"] }

[dev-dependencies]
embassy-time = { workspace = true, features = ["std", "generic-queue-8"] }
embassy-sync = { workspace = true, features = ["std"] }
embassy-time = { workspace = true, features = [
"log",
"std",
"generic-queue-8",
] }
critical-section = { workspace = true, features = ["std"] }
embassy-time-driver = { workspace = true }
embassy-futures.workspace = true
tokio = { workspace = true, features = ["rt", "macros", "time"] }
env_logger = "0.11.8"
paste = "1"
static_cell.workspace = true
log.workspace = true
power-policy-service.workspace = true

[features]
default = []
Expand Down
Loading
Loading