Forráskód Böngészése

[RTduino][STM32] 优化内置ADC通道

Meco Man 2 éve
szülő
commit
85294a8e86

+ 2 - 2
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_pinout/pins_arduino.c

@@ -45,6 +45,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PINS(1,31)},
     {A4, GET_PINS(0,13), "i2c1"},       /* I2C-SDA (Wire) */
     {A5, GET_PINS(0,14), "i2c1"},       /* I2C-SCL (Wire) */
-    {A6, RT_NULL, "adc0", 13},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc0", 26},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc0", 13},          /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc0", 26},          /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f072-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A4, GET_PIN(C,1), "adc1", 11},     /* ADC */
     {A5, GET_PIN(C,0), "adc1", 10},     /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f103-blue-pill/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -53,6 +52,6 @@ const pin_map_t pin_map_table[]=
     {A2, GET_PIN(A,5), "adc1", 5},      /* ADC */
     {A3, GET_PIN(A,6), "adc1", 6},      /* ADC */
     {A4, GET_PIN(A,7), "adc1", 7},      /* ADC */
-    {A5, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A6, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A5, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f401-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A4, GET_PIN(C,1), "adc1", 11},     /* ADC */
     {A5, GET_PIN(C,0), "adc1", 10},     /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f401-weact-blackpill/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -53,6 +52,6 @@ const pin_map_t pin_map_table[]=
     {A5, GET_PIN(A,7), "adc1", 7},      /* ADC */
     {A6, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A7, GET_PIN(B,1), "adc1", 9},      /* ADC */
-    {A8, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A9, RT_NULL, "adc1", 18},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A8, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A9, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f407-robomaster-c/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -35,6 +34,6 @@ const pin_map_t pin_map_table[]=
     {D11, GET_PIN(C,6), "pwm8", 1},     /* PWM */
     {D12, GET_PIN(I,6), "pwm8", 2},     /* PWM */
     {D13, GET_PIN(I,7), "pwm8", 3},     /* PWM */
-    {A0, RT_NULL, "adc1", 18},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
-    {A1, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
+    {A0, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal temperature sensor */
+    {A1, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal reference voltage */
 };

+ 2 - 3
bsp/stm32/stm32f410-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A4, GET_PIN(C,1), "adc1", 11},     /* ADC */
     {A5, GET_PIN(C,0), "adc1", 10},     /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f411-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A4, GET_PIN(C,1), "adc1", 11},     /* ADC */
     {A5, GET_PIN(C,0), "adc1", 10},     /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f411-weact-blackpill/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -53,6 +52,6 @@ const pin_map_t pin_map_table[]=
     {A5, GET_PIN(A,7), "adc1", 7},      /* ADC */
     {A6, GET_PIN(B,0), "adc1", 8},      /* ADC */
     {A7, GET_PIN(B,1), "adc1", 9},      /* ADC */
-    {A8, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A9, RT_NULL, "adc1", 18},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A8, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A9, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f412-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -47,6 +46,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(C,1), "adc1", 11},     /* ADC */
     {A4, GET_PIN(C,4), "adc1", 14},     /* ADC */
     {A5, GET_PIN(C,5), "adc1", 15},     /* ADC */
-    {A6, RT_NULL, "adc1", 17},     /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},     /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32f427-robomaster-a/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -65,6 +64,6 @@ const pin_map_t pin_map_table[]=
     {D41, GET_PIN(A,4)},
     {D42, GET_PIN(F,10)},
     {D43, GET_PIN(I,9)},
-    {A0, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
-    {A1, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
+    {A0, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal temperature sensor */
+    {A1, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal reference voltage */
 };

+ 2 - 3
bsp/stm32/stm32f469-st-disco/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -48,6 +47,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(C,4), "adc1", 14},     /* ADC */
     {A4, GET_PIN(C,5), "adc1", 15},     /* ADC */
     {A5, GET_PIN(A,4), "adc1", 4},      /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32g474-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 15},     /* ADC */
     {A4, GET_PIN(C,1), "adc1", 7},      /* ADC */
     {A5, GET_PIN(C,0), "adc1", 6},      /* ADC */
-    {A6, RT_NULL, "adc1", 3},           /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 3},           /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };

+ 2 - 3
bsp/stm32/stm32l431-BearPi/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -35,7 +34,7 @@ const pin_map_t pin_map_table[]=
     {D11, GET_PIN(C,5), "uart3"},       /* Serial2-Rx */
     {D12, GET_PIN(A,8), "pwm1", 1},     /* PWM */
     {A0, GET_PIN(C,2), "adc1", 3},      /* ADC */
-    {A1, RT_NULL, "adc1", 18},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A2, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A1, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A2, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
     {DAC0, GET_PIN(A,5), "dac1", 2},    /* DAC */
 };

+ 2 - 3
bsp/stm32/stm32l475-atk-pandora/applications/arduino_pinout/pins_arduino.c

@@ -10,7 +10,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -60,7 +59,7 @@ const pin_map_t pin_map_table[]=
     {D35, GET_PIN(A,3), "uart2"},       /* Serial2-Rx */
     {A0, GET_PIN(C,2), "adc1", 3},      /* ADC */
     {A1, GET_PIN(C,4), "adc1", 13},     /* ADC */
-    {A2, RT_NULL, "adc1", 0},           /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A3, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A2, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A3, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
     {DAC0, GET_PIN(A,4), "dac1", 1},    /* DAC */
 };

+ 2 - 3
bsp/stm32/stm32l476-st-nucleo/applications/arduino_pinout/pins_arduino.c

@@ -9,7 +9,6 @@
  */
 
 #include <Arduino.h>
-#include <board.h>
 #include "pins_arduino.h"
 
 /*
@@ -44,6 +43,6 @@ const pin_map_t pin_map_table[]=
     {A3, GET_PIN(B,0), "adc1", 15},     /* ADC */
     {A4, GET_PIN(C,1), "adc1", 2},      /* ADC */
     {A5, GET_PIN(C,0), "adc1", 1},      /* ADC */
-    {A6, RT_NULL, "adc1", 17},          /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
-    {A7, RT_NULL, "adc1", 16},          /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
+    {A6, RT_NULL, "adc1", RT_ADC_INTERN_CH_VREF},   /* ADC, On-Chip: internal reference voltage */
+    {A7, RT_NULL, "adc1", RT_ADC_INTERN_CH_TEMPER}, /* ADC, On-Chip: internal temperature sensor */
 };