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

正文內(nèi)容

stm32-i2c-dma-文庫吧資料

2025-07-30 08:05本頁面
  

【正文】 itten to * the EEPROM. * param WriteAddr : EEPROM39。 } /* If all operations OK, return sEE_OK (0) */ return sEE_OK。 /* Inform the DMA that the next End Of Transfer Signal will be the last one */ I2C_DMALastTransferCmd(sEE_I2C, ENABLE)。 while(!I2C_CheckEvent(sEE_I2C, I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED)) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。 } /*! ReEnable Acknowledgement to be ready for another reception */ I2C_AcknowledgeConfig(sEE_I2C, ENABLE)。 while(sEE_I2CCR1 amp。 /*! Decrement the read bytes counter */ (uint16_t)(*NumByteToRead)。 while(I2C_GetFlagStatus(sEE_I2C, I2C_FLAG_RXNE) == RESET) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。 /* Call User callback for critical section end (should typically reenable interrupts) */ sEE_ExitCriticalSection_UserCallback()。 /* Clear ADDR register by reading SR1 then SR2 register (SR1 has already been read) */ (void)sEE_I2CSR2。 } /*! Disable Acknowledgement */ I2C_AcknowledgeConfig(sEE_I2C, DISABLE)。t be used */ /* One Byte Master Reception procedure (POLLING) */ if ((uint16_t)(*NumByteToRead) 2) { /* Wait on ADDR flag to be set (ADDR is still not cleared at this level */ sEETimeout = sEE_FLAG_TIMEOUT。 } /*! Send EEPROM address for read */ I2C_Send7bitAddress(sEE_I2C, sEEAddress, I2C_Direction_Receiver)。 /*! Test on EV5 and clear it (cleared by reading SR1 then writing to DR) */ sEETimeout = sEE_FLAG_TIMEOUT。 while(I2C_GetFlagStatus(sEE_I2C, I2C_FLAG_BTF) == RESET) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。 0x00FF))。 } /*! Send the EEPROM39。 //發(fā)送高位地址 /*! Test on EV8 and clear it */ sEETimeout = sEE_FLAG_TIMEOUT。s internal address to read from: MSB of the address first */ I2C_SendData(sEE_I2C, (uint8_t)((ReadAddr amp。s internal address to read from: Only one byte address */ I2C_SendData(sEE_I2C, ReadAddr)。 while(!I2C_CheckEvent(sEE_I2C, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。 } /*! Send EEPROM address for write */ I2C_Send7bitAddress(sEE_I2C, sEEAddress, I2C_Direction_Transmitter)。 /*! Test on EV5 and clear it (cleared by reading SR1 then writing to DR) */ sEETimeout = sEE_FLAG_TIMEOUT。 while(I2C_GetFlagStatus(sEE_I2C, I2C_FLAG_BUSY)) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。s internal address to start reading from. * param NumByteToRead : pointer to the variable holding number of bytes to * be read from the EEPROM. * * note The variable pointed by NumByteToRead is reset to 0 when all the * data are read from the EEPROM. Application should monitor this * variable in order know when the transfer is plete. * * note When number of data to be read is higher than 1, this function just * configures the munication and enable the DMA channel to transfer data. * Meanwhile, the user application may perform other tasks. * When number of data to be read is 1, then the DMA is not used. The byte * is read in polling mode. * * retval sEE_OK (0) if operation is correctly performed, else return value * different from sEE_OK (0) or the timeout user callback. */uint32_t sEE_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead){ /* Set the pointer to the Number of data to be read. This pointer will be used by the DMA Transfer Completer interrupt Handler in order to reset the variable to 0. User should check on this variable in order to know if the DMA transfer has been plete or not. */ sEEDataReadPointer = NumByteToRead。 /* Enable the sEE_I2C peripheral DMA requests */ I2C_DMACmd(sEE_I2C, ENABLE)。 /* Apply sEE_I2C configuration after enabling it */ I2C_Init(sEE_I2C, amp。 = I2C_SPEED。 = I2C_Ack_Enable。 = I2C_DutyCycle_2。 sEE_LowLevel_Init()。 }}void sEE_DeInit(void){ sEE_LowLevel_DeInit()。 DMA_Init(sEE_I2C_DMA_CHANNEL_RX, amp。 = DMA_DIR_PeripheralSRC。sEEDMA_InitStructure)。 = (uint32_t)BufferSize。 }/** * brief Initializes DMA channel used by the I2C EEPROM driver. * param None * retval None */void sEE_LowLevel_DMAConfig(uint32_t pBuffer, uint32_t BufferSize, uint32_t Direction){ /* Initialize the DMA with the new parameters */ if (Direction == sEE_DIRECTION_TX) { /* Configure the DMA Tx Channel with the buffer address and the buffer size */ = (uint32_t)pBuffer。 /* Enable the DMA Channels Interrupts */ DMA_ITConfig(sEE_I2C_DMA_CHANNEL_TX, DMA_IT_TC, ENABLE)。 DMA_Init(sEE_I2C_DMA_CHANNEL_RX, amp。sEEDMA_InitStructure)。 = DMA_M2M_Disable。 = DMA_Mode_Normal。 = DMA_MemoryDataSize_Byte。 /* This parameter will be configured durig munication */ = DMA_PeripheralInc_Disable。 /* This parameter will be configured durig munication */ = DMA_DIR_PeripheralDST。 = (uint32_t)sEE_I2C_DR_Address。 /*! I2C DMA TX and RX channels configuration */ /* Enable the DMA clock */ RCC_AHBPeriphClockCmd(sEE_I2C_DMA_CLK, ENABLE)。 NVIC_Init(amp。 = sEE_I2C_DMA_PREPRIO。NVIC_InitStructure)。 = ENABLE。 = sEE_I2C_DMA_PREPRIO。GPIO_InitStructure)。 /*! Configure sEE_I2C pins: SDA */ = sEE_I2C_SDA_PIN。 GPIO_Init(sEE_I2C_SCL_GPIO_PORT, amp。 = GPIO_Speed_50MHz。 /*! sEE_I2C Periph clock enable */ RCC_APB1PeriphClockCmd(sEE_I2C_CLK, ENABLE)。 NVIC_InitTypeDef NVIC_InitStructure。 DMA_DeInit(sEE_I2C_DMA_CHANNEL_RX)。 DMA_Cmd(sEE_I2C_DMA_CHANNEL_RX, DISABLE)。NVIC_InitStructure)。 = sEE_I2C_DMA_SUBPRIO。 /* Confi
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1