5 ms·
setup_spi( &adc, mode=SPI_01, rate=15, cs_control=CS_MUXED, cs=0x01 ); setup_spi( &eeprom, mode=SPI_10, rate=13, cs_cont
by someothherguyy 1y ago
setup_spi(
&adc,
mode=SPI_01,
rate=15,
cs_control=CS_MUXED,
cs=0x01
);
setup_spi(
&eeprom,
mode=SPI_10,
rate=13,
cs_control=CS_MUXED,
cs=0x02
);
setup_spi(
&mram,
mode=SPI_10,
rate=50,
cs_control=CS_DIRECT,
cs=0x08
);
ftfy
- Marazan 1y agoThat is harder to read than the long line version. However, it is the formatting I adopt when forced to bow down to line length formatters.
- someothherguyy 1y agoto you, to me, it reads nicely, and thus the issue -- editors should have built in formatters that don't actually edit source code, but offer a view
- thaumasiotes 1y agoTo me, that reads fine, but it has lost the property elevation wanted, which was that it's easy to compare the values assigned to any particular parameter across multiple calls. In your version you can only read one call at a time.
- lenkite 1y agoErr..I find the short-line version easier to read. Esp if you need to horizontally scroll. This is why a Big Dictator should just make a standard. Everyone who doesn't like the standard approach just gets used to it.
- DonHopkins 1y agoThis is good, and objectively better than letting the random unbounded length of the function name define and inflate and randomize the indentation. It also makes it easier to use long descriptive function names without fucking up the indentation. setup_spi(&adc, mode=SPI_01, rate=15, cs_control=CS_MUXED, cs=0x01 ); setup_spoo(&adc, mode=SPI_01, rate=15, cs_control=CS_MUXED, cs=0x01 ); setup_s(&adc, mode=SPI_01, rate=15, cs_control=CS_MUXED, cs=0x01 ); validate_and_register_spi_spoo_s(&adc, mode=SPI_01, rate=15, cs_control=CS_MUXED, cs=0x01 );
- DemocracyFTW2 1y agoHere, fixed it for you: setup_spi( &adc, mode = SPI_01, rate = 15, cs_control = CS_MUXED, cs = 0x01 ); setup_spoo( &adc, mode = SPI_01, rate = 15, cs_control = CS_MUXED, cs = 0x01 ); setup_s( &adc, mode = SPI_01, rate = 15, cs_control = CS_MUXED, cs = 0x01 ); validate_and_register_spi_spoo_s( &adc, mode = SPI_01, rate = 15, cs_control = CS_MUXED, cs = 0x01 );