亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dev_i2c_io.c

?? i2c總線接口驅(qū)動(dòng)程序
?? C
字號(hào):
/*===========================================================================    Copyright 2000, 2001 Holley Communications. All rights reserved.*//***************************************************************************** * * DEV_I2C_IO.C - I2C Interface: Hardware Interface * * PURPOSE: *    To provide hardware control of the low-level Inter-IC (I2C) signalling. *    This file provides functions to set and read the state of the two I2C *    control signals SCL (serial clock) and SDA (serial data). * * HISTORY: *    V 1.00 - Sep 25, 1997 - E.Schmidt    *             Creation *           - Apr 22, 1998 - G.Catt       *             Updated for use on the CDMA+ platform. *           - May 06, 1998 - G.Catt       *             Removed remnants of the I/O-mapped version. *           - May 11, 1998 - G.Catt       *             Initialized SDA and SCL output states to 'low' values *             and ensure pull-up 'high' is performed by switching to *             GPIO input mode. *             Reversed change because it didn't work. *           - May 12, 1998 - G.Catt       *             Removed extraneous code. *           - May 25, 1998 - G.Catt       *             Added logic to the signal initialization to set the SCL *             and SDA GPIO line directions to the output state prior setting *             their respective data latches to the '0' state for all time. *           - May 26, 1998 - G.Catt       *             Restored the logic to set the GPIO data latches to '0' *             when asserting either SDA or SCL because it is not possible *             to read the value of the data latch when the port is in *             input mode. * * GLOBAL FUNCTIONS: *    None * * LOCAL FUNCTIONS: *    'dev_i2c_io_initialize' - I2C I/O Signal Initialization *    'dev_i2c_io_scllow'   - Drive SCL Signal Low *    'dev_i2c_io_scltristate' - Tri-state the SCL Signal *    'dev_i2c_io_sdalow'   - Drive SDA Signal Low *    'dev_i2c_io_sdatristate' - Tri-state the SDA Signal *    'dev_i2c_io_sclstate' - Get SCL Signal State *    'dev_i2c_io_sdastate' - Get SDA Signal State * * INTERNAL FUNCTIONS: *    None * * NOTE: *    The I2C signalling relies on the application of external pull-up *    resistors to ensure that the slave devices see 'high' levels when *    this logic tri-states a specific signal. * * *****************************************************************************//* ------------------ D e f i n i t i o n   F i l e s --------------------- */#include "main_system.h"            /* System Environment */#include "main_config.h"#include "main_io_cdmap.h"#include "pub_PIO.h"#include "dev_I2c_Global.h"             /* Global definitions */#include "dev_i2c_local.h"              /* Local definitions */#include "dev_i2c_io.h"                 /* Internal definitions *//* ------------------------ L o c a l   D a t a --------------------------- *//* --------------------- I n t e r n a l   D a t a ------------------------ *//***************************************************************************** * * DEV_I2C_IO_INITIALIZE - I2C I/O Signal Initialization * * PURPOSE: *    To initialize the initial hardware state of the I2C signalling *    subsystem. Both control signal lines (SDA and SCL) are tri-stated *    to allow the initial bus state to be analyzed. * * PARAMETERS: *    None * * RETURNS: *    DEV_I2C_RETCODE_SUCCESS   => I2C signals are ready for use *    DEV_I2C_RETCODE_IOINITERR => I/O line initialization error (not used) * * NOTE: *    The signal data port latches are pre-initialized to the 'zero' *    (asserted) state. This ensures that in order to assert either the *    SCL or the SDA signal in subsequent signalling operations only *    the respective GPIO direction register bit needs to be set to *    the output state. * *****************************************************************************/void dev_i2c_io_initialize ( void ){    /*--- Pre-set the GPIO data port latches with zeroes ---*/    /* Ensure that the SCL GPIO line is an output */    SET_DIR_SCL(PIO_OUTPUT);       /* Pre-set the serial clock line (SCL) output value to 'Low' */    WRITE_SCL(PIO_LOW);       /* Ensure that the SDA GPIO line is an output */    SET_DIR_SDA(PIO_OUTPUT);       /* Pre-set the serial data line (SDA) output value 'Low' */    WRITE_SDA(PIO_LOW);       /* Ensure that the serial clock line (SCL) is an input (tri-stated) */    dev_i2c_io_scltristate ();    /* Ensure that the serial data line  (SDA) is an input (tri-stated) */    dev_i2c_io_sdatristate ();#if BOARD_PHOENIX    /* Ensure that the SLAVE_I2C_MUTE GPIO line is an input */    DEV_PIO_SetInput(UIM_SLAVE_I2C_MUTE);      #if UIM_ENABLED    DEV_PIO_SetOutput(UIM_WAKEUP_SLAVE);       DEV_PIO_WRITE_HIGH(UIM_WAKEUP_SLAVE);    DEV_PIO_SetOutput(UIM_SHUTDOWN);       DEV_PIO_WRITE_HIGH(UIM_SHUTDOWN);#else    DEV_PIO_SetInput(UIM_WAKEUP_SLAVE);       DEV_PIO_SetOutput(UIM_SHUTDOWN);       DEV_PIO_WRITE_LOW(UIM_SHUTDOWN);#endif#endif} /***************************************************************************** * * DEV_I2C_IO_SCLSTATE - Get SCL Signal State * * PURPOSE: *    To determine the current state of the serial clock signal (SCL). The *    I/O line is first tri-stated and then its value is read via the GPIO *    data port. * * PARAMETERS: *    None * * RETURNS: *    DEV_I2C_SIGNAL_INACTIVE => SCL signal is not being driven *    DEV_I2C_SIGNAL_ASSERT   => SCL signal is asserted * * NOTE: *    Once the signal is tri-stated it will be pulled high by external *    resistors if not driven low by a slave device. *     *****************************************************************************/Bool dev_i2c_io_sclstate ( void ){   /* Tri-state the SCL line */   dev_i2c_io_scltristate ();   /* If the SCL line is high */   if ( READ_SCL() )   {      /* ... the signal is inactive */      return ( DEV_I2C_SIGNAL_INACTIVE );   }   else   {      /* ... the signal is asserted */      return ( DEV_I2C_SIGNAL_ASSERT );   }}/***************************************************************************** * * DEV_I2C_IO_SDASTATE - Get SDA Signal State * * PURPOSE: *    To determine the current state of the serial data line (SDA). The *    I/O line is first tri-stated and then its value is read via the GPIO *    data port. * * PARAMETERS: *    None * * RETURNS: *    DEV_I2C_SIGNAL_INACTIVE => SDA signal is not being driven *    DEV_I2C_SIGNAL_ASSERT   => SDA signal is asserted * * NOTE: *    Once the signal is tri-stated it will be pulled high by external *    resistors if not driven low by a slave device. *     *****************************************************************************/Bool dev_i2c_io_sdastate ( void ){   /* Tri-state the SDA line */   dev_i2c_io_sdatristate ();   /* If the SDA line is high */   if ( READ_SDA() )   {      /* ... the signal is inactive */      return ( DEV_I2C_SIGNAL_INACTIVE );   }   else   {      /* ... the signal is asserted */      return ( DEV_I2C_SIGNAL_ASSERT );   }}/***************************************************************************** * * DEV_SLAVE_I2C_MUTE_STATE - Get SLAVE_I2C_MUTE Signal State * * PURPOSE: * * PARAMETERS: *    None * * RETURNS: *    DEV_I2C_SIGNAL_INACTIVE => SLAVE_I2C_MUTE signal is not being driven *    DEV_I2C_SIGNAL_ASSERT   => SLAVE_I2C_MUTE signal is asserted * * NOTE: *****************************************************************************/Bool dev_slave_i2c_mute_state ( void ){   if ( READ_I2C_SLAVE_MUTE() )   {      /* ... the signal is inactive */      return ( DEV_I2C_SIGNAL_INACTIVE );   }   else   {      /* ... the signal is asserted */      return ( DEV_I2C_SIGNAL_ASSERT );   }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色av一区二区| 日韩欧美123| 久久精品国产久精国产| 国产精品久久久久久久久久久免费看 | 色婷婷亚洲综合| 国产中文字幕精品| 性久久久久久久久久久久| 国产精品国产三级国产三级人妇 | 成人av在线看| 极品少妇一区二区三区精品视频| 亚洲免费观看高清完整版在线观看熊 | 亚洲免费资源在线播放| 久久久激情视频| 日韩午夜中文字幕| 欧美色网站导航| caoporn国产一区二区| 欧美a级一区二区| 一区二区三区免费在线观看| 国产欧美精品日韩区二区麻豆天美| 欧美人狂配大交3d怪物一区| 91女神在线视频| 丁香六月久久综合狠狠色| 精品一区二区在线观看| 偷拍自拍另类欧美| 一区二区在线免费观看| 日韩伦理电影网| 国产欧美一区二区三区鸳鸯浴| 欧美一级片在线看| 欧美一级一区二区| 91精品国产综合久久精品图片| 色偷偷88欧美精品久久久| 成人福利视频网站| 成人黄色av电影| 成人免费观看视频| 岛国精品一区二区| 丁香啪啪综合成人亚洲小说| 国产精品影音先锋| 国产99精品国产| 国产成人av电影在线播放| 国产一区二区三区免费看| 美国精品在线观看| 狠狠色狠狠色综合日日91app| 久久精品国产一区二区三| 蜜桃精品视频在线| 精品亚洲成a人在线观看| 国产一区亚洲一区| 国产成人午夜视频| 99v久久综合狠狠综合久久| 色先锋aa成人| 欧美欧美欧美欧美| 精品播放一区二区| 国产拍揄自揄精品视频麻豆| 国产精品沙发午睡系列990531| 中文字幕一区二区三区不卡在线 | 一级中文字幕一区二区| 亚洲午夜在线视频| 日韩av中文字幕一区二区三区| 麻豆成人综合网| 国产成人精品三级麻豆| 99久久99久久精品免费看蜜桃| 91久久奴性调教| 91 com成人网| 久久麻豆一区二区| 一区二区三区丝袜| 蜜桃av一区二区在线观看| 国产成人精品亚洲日本在线桃色| 91视视频在线观看入口直接观看www | 亚洲成a人在线观看| 麻豆国产精品一区二区三区| 丁香六月综合激情| 欧美日韩国产三级| 国产调教视频一区| 一区二区三区高清在线| 蜜桃av一区二区| aaa欧美大片| 91精品国产色综合久久久蜜香臀| 久久亚洲一区二区三区四区| 国产色综合久久| 亚洲精品乱码久久久久久日本蜜臀| 视频精品一区二区| 成人动漫在线一区| 4438成人网| 中文字幕在线播放不卡一区| 天堂va蜜桃一区二区三区| 国产九九视频一区二区三区| 欧美在线视频日韩| 国产午夜一区二区三区| 亚洲一区二区中文在线| 国产精品一区三区| 欧美日本一区二区三区四区| 国产日韩精品一区二区浪潮av | 日韩av中文在线观看| 粉嫩13p一区二区三区| 91精品国模一区二区三区| 国产精品日韩精品欧美在线| 日本一区中文字幕| 色婷婷综合久久久中文字幕| 久久久五月婷婷| 日本成人中文字幕在线视频| 99在线精品免费| 久久婷婷成人综合色| 午夜影院久久久| 91在线云播放| 国产亚洲精品资源在线26u| 香蕉乱码成人久久天堂爱免费| 不卡的av网站| www久久久久| 日韩一区精品字幕| 色噜噜狠狠色综合欧洲selulu| 久久一区二区三区四区| 日韩电影在线观看一区| 欧美在线色视频| 日韩美女精品在线| 成人avav影音| 中文字幕免费观看一区| 韩国欧美国产1区| 欧美一区二区三区小说| 亚洲一区二区四区蜜桃| 色综合激情五月| 中文字幕欧美一区| 成人精品视频一区二区三区| 久久久www成人免费无遮挡大片| 日韩国产一区二| 欧美顶级少妇做爰| 午夜私人影院久久久久| 欧美在线不卡视频| 亚洲激情第一区| 在线欧美一区二区| 夜夜爽夜夜爽精品视频| 色噜噜狠狠一区二区三区果冻| 亚洲人123区| 91精品福利在线| 一区二区三区中文字幕精品精品 | 久久久综合视频| 九九九精品视频| 日韩精品自拍偷拍| 久久国产麻豆精品| 91精品国产色综合久久不卡电影| 亚洲午夜av在线| 欧美日韩国产在线播放网站| 亚洲高清一区二区三区| 欧美日韩一区久久| 亚洲高清免费观看| 7777精品伊人久久久大香线蕉经典版下载 | 欧美变态tickle挠乳网站| 麻豆精品久久久| 久久久99久久| 成人小视频免费在线观看| 国产精品久久久久精k8| 91麻豆成人久久精品二区三区| 亚洲欧美一区二区三区极速播放| 91在线视频播放地址| 一区二区三区精品久久久| 欧美日韩亚洲高清一区二区| 日韩和欧美一区二区三区| 日韩精品一区二区在线| 国产成人精品三级麻豆| 亚洲视频香蕉人妖| 欧美日韩国产另类一区| 久草在线在线精品观看| 日本一区二区三区高清不卡 | 精品国产sm最大网站| 国产白丝精品91爽爽久久| 亚洲日本乱码在线观看| 欧美日韩成人一区二区| 激情文学综合网| 综合色天天鬼久久鬼色| 欧美特级限制片免费在线观看| 日韩av电影天堂| 国产亚洲成av人在线观看导航 | 欧美久久高跟鞋激| 国产一区啦啦啦在线观看| 1000部国产精品成人观看| 欧美日韩不卡一区二区| 国产盗摄一区二区三区| 一区二区三区成人| 精品剧情在线观看| 一本到高清视频免费精品| 久久爱www久久做| 亚洲欧美另类久久久精品| 欧美一级精品大片| 99久久精品一区| 久久精品99国产精品日本| 国产精品电影院| 日韩美一区二区三区| 色婷婷久久一区二区三区麻豆| 毛片av中文字幕一区二区| 亚洲欧美日韩国产手机在线 | 日韩毛片精品高清免费| 日韩欧美资源站| 一本色道a无线码一区v| 蜜臀精品久久久久久蜜臀| 曰韩精品一区二区| 国产亚洲美州欧州综合国| 777久久久精品| 99国产精品一区| 国产精品一区二区91| 青椒成人免费视频| 一个色综合av| 亚洲丝袜另类动漫二区|