gpiote: take borrow instead of owned pin.
This makes it possible to read the pin while the channel is created.
This commit is contained in:
		| @@ -51,11 +51,11 @@ impl Gpiote { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     pub fn new_input_channel<T>( | ||||
|         &self, | ||||
|         pin: GpioPin<Input<T>>, | ||||
|     pub fn new_input_channel<'a, T>( | ||||
|         &'a self, | ||||
|         pin: &'a GpioPin<Input<T>>, | ||||
|         trigger_mode: EventPolarity, | ||||
|     ) -> Result<Channel<'_>, NewChannelError> { | ||||
|     ) -> Result<Channel<'a>, NewChannelError> { | ||||
|         interrupt::free(|_| { | ||||
|             unsafe { INSTANCE = self }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user