Skip to content
Snippets Groups Projects
Commit 8d0c8aa9 authored by Alain Carlucci's avatar Alain Carlucci
Browse files

[*] Added 80 column limit

parent 71fecc21
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
AllowShortIfStatementsOnASingleLine: false,
AllowShortLoopsOnASingleLine: false,
BreakBeforeBraces: Allman,
ColumnLimit: 80,
ConstructorInitializerAllOnOneLineOrOnePerLine: false,
IndentCaseLabels: true,
IndentWidth: 4,
......
......@@ -90,12 +90,12 @@ void DMA1_Stream7_IRQHandler()
// We can't just wake the thread because the I2C is double buffered, and
// this interrupt is fired at the same time as the second last byte is
// starting to be sent out of the bus. If we return now, the main code would
// send a stop condiotion too soon, and the last byte would never be sent.
// Instead, we change from DMA mode to IRQ mode, so when the second last byte
// is sent, that interrupt is fired and the last byte is sent out. Note that
// since no thread is awakened from this IRQ, there's no need for the
// saveContext(), restoreContext() and __attribute__((naked))
// starting to be sent out of the bus. If we return now, the main code
// would send a stop condiotion too soon, and the last byte would never be
// sent. Instead, we change from DMA mode to IRQ mode, so when the second
// last byte is sent, that interrupt is fired and the last byte is sent
// out. Note that since no thread is awakened from this IRQ, there's no
// need for the saveContext(), restoreContext() and __attribute__((naked))
I2C1->CR2 &= ~I2C_CR2_DMAEN;
I2C1->CR2 |= I2C_CR2_ITBUFEN | I2C_CR2_ITEVTEN;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment