sendstopbit.c

来自「AT90S8515读写AT17C010源程序」· C语言 代码 · 共 32 行

C
32
字号
// SendStopBit.c
// generates a stop bit
// assumes SCL is low
// stop bit is a 0 to 1 transition on SDA while SCL is high
/*
         ____________
        /
SCL ___/
    
               ______
              /
SDA _________/

*/

#include "at17c.h"
 
extern void WriteSCL(unsigned char state);
extern void WriteSDA(unsigned char state);
extern void BitDelay(void);
extern unsigned char SetSCLHigh(void);
            
void SendStopBit(void) {
    
    WriteSDA(0);
    BitDelay();
    SetSCLHigh();
    BitDelay();
    WriteSDA(1);
    BitDelay();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?