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

正文內(nèi)容

stm32-i2c-dma-全文預(yù)覽

2025-08-14 08:05 上一頁面

下一頁面
  

【正文】 /* Clear ADDR register by reading SR1 then SR2 register (SR1 has already been read) */ (void)sEE_I2CSR2。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。 /*! Test on EV5 and clear it (cleared by reading SR1 then writing to DR) */ sEETimeout = sEE_FLAG_TIMEOUT。 0x00FF))。 //發(fā)送高位地址 /*! Test on EV8 and clear it */ sEETimeout = sEE_FLAG_TIMEOUT。s internal address to read from: Only one byte address */ I2C_SendData(sEE_I2C, ReadAddr)。 } /*! Send EEPROM address for write */ I2C_Send7bitAddress(sEE_I2C, sEEAddress, I2C_Direction_Transmitter)。 while(I2C_GetFlagStatus(sEE_I2C, I2C_FLAG_BUSY)) { if((sEETimeout) == 0) return sEE_TIMEOUT_UserCallback()。 /* Enable the sEE_I2C peripheral DMA requests */ I2C_DMACmd(sEE_I2C, ENABLE)。 = I2C_SPEED。 = I2C_DutyCycle_2。 }}void sEE_DeInit(void){ sEE_LowLevel_DeInit()。 = DMA_DIR_PeripheralSRC。 = (uint32_t)BufferSize。 /* Enable the DMA Channels Interrupts */ DMA_ITConfig(sEE_I2C_DMA_CHANNEL_TX, DMA_IT_TC, ENABLE)。sEEDMA_InitStructure)。 = DMA_Mode_Normal。 /* This parameter will be configured durig munication */ = DMA_PeripheralInc_Disable。 = (uint32_t)sEE_I2C_DR_Address。 NVIC_Init(amp。NVIC_InitStructure)。 = sEE_I2C_DMA_PREPRIO。 /*! Configure sEE_I2C pins: SDA */ = sEE_I2C_SDA_PIN。 = GPIO_Speed_50MHz。 NVIC_InitTypeDef NVIC_InitStructure。 DMA_Cmd(sEE_I2C_DMA_CHANNEL_RX, DISABLE)。 = sEE_I2C_DMA_SUBPRIO。 NVIC_Init(amp。 /* Configure and enable I2C DMA TX Channel interrupt */ = sEE_I2C_DMA_TX_IRQn。GPIO_InitStructure)。 /*! sEE_I2C Periph clock disable */ RCC_APB1PeriphClockCmd(sEE_I2C_CLK, DISABLE)。void sEE_LowLevel_DeInit(void){ GPIO_InitTypeDef GPIO_InitStructure。 __IO uint16_t* sEEDataReadPointer。/* Start and End of critical section: these callbacks should be typically used to disable interrupts when entering a critical section of I2C munication You may use default callbacks provided into this driver by unmenting the define USE_DEFAULT_CRITICAL_CALLBACK in file.. Or you can ment that line and implement these callbacks into your application */void sEE_EnterCriticalSection_UserCallback(void)。void sEE_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)。ifndef __AT24C256_Hdefine __AT24C256_H/* Includes */include ifdef __cplusplus extern C {endifdefine I2C_SPEED 300000define I2C_SLAVE_ADDRESS7 0xA0 define sEE_PAGESIZE 32/* Maximum number of trials for sEE_WaitEepromStandbyState() function */define sEE_MAX_TRIALS_NUMBER 150 /* Defintions for the state of the DMA transfer */ define sEE_STATE_READY 0define sEE_STATE_BUSY 1define sEE_STATE_ERROR 2 define sEE_OK 0define sEE_FAIL 1 define sEE_FLAG_TIMEOUT ((uint32_t)0x1000)define sEE_LONG_TIMEOUT ((uint32_t)(10 * sEE_FLAG_TIMEOUT))define sEE_I2C I2C1define sEE_I2C_CLK RCC_APB1Periph_I2C1define sEE_I2C_SCL_PIN GPIO_Pin_6 define sEE_I2C_SCL_GPIO_PORT GPIOB define sEE_I2C_SCL_GPIO_CLK RCC_APB2Periph_GPIOBdefine sEE_I2C_SDA_PIN GPIO_Pin_7 define sEE_I2C_SDA_GPIO_PORT GPIOB define sEE_I2C_SDA_GPIO_CLK RCC_APB2Periph_GPIOBdefine sEE_M24C64_32define sEE_I2C_DMA DMA1 define sEE_I2C_DMA_CHANNEL_TX DMA1_Channel6define sEE_I2C_DMA_CHANNEL_RX DMA1_Channel7 define sEE_I2C_DMA_FLAG_TX_TC DMA1_IT_TC6 define sEE_I2C_DMA_FLAG_TX_GL DMA1_IT_GL6 define sEE_I2C_DMA_FLAG_RX_TC DMA1_IT_TC7 define sEE_I2C_DMA_FLAG_RX_GL DMA1_IT_GL7 define sEE_I2C_DMA_CLK RCC_AHBPeriph_DMA1define sEE_I2C_DR_Address ((uint32_t)0x40005410)define sEE_USE_DMA define sEE_I2C_DMA_TX_IRQn DMA1_Channel6_IRQndefine sEE_I2C_DMA_RX_IRQn DMA1_Channel7_IRQndefine sEE_I2C_DMA_TX_IRQHandler DMA1_Channel6_IRQHandlerdefine sEE_I2C_DMA_RX_IRQHandler DMA1_Channel7_IRQHandler define sEE_I2C_DMA_PREPRIO 0define sEE_I2C_DMA_SUBPRIO 0 define sEE_DIRECTION_TX 0define sEE_DIRECTION_RX 1 /* Time constant for the delay caclulation allowing to have a millisecond incrementing counter. This value should be equal to (System Clock / 1000). ie. if system clock = 24MHz then sEE_TIME_CONST should be 24. */define sEE_TIME_CONST 48 void sEE_DeInit(void)。uint32_t sEE_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite)。t occur, bus errors, busy devices ...). You can use the default timeout callback implementation by unmenting the define USE_DEFAULT_TIMEOUT_CALLBACK in file. Typically the user implementation of this callback should reset I2C peripheral and reinitialize munication or in worst case reset all the application. */uint32_t sEE_TIMEOUT_UserCallback(void)。 __IO uint32_t sEETimeout = sEE_LONG_TIMEOUT。DMA_InitTypeDef sEEDMA_InitStructure。 /* sEE_I2C DeInit */ I2C_DeInit(sEE_I2C)。 GPIO_Init(sEE_I2C_SCL_GPIO_PORT, amp。GPIO_InitStructure)。 = DISABLE。 = sEE_I2C_DMA_PREPRIO。 /* Disable and Deinitialize the DMA channels */ DMA_Cmd(sEE_I2C_DMA_CHANNEL_TX, DISABLE)。}/** * brief Initialize
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1