Skip to content

Commit

Permalink
change names
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Oct 22, 2024
1 parent 8b2cab5 commit 69f2444
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generate/generic_reg_vcell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl<REG: Resettable + Writable> Reg<REG> {
/// let state = periph.reg.write_and(|w| State::set(w.field1()));
/// ```
#[inline(always)]
pub fn write_and<F, T>(&self, f: F) -> T
pub fn from_write<F, T>(&self, f: F) -> T
where
F: FnOnce(&mut W<REG>) -> T,
{
Expand Down Expand Up @@ -164,7 +164,7 @@ impl<REG: Writable> Reg<REG> {
///
/// Unsafe to use with registers which don't allow to write 0.
#[inline(always)]
pub unsafe fn write_with_zero_and<F, T>(&self, f: F) -> T
pub unsafe fn from_write_with_zero<F, T>(&self, f: F) -> T
where
F: FnOnce(&mut W<REG>) -> T,
{
Expand Down Expand Up @@ -261,7 +261,7 @@ impl<REG: Readable + Writable> Reg<REG> {
/// ```
/// Other fields will have the value they had before the call to `modify`.
#[inline(always)]
pub fn modify_and<F, T>(&self, f: F) -> T
pub fn from_modify<F, T>(&self, f: F) -> T
where
for<'w> F: FnOnce(&R<REG>, &'w mut W<REG>) -> T,
{
Expand Down

0 comments on commit 69f2444

Please sign in to comment.