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

正文內(nèi)容

智能酒駕檢測系統(tǒng)概述-資料下載頁

2025-06-29 03:08本頁面
  

【正文】 M7705_Delay()。 read = read1。 if (DO_IS_HIGH()) { read++。 } SCK_1()。 TM7705_Delay()。 } return read。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_WriteByte* 功能說明: 寫入1個字節(jié)。帶CS控制* 形 參: _data :將要寫入的數(shù)據(jù)* 返 回 值: 無**********************************************************************************************************/static void TM7705_WriteByte(uint8_t _data){ CS_0()。 TM7705_Send8Bit(_data)。 CS_1()。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_Write3Byte* 功能說明: 寫入3個字節(jié)。帶CS控制* 形 參: _data :將要寫入的數(shù)據(jù)* 返 回 值: 無**********************************************************************************************************/static void TM7705_Write3Byte(uint32_t _data){ CS_0()。 TM7705_Send8Bit((_data 16) amp。 0xFF)。 TM7705_Send8Bit((_data 8) amp。 0xFF)。 TM7705_Send8Bit(_data)。 CS_1()。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_ReadByte* 功能說明: 從AD芯片讀取一個字(16位)* 形 參: 無* 返 回 值: 讀取的字(16位)**********************************************************************************************************/static uint8_t TM7705_ReadByte(void){ uint8_t read。 CS_0()。 read = TM7705_Recive8Bit()。 CS_1()。 return read。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_Read2Byte* 功能說明: 讀2字節(jié)數(shù)據(jù)* 形 參: 無* 返 回 值: 讀取的數(shù)據(jù)(16位)**********************************************************************************************************/static uint16_t TM7705_Read2Byte(void){ uint16_t read。 CS_0()。 read = TM7705_Recive8Bit()。 read = 8。 read += TM7705_Recive8Bit()。 CS_1()。 return read。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_Read3Byte* 功能說明: 讀3字節(jié)數(shù)據(jù)* 形 參: 無* 返 回 值: 讀取到的數(shù)據(jù)(24bit) 高8位固定為0.**********************************************************************************************************/static uint32_t TM7705_Read3Byte(void){ uint32_t read。 CS_0()。 read = TM7705_Recive8Bit()。 read = 8。 read += TM7705_Recive8Bit()。 read = 8。 read += TM7705_Recive8Bit()。 CS_1()。 return read。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_WaitDRDY* 功能說明: 等待內(nèi)部操作完成。 自校準時間較長,需要等待。* 形 參: 無* 返 回 值: 無**********************************************************************************************************/static void TM7705_WaitDRDY(void){ uint32_t i。 for (i = 0。 i 8000。 i++) { if (DRDY_IS_LOW()) { break。 } } if (i = 8000) { // printf(TM7705_WaitDRDY() 芯片應答超時 ...\r\n)。 /* 調(diào)試語句. 用語排錯 */ // printf(重新同步SPI接口時序\r\n)。 /* 調(diào)試語句. 用語排錯 */ TM7705_SyncSPI()。 /* 同步SPI接口時序 */ bsp_DelayMS(5)。 }}/*********************************************************************************************************** 函 數(shù) 名: TM7705_WriteReg* 功能說明: 寫指定的寄存器* 形 參: _RegID : 寄存器ID* _RegValue : 寄存器值。 對于8位的寄存器,取32位形參的低8bit* 返 回 值: 無**********************************************************************************************************/void TM7705_WriteReg(uint8_t _RegID, uint32_t _RegValue){ uint8_t bits。 switch (_RegID) { case REG_COMM: /* 通信寄存器 */ case REG_SETUP: /* 設置寄存器 8bit */ case REG_CLOCK: /* 時鐘寄存器 8bit */ bits = 8。 break。 case REG_ZERO_CH1: /* CH1 偏移寄存器 24bit */ case REG_FULL_CH1: /* CH1 滿量程寄存器 24bit */ case REG_ZERO_CH2: /* CH2 偏移寄存器 24bit */ case REG_FULL_CH2: /* CH2 滿量程寄存器 24bit*/ bits = 24。 break。 case REG_DATA: /* 數(shù)據(jù)寄存器 16bit */ default: return。 } TM7705_WriteByte(_RegID | WRITE)。 /* 寫通信寄存器, 指定下一步是寫操作,并指定寫哪個寄存器 */ if (bits == 8) { TM7705_WriteByte((uint8_t)_RegValue)。 } else /* 24bit */ { TM7705_Write3Byte(_RegValue)。 }}/*********************************************************************************************************** 函 數(shù) 名: TM7705_ReadReg* 功能說明: 寫指定的寄存器* 形 參: _RegID : 寄存器ID* _RegValue : 寄存器值。 對于8位的寄存器,取32位形參的低8bit* 返 回 值: 讀到的寄存器值。 對于8位的寄存器,取32位形參的低8bit****************************************************************/uint32_t TM7705_ReadReg(uint8_t _RegID){ uint8_t bits。 uint32_t read。 switch (_RegID) { case REG_COMM: /* 通信寄存器 */ case REG_SETUP: /* 設置寄存器 8bit */ case REG_CLOCK: /* 時鐘寄存器 8bit */ bits = 8。 break。 case REG_ZERO_CH1: /* CH1 偏移寄存器 24bit */ case REG_FULL_CH1: /* CH1 滿量程寄存器 24bit */ case REG_ZERO_CH2: /* CH2 偏移寄存器 24bit */ case REG_FULL_CH2: /* CH2 滿量程寄存器 24bit*/ bits = 24。 break。 case REG_DATA: /* 數(shù)據(jù)寄存器 16bit */ default: return 0xFFFFFFFF。 } TM7705_WriteByte(_RegID | READ)。 /* 寫通信寄存器, 指定下一步是寫操作,并指定寫哪個寄存器 */ if (bits == 16) { read = TM7705_Read2Byte()。 } else if (bits == 8) { read = TM7705_ReadByte()。 } else /* 24bit */ { read = TM7705_Read3Byte()。 } return read。}/*********************************************************************************************************** 函 數(shù) 名: TM7705_CalibSelf* 功能說明: 啟動自校準. 內(nèi)部自動短接AIN+ AIN校準0位,內(nèi)部短接到Vref 校準滿位。此函數(shù)執(zhí)行過程較長,* 實測約 180ms* 形 參: _ch : ADC通道,1或2* 返 回 值: 無**********************************************************************************************************/void TM7705_CalibSelf(uint8_t _ch){ if (_ch == 1) { /* 自校準CH1 */ TM7705_WriteByte(REG_SETUP | WRITE | CH_1)。 /* 寫通信寄存器,下一步是寫設置寄存器,通道1 */ TM7705_WriteByte(MD_CAL_SELF | __CH1_GAIN_BIPOLAR_BUF | FSYNC_0)。/* 啟動自校準 */ TM7705_WaitDRDY()。 /* 等待內(nèi)部操作完成 時間較長,約180ms */ } else if (_ch == 2) { /* 自校準CH2 */ TM7705_WriteByte(REG_SETUP | WRITE | CH_2)。 /* 寫通信
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1