Skip to content
Snippets Groups Projects
Commit 947edbf9 authored by cnlohr's avatar cnlohr
Browse files

Update with nulled printf (to prevent warnings on non-printf projects) and...

Update with nulled printf (to prevent warnings on non-printf projects) and undestructively add interrupt nesting to WS2812B driver.
parent 7521c1dc
No related branches found
No related tags found
No related merge requests found
......@@ -1004,9 +1004,9 @@ void WaitForDebuggerToAttach()
#endif
#if (defined( FUNCONF_USE_DEBUGPRINTF ) && !FUNCONF_USE_DEBUGPRINTF) && \
((defined( FUNCONF_USE_UARTPRINTF ) && !FUNCONF_USE_UARTPRINTF) || \
!defined( FUNCONF_USE_UARTPRINTF ))
#warning( DEBUG Print Disabled)
(defined( FUNCONF_USE_UARTPRINTF ) && !FUNCONF_USE_UARTPRINTF) && \
(defined( FUNCONF_NULL_PRINTF ) && FUNCONF_NULL_PRINTF)
int _write(int fd, const char *buf, int size)
{
return size;
......
......@@ -17,6 +17,7 @@
#define FUNCONF_USE_CLK_SEC 1 // Use clock security system, enabled by default
#define FUNCONF_USE_DEBUGPRINTF 1
#define FUNCONF_USE_UARTPRINTF 0
#define FUNCONF_NULL_PRINTF 0 // Have printf but direct it "nowhere"
#define FUNCONF_SYSTICK_USE_HCLK 0 // Should systick be at 48 MHz or 6MHz?
#define FUNCONF_TINYVECTOR 0 // If enabled, Does not allow normal interrupts.
#define FUNCONF_UART_PRINTF_BAUD 115200 // Only used if FUNCONF_USE_UARTPRINTF is set.
......
......@@ -264,7 +264,7 @@ void WS2812BDMAInit( )
DMA1_Channel3->CFGR |= DMA_CFGR1_EN;
#ifdef WS2812B_ALLOW_INTERRUPT_NESTING
__set_INTSYSCR( 2 ); // Enable interrupt nesting.
__set_INTSYSCR( __get_INTSYSCR() | 2 ); // Enable interrupt nesting.
PFIC->IPRIOR[24] = 0b10000000; // Turn on preemption for DMA1Ch3
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment