Browse Source

[bsp][gd32103c-eval] Modify adc driver with LOG_x function and deselect adc and hwtimer driver

iysheng 4 years ago
parent
commit
e2d6f6aadd
2 changed files with 5 additions and 10 deletions
  1. 5 7
      bsp/gd32103c-eval/drivers/drv_adc.c
  2. 0 3
      bsp/gd32103c-eval/rtconfig.h

+ 5 - 7
bsp/gd32103c-eval/drivers/drv_adc.c

@@ -9,17 +9,15 @@
  */
 
 #include <board.h>
+#include <drivers/drv_comm.h>
 #include <drivers/adc.h>
-#include <rtdbg.h>
 
-#ifdef RT_USING_ADC
+#define DBG_TAG             "drv.adc"
+#define DBG_LVL             DBG_INFO
 
-//#define DRV_DEBUG
-#define LOG_TAG             "drv.adc"
+#include <rtdbg.h>
 
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x)    (sizeof(x) / sizeof(x[0]))
-#endif
+#ifdef RT_USING_ADC
 
 #define MAX_EXTERN_ADC_CHANNEL    16
 

+ 0 - 3
bsp/gd32103c-eval/rtconfig.h

@@ -85,7 +85,6 @@
 #define RT_SERIAL_USING_DMA
 #define RT_SERIAL_RB_BUFSZ 64
 #define RT_USING_PIN
-#define RT_USING_ADC
 
 /* Using USB */
 
@@ -161,7 +160,5 @@
 
 #define BSP_USING_UART
 #define BSP_USING_UART0
-#define BSP_USING_ADC
-#define BSP_USING_ADC0
 
 #endif