nrf: rename Cargo feature references from "51" to "nrf51".
Note: the feature doesn't actually exist, references are there just in case nrf51xx is supported in the future.
This commit is contained in:
		| @@ -239,14 +239,14 @@ impl<'d, C: Channel, T: GpioPin> OutputChannel<'d, C, T> { | ||||
|     } | ||||
|  | ||||
|     /// Triggers `task set` (set associated pin high). | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     pub fn set(&self) { | ||||
|         let g = unsafe { &*pac::GPIOTE::ptr() }; | ||||
|         g.tasks_set[self.ch.number()].write(|w| unsafe { w.bits(1) }); | ||||
|     } | ||||
|  | ||||
|     /// Triggers `task clear` (set associated pin low). | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     pub fn clear(&self) { | ||||
|         let g = unsafe { &*pac::GPIOTE::ptr() }; | ||||
|         g.tasks_clr[self.ch.number()].write(|w| unsafe { w.bits(1) }); | ||||
| @@ -259,14 +259,14 @@ impl<'d, C: Channel, T: GpioPin> OutputChannel<'d, C, T> { | ||||
|     } | ||||
|  | ||||
|     /// Returns the CLR task, for use with PPI. | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     pub fn task_clr(&self) -> Task { | ||||
|         let g = unsafe { &*pac::GPIOTE::ptr() }; | ||||
|         Task::from_reg(&g.tasks_clr[self.ch.number()]) | ||||
|     } | ||||
|  | ||||
|     /// Returns the SET task, for use with PPI. | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     pub fn task_set(&self) -> Task { | ||||
|         let g = unsafe { &*pac::GPIOTE::ptr() }; | ||||
|         Task::from_reg(&g.tasks_set[self.ch.number()]) | ||||
|   | ||||
| @@ -31,7 +31,7 @@ impl<'d, C: Channel> Ppi<'d, C> { | ||||
|             ch, | ||||
|             phantom: PhantomData, | ||||
|         }; | ||||
|         #[cfg(not(feature = "51"))] | ||||
|         #[cfg(not(feature = "nrf51"))] | ||||
|         this.clear_fork_task(); | ||||
|         this | ||||
|     } | ||||
| @@ -50,7 +50,7 @@ impl<'d, C: Channel> Ppi<'d, C> { | ||||
|             .write(|w| unsafe { w.bits(1 << self.ch.number()) }); | ||||
|     } | ||||
|  | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     /// Sets the fork task that must be triggered when the configured event occurs. The user must | ||||
|     /// provide a reference to the task. | ||||
|     pub fn set_fork_task(&mut self, task: Task) { | ||||
| @@ -60,7 +60,7 @@ impl<'d, C: Channel> Ppi<'d, C> { | ||||
|             .write(|w| unsafe { w.bits(task.0.as_ptr() as u32) }) | ||||
|     } | ||||
|  | ||||
|     #[cfg(not(feature = "51"))] | ||||
|     #[cfg(not(feature = "nrf51"))] | ||||
|     /// Clear the fork task endpoint. Previously set task will no longer be triggered. | ||||
|     pub fn clear_fork_task(&mut self) { | ||||
|         let r = unsafe { &*pac::PPI::ptr() }; | ||||
| @@ -199,13 +199,13 @@ impl_channel!(PPI_CH12, 12, configurable); | ||||
| impl_channel!(PPI_CH13, 13, configurable); | ||||
| impl_channel!(PPI_CH14, 14, configurable); | ||||
| impl_channel!(PPI_CH15, 15, configurable); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_channel!(PPI_CH16, 16, configurable); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_channel!(PPI_CH17, 17, configurable); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_channel!(PPI_CH18, 18, configurable); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_channel!(PPI_CH19, 19, configurable); | ||||
| impl_channel!(PPI_CH20, 20); | ||||
| impl_channel!(PPI_CH21, 21); | ||||
| @@ -249,7 +249,7 @@ impl_group!(PPI_GROUP0, 0); | ||||
| impl_group!(PPI_GROUP1, 1); | ||||
| impl_group!(PPI_GROUP2, 2); | ||||
| impl_group!(PPI_GROUP3, 3); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_group!(PPI_GROUP4, 4); | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| impl_group!(PPI_GROUP5, 5); | ||||
|   | ||||
| @@ -8,7 +8,7 @@ pub(crate) fn slice_in_ram(slice: &[u8]) -> bool { | ||||
| } | ||||
|  | ||||
| /// Return an error if slice is not in RAM. | ||||
| #[cfg(not(feature = "51"))] | ||||
| #[cfg(not(feature = "nrf51"))] | ||||
| pub(crate) fn slice_in_ram_or<T>(slice: &[u8], err: T) -> Result<(), T> { | ||||
|     if slice.len() == 0 || slice_in_ram(slice) { | ||||
|         Ok(()) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user