@@ -104,8 +104,7 @@ inline I2CPins i2cPins(const NessoPort nesso = NessoPort::PortB)
104104 if (board == m5::board_t ::board_ArduinoNessoN1) {
105105 if (nesso == NessoPort::PortB) {
106106 return {static_cast <int8_t >(M5 .getPin (m5::pin_name_t ::port_b_out)),
107- static_cast <int8_t >(M5 .getPin (m5::pin_name_t ::port_b_in)),
108- I2CPins::Backend::SoftwareI2C};
107+ static_cast <int8_t >(M5 .getPin (m5::pin_name_t ::port_b_in)), I2CPins::Backend::SoftwareI2C};
109108 }
110109 return {static_cast <int8_t >(M5 .getPin (m5::pin_name_t ::port_a_sda)),
111110 static_cast <int8_t >(M5 .getPin (m5::pin_name_t ::port_a_scl)), I2CPins::Backend::Wire};
@@ -127,8 +126,8 @@ inline I2CPins i2cPins(const NessoPort nesso = NessoPort::PortB)
127126*/
128127inline GpioPinPair gpioPins (const GpioRole role = GpioRole::Both)
129128{
130- int rx = (role == GpioRole::OutOnly) ? -1 : M5 .getPin (m5::pin_name_t ::port_b_in);
131- int tx = (role == GpioRole::InOnly) ? -1 : M5 .getPin (m5::pin_name_t ::port_b_out);
129+ int rx = (role == GpioRole::OutOnly) ? -1 : M5 .getPin (m5::pin_name_t ::port_b_in);
130+ int tx = (role == GpioRole::InOnly) ? -1 : M5 .getPin (m5::pin_name_t ::port_b_out);
132131 const bool need_rx_fb = (role != GpioRole::OutOnly && rx < 0 );
133132 const bool need_tx_fb = (role != GpioRole::InOnly && tx < 0 );
134133 bool fb = false ;
@@ -148,9 +147,9 @@ inline GpioPinPair gpioPins(const GpioRole role = GpioRole::Both)
148147*/
149148inline UartPinPair uartPins ()
150149{
151- int rx = M5 .getPin (m5::pin_name_t ::port_c_rxd);
152- int tx = M5 .getPin (m5::pin_name_t ::port_c_txd);
153- bool fb = false ;
150+ int rx = M5 .getPin (m5::pin_name_t ::port_c_rxd);
151+ int tx = M5 .getPin (m5::pin_name_t ::port_c_txd);
152+ bool fb = false ;
154153 if (rx < 0 || tx < 0 ) {
155154 fb = true ;
156155 rx = M5 .getPin (m5::pin_name_t ::port_a_pin1);
@@ -314,8 +313,7 @@ inline bool addGPIO(UnitUnified& units, Component& unit, const GpioRole role = G
314313 if (p.fallback_a ) {
315314 Wire.end ();
316315 }
317- M5_LIB_LOGI (" wiring: GPIO rx=%d tx=%d role=%d fallback_a=%d" , (int )p.rx , (int )p.tx , (int )role,
318- (int )p.fallback_a );
316+ M5_LIB_LOGI (" wiring: GPIO rx=%d tx=%d role=%d fallback_a=%d" , (int )p.rx , (int )p.tx , (int )role, (int )p.fallback_a );
319317 return units.add (unit, p.rx , p.tx );
320318}
321319
0 commit comments