Przeglądaj źródła

SP600 检测485是否插入,需要判断DCDC

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 lat temu
rodzic
commit
84da60c9eb
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Application/bsp/gpio.h

+ 2 - 2
Application/bsp/gpio.h

@@ -57,8 +57,8 @@ void gpio_init(void);
 
 /*rs485 power switch */
 #define RS485_PWR_ENABLE(x) gpio_bit_write(GPIOC, GPIO_PIN_14, x==1?SET:RESET)
-/* rs485¼ì²âÄ£Äâhall1, MUST 485 power on && GPIOF0 is detect */
-#define IS_HALL2_DETECTED() (gpio_input_bit_get(GPIOF, GPIO_PIN_0)&&gpio_output_bit_get(GPIOC ,GPIO_PIN_14))
+/* rs485¼ì²âÄ£Äâhall1, MUST 485 power(DCDC) on && GPIOF0 is detect */
+#define IS_HALL2_DETECTED() ((gpio_input_bit_get(GPIOF, GPIO_PIN_0)== RESET) && gpio_output_bit_get(GPIOA ,GPIO_PIN_11))
 /* other hall2 is always 0 */
 #define IS_HALL1_DETECTED() (0)