From b26b576760fabdde3ca4e80d6ca9dc44ae376af8 Mon Sep 17 00:00:00 2001 From: ThinkPad-T460P Date: Fri, 19 Mar 2021 11:36:38 +0800 Subject: [PATCH] optimize GPIO operation --- Core/Inc/navikit.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Core/Inc/navikit.h b/Core/Inc/navikit.h index 9d0b014..a24d7d8 100644 --- a/Core/Inc/navikit.h +++ b/Core/Inc/navikit.h @@ -86,18 +86,20 @@ typedef struct extern NaviKit_t NaviKit; //device on board -enum Device_t{USB2_Port1=0x00,USB2_Port2,USB2_Port3,USB2_Port4,USB2_Port5,USB2_Port6, //USB2.0 Port - USB3_Port5,USB3_Port6,USB3_Port1,USB3_Port2,USB3_Port3,USB3_Port4, //USB3.0 Port - - SOC_USB2_HUB=0x10,SOC_USB3_HUB,SOC_USB3_HOST,SOC_USB3_GEC,SOC_GE_SW, //SOC on Board - - SYS_FAN1=0x20,SYS_FAN2,SYS_FAN3, //Fan on Board - SYS_RUN_LED,SYS_PWR_LED, //LED on Board - SYS_SRC_BUZZ, //Oscillation source internal buzzer - - SOM_PWR_EN=0x30,SOM_DFU,SOM_RESET,SOM_SLEEP, //SOM Control - - PMB_PS_ON=0x40}; //Power Management Board +enum Device_t{ + //USB Port + USB2_Port1=0x00,USB2_Port2,USB2_Port3,USB2_Port4,USB2_Port5,USB2_Port6, //USB2.0 Port + USB3_Port5,USB3_Port6,USB3_Port1,USB3_Port2,USB3_Port3,USB3_Port4, //USB3.0 Port + //SOC on Board + SOC_USB2_HUB=0x10,SOC_USB3_HUB,SOC_USB3_HOST,SOC_USB3_GEC,SOC_GE_SW, + //System component + SYS_FAN1=0x20,SYS_FAN2,SYS_FAN3, //Fan on Board + SYS_RUN_LED,SYS_PWR_LED, //LED on Board + SYS_SRC_BUZZ, //Oscillation source internal buzzer + //System on module --Jetson nano + SOM_PWR_EN=0x30,SOM_DFU,SOM_RESET,SOM_SLEEP, + //Power Management Board + PMB_PS_ON=0x40}; void PWR_Enable(enum Device_t device,bool en,uint16_t delay); bool PWR_Enable_IRQ(enum Device_t device,bool en,uint16_t delay);