blob: 1bfc80ca56562924d9836a6558408e8673e59b1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "led_driver_process.h"
#include "led_driver_config.h"
#include <stdint.h>
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------
void LEDDriverProcessFromISR ( void )
{
return;
__asm__ volatile("cpsid i");
LED_ST_PIN_RESET;
for (int j = 0; j < 4; j++) {
LED_SPIx->DR = 0;
while (SPI_I2S_FLAG_BSY & LED_SPIx->SR);
for (int i = 0; i < 4; i++) {
LED_SPIx->DR = 0xf8f8;
while (SPI_I2S_FLAG_BSY & LED_SPIx->SR);
}
for (int i = 0; i < 4; i++) {
LED_SPIx->DR = 0xe0e0;
while (SPI_I2S_FLAG_BSY & LED_SPIx->SR);
}
for (int i = 0; i < 4; i++) {
LED_SPIx->DR = 0xe0e0;
while (SPI_I2S_FLAG_BSY & LED_SPIx->SR);
}
}
__asm__ volatile("cpsie i");
}
|