freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

stm32單片機io端口編程-資料下載頁

2025-01-05 03:09本頁面
  

【正文】 結構體變量 GPIO_InitStructure, 用于初始化 GPIOx端口的參數(shù)GPIO_Init(GPIOC, amp。GPIO_InitStructure)。 //初始化 GPIOC端口 /******************************************************************************* * Function Name : GPIO_Init * Description : Initializes the GPIOx peripheral according to the specified * parameters in the GPIO_InitStruct. * Input : GPIOx: where x can be (A..G) to select the GPIO peripheral. * GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that * contains the configuration information for the specified GPIO * peripheral. * Output : None * Return : None *******************************************************************************/ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) { u32 currentmode = 0x00, currentpin = 0x00, pinpos = 0x00, pos = 0x00。 u32 tmpreg = 0x00, pinmask = 0x00。 /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx))。 assert_param(IS_GPIO_MODE(GPIO_InitStructGPIO_Mode))。 assert_param(IS_GPIO_PIN(GPIO_InitStructGPIO_Pin))。 /* GPIO Mode Configuration */ currentmode = ((u32)GPIO_InitStructGPIO_Mode) amp。 ((u32)0x0F)。 if ((((u32)GPIO_InitStructGPIO_Mode) amp。 ((u32)0x10)) != 0x00) //∵ 所有的輸出模式(開漏輸出 0x14,推挽輸出 0x10等),與 0x10相與,都為 0x10。 本句功能:當為輸出模式時,把 MODEy[1:0]端口 x的模式位 (y = 0…7) 設置為非 0(特殊:通過 currentmode |= GPIO_Speed。設定。本人認為用非 0值 1,設置更為簡單) { /* Check the parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStructGPIO_Speed))。 /* Output mode */ currentmode |= (u32)GPIO_InitStructGPIO_Speed。 } /* GPIO CRL Configuration */ /* Configure the eight low port pins */ if (((u32)GPIO_InitStructGPIO_Pin amp。 ((u32)0x00FF)) != 0x00) { tmpreg = GPIOxCRL。 for (pinpos = 0x00。 pinpos 0x08。 pinpos++) { pos = ((u32)0x01) pinpos。 /* Get the port pins position */ currentpin = (GPIO_InitStructGPIO_Pin) amp。 pos。 if (currentpin == pos) { pos = pinpos 2。 /* Clear the corresponding low control register bits */ pinmask = ((u32)0x0F) pos。 tmpreg amp。= ~pinmask。 /* Write the mode configuration in the corresponding bits */ tmpreg |= (currentmode pos)。 /* Reset the corresponding ODR bit */ if (GPIO_InitStructGPIO_Mode == GPIO_Mode_IPD) { GPIOxBRR = (((u32)0x01) pinpos)。 } /* Set the corresponding ODR bit */ if (GPIO_InitStructGPIO_Mode == GPIO_Mode_IPU) { GPIOxBSRR = (((u32)0x01) pinpos)。 } } } GPIOxCRL = tmpreg。 } /* GPIO CRH Configuration */ /* Configure the eight high port pins */ if (GPIO_InitStructGPIO_Pin 0x00FF) { tmpreg = GPIOxCRH。 for (pinpos = 0x00。 pinpos 0x08。 pinpos++) { pos = (((u32)0x01) (pinpos + 0x08))。 /* Get the port pins position */ currentpin = ((GPIO_InitStructGPIO_Pin) amp。 pos)。 if (currentpin == pos) { pos = pinpos 2。 /* Clear the corresponding high control register bits */ pinmask = ((u32)0x0F) pos。 tmpreg amp。= ~pinmask。 /* Write the mode configuration in the corresponding bits */ tmpreg |= (currentmode pos)。 /* Reset the corresponding ODR bit */ if (GPIO_InitStructGPIO_Mode == GPIO_Mode_IPD) { GPIOxBRR = (((u32)0x01) (pinpos + 0x08))。 } /* Set the corresponding ODR bit */ if (GPIO_InitStructGPIO_Mode == GPIO_Mode_IPU) { GPIOxBSRR = (((u32)0x01) (pinpos + 0x08))。 } } } GPIOxCRH = tmpreg。 } } STM32單片機 I/O端編程步驟 GPIOx端口 編程步驟 第 2章 STM32單片機 IO端口編程 STM32單片機 管腳和命名規(guī)則 STM32單片機 時鐘 配置 STM32單片機 I/O端口配置 STM32單片機 I/O端編程步驟 CortexM3芯片 STM32F103ZEH7的含義? 請寫出使能 USART1外設對應的時鐘命令。 簡述你對 GPIO管腳 的 工作模式的理解。 編寫程序,實現(xiàn)循環(huán)點亮連接在 PA口的 16個管腳上的發(fā)光二極管。電路詳見下面。 作業(yè): 5v 。 。 。
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1