Skip to content

stm32/hrtim: refactor to deduplicate code between channels. #2318

Open
@Dirbaio

Description

@Dirbaio

pub struct ChA<T: Instance> {
phantom: PhantomData<T>,
}
pub struct ChB<T: Instance> {
phantom: PhantomData<T>,
}
pub struct ChC<T: Instance> {
phantom: PhantomData<T>,
}
pub struct ChD<T: Instance> {
phantom: PhantomData<T>,
}
pub struct ChE<T: Instance> {
phantom: PhantomData<T>,
}
#[cfg(hrtim_v2)]
pub struct ChF<T: Instance> {
phantom: PhantomData<T>,
}

These should be changed into a single Ch<T: Instance, C: Channel>, where C is a series of marker types A, B, C... This will need deduplicating the Pin traits too.

See this PR which did a similar refactor to SAI for ideas: #2310

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions