We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29705a3 + c38c635 commit ab05c94Copy full SHA for ab05c94
examples/usart_dma_rx_circular/usart_dma_rx_circular.c
@@ -2,6 +2,7 @@
2
// Using any terminal, send "toggle\r\n" to control the LED connected to PC7.
3
4
#include "ch32fun.h"
5
+#include <stdio.h>
6
7
#define RX_BUF_LEN 16 // size of receive circular buffer
8
@@ -10,7 +11,7 @@ u8 cmd_buf[RX_BUF_LEN] = {0}; // buffer for complete command strings
10
11
12
void process_cmd(u8* buf)
13
{
- if ( strncmp(buf, "toggle\r\n", 9) == 0) {
14
+ if ( strncmp((char*)buf, "toggle\r\n", 9) == 0) {
15
GPIOC->OUTDR ^= (1<<7);
16
printf("Horay!\r\n");
17
} else {
0 commit comments