Run clang-format on the entire repo
This patch clang-formats the entire repo. Third-party code is
excluded.
I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/motors/peripheral/adc_dma.cc b/motors/peripheral/adc_dma.cc
index bdd84d6..d2dc6c9 100644
--- a/motors/peripheral/adc_dma.cc
+++ b/motors/peripheral/adc_dma.cc
@@ -65,7 +65,8 @@
} // namespace
-AdcDmaSampler::AdcDmaSampler(int counts_per_cycle) : counts_per_cycle_(counts_per_cycle) {
+AdcDmaSampler::AdcDmaSampler(int counts_per_cycle)
+ : counts_per_cycle_(counts_per_cycle) {
for (int adc = 0; adc < 2; ++adc) {
for (int i = 0; i < 2; ++i) {
adc_sc1s_[adc][kNumberAdcSamples + i] = ADC_SC1_ADCH(0x1f);
@@ -117,7 +118,6 @@
static constexpr int kHscAdder = 2 * kAdcClockDivider;
-
static constexpr int kConversionTime =
kSfcAdder + 1 /* AverageNum */ * (kBct + kLstAdder + kHscAdder);
@@ -165,9 +165,8 @@
DMA.CERQ = result_dma_channel(adc);
DMA.CERQ = reconfigure_dma_channel(adc);
- ADC(adc)
- ->SC2 |= ADC_SC2_ADTRG /* Use hardware triggering */ |
- ADC_SC2_DMAEN /* Enable DMA triggers */;
+ ADC(adc)->SC2 |= ADC_SC2_ADTRG /* Use hardware triggering */ |
+ ADC_SC2_DMAEN /* Enable DMA triggers */;
int next_result_channel, next_reconfigure_channel;
if (adc == 0) {