@@ -175,9 +175,9 @@ impl<'a> Registration<'a> {
175175const MAX_BUFFERED_PD_ALERTS : usize = 4 ;
176176
177177/// Base storage
178- pub struct Storage < const N : usize , M : RawMutex > {
178+ pub struct Storage < ' a , const N : usize , M : RawMutex > {
179179 // Registration-related
180- context : & ' static embedded_services:: type_c:: controller:: Context ,
180+ context : & ' a embedded_services:: type_c:: controller:: Context ,
181181 controller_id : ControllerId ,
182182 pd_ports : [ GlobalPortId ; N ] ,
183183 cfu_device : embedded_services:: cfu:: component:: CfuDevice ,
@@ -187,9 +187,9 @@ pub struct Storage<const N: usize, M: RawMutex> {
187187 pd_alerts : [ PubSubChannel < M , Ado , MAX_BUFFERED_PD_ALERTS , 1 , 0 > ; N ] ,
188188}
189189
190- impl < const N : usize , M : RawMutex > Storage < N , M > {
190+ impl < ' a , const N : usize , M : RawMutex > Storage < ' a , N , M > {
191191 pub fn new (
192- context : & ' static embedded_services:: type_c:: controller:: Context ,
192+ context : & ' a embedded_services:: type_c:: controller:: Context ,
193193 controller_id : ControllerId ,
194194 cfu_id : ComponentId ,
195195 ports : [ ( GlobalPortId , power:: policy:: DeviceId ) ; N ] ,
@@ -215,7 +215,7 @@ impl<const N: usize, M: RawMutex> Storage<N, M> {
215215/// To simplify usage, we use interior mutability through a ref cell to avoid having to declare the state
216216/// completely separately.
217217pub struct ReferencedStorage < ' a , const N : usize , M : RawMutex > {
218- storage : & ' a Storage < N , M > ,
218+ storage : & ' a Storage < ' a , N , M > ,
219219 state : RefCell < InternalState < ' a , N > > ,
220220 pd_controller : embedded_services:: type_c:: controller:: Device < ' a > ,
221221}
0 commit comments