@@ -34,9 +34,9 @@ use crate::gpio::{
3434use crate :: gpio:: gpioc:: { PC0 , PC1 } ;
3535use crate :: gpio:: gpioe:: { PE7 , PE8 } ;
3636use crate :: gpio:: gpiof:: PF1 ;
37- use crate :: observable:: ObservationLock ;
3837use crate :: rcc:: { Clocks , Rcc } ;
3938use crate :: stm32:: { COMP , EXTI } ;
39+ use proto_hal:: stasis;
4040
4141/// Enabled Comparator (type state)
4242pub struct Enabled ;
@@ -265,8 +265,7 @@ pub mod refint_input {
265265 const USE_RESISTOR_DIVIDER : bool = $use_r_div;
266266 }
267267
268- impl crate :: observable:: Observable for $t { }
269- impl crate :: Sealed for $t { }
268+ impl proto_hal:: stasis:: Freeze for $t { }
270269 } ;
271270 }
272271
@@ -398,8 +397,8 @@ pub trait ComparatorExt<COMP> {
398397 where
399398 PP : PositiveInput < COMP > ,
400399 NP : NegativeInput < COMP > ,
401- P : ObservationLock < Peripheral = PP > ,
402- N : ObservationLock < Peripheral = NP > ;
400+ P : stasis :: EntitlementLock < Resource = PP > ,
401+ N : stasis :: EntitlementLock < Resource = NP > ;
403402}
404403
405404macro_rules! impl_comparator {
@@ -415,8 +414,8 @@ macro_rules! impl_comparator {
415414 where
416415 PP : PositiveInput <$COMP>,
417416 NP : NegativeInput <$COMP>,
418- P : ObservationLock < Peripheral = PP >,
419- N : ObservationLock < Peripheral = NP >,
417+ P : stasis :: EntitlementLock < Resource = PP >,
418+ N : stasis :: EntitlementLock < Resource = NP >,
420419 {
421420 PP :: setup( & mut self ) ;
422421 PP :: setup( & mut self ) ;
@@ -453,8 +452,8 @@ macro_rules! impl_comparator {
453452 where
454453 PP : PositiveInput <$COMP>,
455454 NP : NegativeInput <$COMP>,
456- P : ObservationLock < Peripheral = PP >,
457- N : ObservationLock < Peripheral = NP >,
455+ P : stasis :: EntitlementLock < Resource = PP >,
456+ N : stasis :: EntitlementLock < Resource = NP >,
458457 {
459458 comp. comparator( positive_input, negative_input, config, clocks)
460459 }
0 commit comments