Эх сурвалжийг харах

add dc-dc power detect

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 5 жил өмнө
parent
commit
e0603e5abc

+ 3 - 1
Application/bsp/gpio.c

@@ -36,8 +36,10 @@ void gpio_init(void){
 	//cs1180 power enable
 	gpio_mode_output(GPIOB, GPIO_PUPD_NONE, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, GPIO_PIN_12);
 
-	//12v DC-DC enable
+	//DC-DC enable
 	gpio_mode_output(GPIOA, GPIO_PUPD_NONE, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, GPIO_PIN_11);
+	//DC-DC power good indicat
+	gpio_mode_input(GPIOF, GPIO_PUPD_NONE, GPIO_PIN_7);
 
 	//ms5238 irq
 	gpio_mode_input(GPIOA, GPIO_PUPD_NONE, GPIO_PIN_12);

+ 2 - 0
Application/bsp/gpio.h

@@ -9,6 +9,8 @@
 #define AUX_VOL_OPEN(x) gpio_bit_write(GPIOB,GPIO_PIN_2,(bit_status)(x))
 /*switch for larger current DCDC  */
 #define DCDC_VOL_OPEN(x) gpio_bit_write(GPIOA,GPIO_PIN_11,(bit_status)(x))
+/* DCDC output power good detect */
+#define DCDC_POWER_GOOD() gpio_input_bit_get(GPIOF, GPIO_PIN_7)
 /*switch for IR uart0 */
 #define UART0_IR_EN(x) gpio_bit_write(GPIOC,GPIO_PIN_14,(bit_status)(x))
 /*switch for IR uart1 */