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

正文內(nèi)容

stm32單片機(jī)io端口編程-資料下載頁(yè)

2025-01-05 03:09本頁(yè)面
  

【正文】 結(jié)構(gòu)體變量 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) //∵ 所有的輸出模式(開(kāi)漏輸出 0x14,推挽輸出 0x10等),與 0x10相與,都為 0x10。 本句功能:當(dāng)為輸出模式時(shí),把 MODEy[1:0]端口 x的模式位 (y = 0…7) 設(shè)置為非 0(特殊:通過(guò) currentmode |= GPIO_Speed。設(shè)定。本人認(rèn)為用非 0值 1,設(shè)置更為簡(jiǎn)單) { /* 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單片機(jī) I/O端編程步驟 GPIOx端口 編程步驟 第 2章 STM32單片機(jī) IO端口編程 STM32單片機(jī) 管腳和命名規(guī)則 STM32單片機(jī) 時(shí)鐘 配置 STM32單片機(jī) I/O端口配置 STM32單片機(jī) I/O端編程步驟 CortexM3芯片 STM32F103ZEH7的含義? 請(qǐng)寫出使能 USART1外設(shè)對(duì)應(yīng)的時(shí)鐘命令。 簡(jiǎn)述你對(duì) GPIO管腳 的 工作模式的理解。 編寫程序,實(shí)現(xiàn)循環(huán)點(diǎn)亮連接在 PA口的 16個(gè)管腳上的發(fā)光二極管。電路詳見(jiàn)下面。 作業(yè): 5v 。 。 。
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1