Skip to content

Commit 6528876

Browse files
committed
fixup! [WIP] treewide: Use CamelCase peripheral names everywhere
1 parent 39f063d commit 6528876

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

arduino-hal/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ macro_rules! pins {
243243
macro_rules! default_serial {
244244
($p:expr, $pins:expr, $baud:expr) => {
245245
$crate::Usart::new(
246-
$p.USART1,
246+
$p.usart1,
247247
$pins.d0,
248248
$pins.d1.into_output(),
249249
$crate::hal::usart::BaudrateExt::into_baudrate($baud),
@@ -264,7 +264,7 @@ macro_rules! default_serial {
264264
macro_rules! default_serial {
265265
($p:expr, $pins:expr, $baud:expr) => {
266266
$crate::Usart::new(
267-
$p.USART1,
267+
$p.usart1,
268268
$pins.rx,
269269
$pins.tx.into_output(),
270270
$crate::hal::usart::BaudrateExt::into_baudrate($baud),
@@ -287,7 +287,7 @@ macro_rules! default_serial {
287287
/// let dp = arduino_hal::Peripherals::take().unwrap();
288288
/// let pins = arduino_hal::pins!(dp);
289289
/// let serial = arduino_hal::Usart::new(
290-
/// dp.USART1,
290+
/// dp.usart1,
291291
/// pins.d0,
292292
/// pins.d1.into_output(),
293293
/// // See src/usart.rs for why some boards use the BaudrateArduinoExt trait
@@ -305,7 +305,7 @@ macro_rules! default_serial {
305305
macro_rules! default_serial {
306306
($p:expr, $pins:expr, $baud:expr) => {
307307
$crate::Usart::new(
308-
$p.USART0,
308+
$p.usart0,
309309
$pins.d0,
310310
$pins.d1.into_output(),
311311
// See comment in avr-hal-generic/src/usart.rs for why these boards use the
@@ -333,7 +333,7 @@ macro_rules! default_serial {
333333
macro_rules! default_serial {
334334
($p:expr, $pins:expr, $baud:expr) => {
335335
$crate::Usart::new(
336-
$p.USART0,
336+
$p.usart0,
337337
$pins.d0,
338338
$pins.d1.into_output(),
339339
$crate::hal::usart::BaudrateExt::into_baudrate($baud),

mcu/atmega-hal/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,28 +168,28 @@ pub struct Atmega;
168168
#[macro_export]
169169
macro_rules! pins {
170170
($p:expr) => {
171-
$crate::Pins::new($p.PORTB, $p.PORTC, $p.PORTD)
171+
$crate::Pins::new($p.port_b, $p.port_c, $p.port_d)
172172
};
173173
}
174174
#[cfg(any(feature = "atmega16", feature = "atmega164pa"))]
175175
#[macro_export]
176176
macro_rules! pins {
177177
($p:expr) => {
178-
$crate::Pins::new($p.PORTA, $p.PORTB, $p.PORTC, $p.PORTD)
178+
$crate::Pins::new($p.port_a, $p.port_b, $p.port_c, $p.port_d)
179179
};
180180
}
181181
#[cfg(feature = "atmega328pb")]
182182
#[macro_export]
183183
macro_rules! pins {
184184
($p:expr) => {
185-
$crate::Pins::new($p.PORTB, $p.PORTC, $p.PORTD, $p.PORTE)
185+
$crate::Pins::new($p.port_b, $p.port_c, $p.port_d, $p.port_e)
186186
};
187187
}
188188
#[cfg(feature = "atmega32u4")]
189189
#[macro_export]
190190
macro_rules! pins {
191191
($p:expr) => {
192-
$crate::Pins::new($p.PORTB, $p.PORTC, $p.PORTD, $p.PORTE, $p.PORTF)
192+
$crate::Pins::new($p.port_b, $p.port_c, $p.port_d, $p.port_e, $p.port_f)
193193
};
194194
}
195195

@@ -198,7 +198,7 @@ macro_rules! pins {
198198
macro_rules! pins {
199199
($p:expr) => {
200200
$crate::Pins::new(
201-
$p.PORTA, $p.PORTB, $p.PORTC, $p.PORTD, $p.PORTE, $p.PORTF, $p.PORTG,
201+
$p.port_a, $p.port_b, $p.port_c, $p.port_d, $p.port_e, $p.port_f, $p.port_g,
202202
)
203203
};
204204
}
@@ -208,8 +208,8 @@ macro_rules! pins {
208208
macro_rules! pins {
209209
($p:expr) => {
210210
$crate::Pins::new(
211-
$p.PORTA, $p.PORTB, $p.PORTC, $p.PORTD, $p.PORTE, $p.PORTF, $p.PORTG, $p.PORTH,
212-
$p.PORTJ, $p.PORTK, $p.PORTL,
211+
$p.port_a, $p.port_b, $p.port_c, $p.port_d, $p.port_e, $p.port_f, $p.port_g, $p.port_h,
212+
$p.port_j, $p.port_k, $p.port_l,
213213
)
214214
};
215215
}
@@ -218,14 +218,14 @@ macro_rules! pins {
218218
#[macro_export]
219219
macro_rules! pins {
220220
($p:expr) => {
221-
$crate::Pins::new($p.PORTA, $p.PORTB, $p.PORTC, $p.PORTD)
221+
$crate::Pins::new($p.port_a, $p.port_b, $p.port_c, $p.port_d)
222222
};
223223
}
224224

225225
#[cfg(any(feature = "atmega8"))]
226226
#[macro_export]
227227
macro_rules! pins {
228228
($p:expr) => {
229-
$crate::Pins::new($p.PORTB, $p.PORTC, $p.PORTD)
229+
$crate::Pins::new($p.port_b, $p.port_c, $p.port_d)
230230
};
231231
}

0 commit comments

Comments
 (0)