summaryrefslogtreecommitdiff
path: root/app/led_driver/led_driver_process.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-03-05 20:20:45 +0300
committerOxore <oxore@protonmail.com>2023-03-05 20:20:45 +0300
commitea807de65b0485ac58b6eae576209c64d4d5c4e9 (patch)
treeb4264d20e1d700cfd9e0ece9d847a825dd1dfc03 /app/led_driver/led_driver_process.c
parentdd01e7ed22cea652061f0d12cecf929e04b285e9 (diff)
Split app code and third party libraries
Diffstat (limited to 'app/led_driver/led_driver_process.c')
-rw-r--r--app/led_driver/led_driver_process.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/led_driver/led_driver_process.c b/app/led_driver/led_driver_process.c
new file mode 100644
index 0000000..165ef99
--- /dev/null
+++ b/app/led_driver/led_driver_process.c
@@ -0,0 +1,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");
+}