summaryrefslogtreecommitdiff
path: root/Libraries/LED_Driver/led_driver_process.c
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2022-10-09 22:19:24 +0300
committerOxore <oxore@protonmail.com>2023-03-03 00:17:35 +0300
commitd16620e6ba7467e9ef99bf61336ccd8fb4dfd813 (patch)
tree9584f36a9188dc295e9b3f8d35723d3aa8bd7810 /Libraries/LED_Driver/led_driver_process.c
parentb1c8bb5df090d65cdd37a7acafb5dee8e3c530c6 (diff)
WIP: blocking SPI write experiments
Diffstat (limited to 'Libraries/LED_Driver/led_driver_process.c')
-rw-r--r--Libraries/LED_Driver/led_driver_process.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/Libraries/LED_Driver/led_driver_process.c b/Libraries/LED_Driver/led_driver_process.c
index 2389212..165ef99 100644
--- a/Libraries/LED_Driver/led_driver_process.c
+++ b/Libraries/LED_Driver/led_driver_process.c
@@ -7,7 +7,25 @@
//
// ----------------------------------------------------------------------------
void LEDDriverProcessFromISR ( void )
-{
- LED_ST_PIN_RESET;
- SPI_I2S_SendData16 ( LED_SPIx, (uint16_t)0 );
-} \ No newline at end of file
+{
+ 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");
+}