Skip to content

Commit 3043f2d

Browse files
committed
Merge branch 'develop'
2 parents c192433 + 0c0ad24 commit 3043f2d

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/wiring/m5_unit_unified_wiring.hpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
128127
inline 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
*/
149148
inline 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

Comments
 (0)