diff --git a/ch32v003fun/ch32v003fun.c b/ch32v003fun/ch32v003fun.c index 235f20f605384836eed0028a005ee353950e8998..f7f86c5b4f769b14fbd7b9a8542d88dc3ce46825 100644 --- a/ch32v003fun/ch32v003fun.c +++ b/ch32v003fun/ch32v003fun.c @@ -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; diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h index 74c6118296ca2c9fea14f4db3f7e84f0a320201e..f80ea163701fa977d75f625cf44f64f3dcf3fa39 100644 --- a/ch32v003fun/ch32v003fun.h +++ b/ch32v003fun/ch32v003fun.h @@ -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. diff --git a/extralibs/ws2812b_dma_spi_led_driver.h b/extralibs/ws2812b_dma_spi_led_driver.h index 9d8433ac432f31c916f7ade89c93a5a4429deafc..f076d21ce77cc358cd51d4af9bafffdfb9d1742c 100644 --- a/extralibs/ws2812b_dma_spi_led_driver.h +++ b/extralibs/ws2812b_dma_spi_led_driver.h @@ -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 }