app: minor, make line select more secure
This commit is contained in:
parent
9d415ed449
commit
8bfccb86a0
@ -1229,7 +1229,7 @@ void RGBMATRIX_ISR(void)
|
||||
{
|
||||
if (dma_get_interrupt_flag(RGBMATRIX_DMA, RGBMATRIX_STREAM, DMA_TCIF)) {
|
||||
dma_clear_interrupt_flags(RGBMATRIX_DMA, RGBMATRIX_STREAM, DMA_TCIF);
|
||||
GPIOB_ODR = (GPIOB_ODR & 0xfff0) + rgbmatrix_line; // select line (line on lower and upper half are updated at once)
|
||||
GPIOB_ODR = (GPIOB_ODR & 0xfff0) | (rgbmatrix_line & 0xf); // select line (line on lower and upper half are updated at once)
|
||||
rgbmatrix_line = (rgbmatrix_line + 1) % (RGBMATRIX_HEIGHT / 2); // go to next line (two lines are updated at once)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user