From 7e6338570edaed6808a99ffc86f634fa44e6a8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nima=20Askari=20-----=20=D9=86=DB=8C=D9=85=D8=A7=20=D8=B9?= =?UTF-8?q?=D8=B3=DA=A9=D8=B1=DB=8C?= Date: Wed, 12 May 2021 11:21:20 +0430 Subject: [PATCH] Remove warning --- atc.c | 2 +- atc.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/atc.c b/atc.c index e88eb94..8ce7c9c 100644 --- a/atc.c +++ b/atc.c @@ -28,7 +28,7 @@ void atc_free(void *ptr) #endif } //#################################################################################################### -void atc_init(atc_t *atc, const char *name, USART_TypeDef *USARTx, void *found) +void atc_init(atc_t *atc, const char *name, USART_TypeDef *USARTx, void (*found)(char*)) { if (atc->inited == true) return; diff --git a/atc.h b/atc.h index 61886f9..4db0b3e 100644 --- a/atc.h +++ b/atc.h @@ -10,10 +10,11 @@ */ /* - * Version: 3.0.2 + * Version: 3.0.3 * * History: * + * (3.0.3): Remove warning. * (3.0.2): Clear answer buffer before use. * (3.0.1): Change some defines. * (3.0.0): Rewrite again. Support NONE-RTOS, RTOS V1 and RTOS V2. @@ -60,7 +61,7 @@ typedef struct * USARTx: selected USART * found: atc found function. auto called after found strings you added before. do not use atc_command function into this */ -void atc_init(atc_t *atc, const char *name, USART_TypeDef *USARTx, void *found); +void atc_init(atc_t *atc, const char *name, USART_TypeDef *USARTx, void (*found)(char*)); //############################################################################################################### /* * put in usart rx interrupt