?? upsd_i2c.h
字號(hào):
/*----------------------------------------------------------------------------
Title: upsd_i2c.h
Date: October 7, 2002
Author: Alec Bath
Description:
Function prototypes for upsd_i2c.c I2C Routines
Copyright 2002 ST Microelectronics
----------------------------------------------------------------------------*/
#ifndef _UPSD_I2C_H_
#define _UPSD_I2C_H_
void upsd_i2c_init (void);
void upsd_i2c_xmit (unsigned char i2c_address, unsigned char start_address, unsigned char data_len);
void upsd_i2c_rcv (unsigned char i2c_address, unsigned char start_address, unsigned char data_len);
void i2c_wait_for_int (void);
// S2STA equates:
#define GCALL 0x80 // Gen. Call flag
#define STOP 0x40 // Stop cond. flag
#define INTR 0x20 // Interrupt cond flag
#define TX_MODE 0x10 // I2C Tx mode flag
#define BBUSY 0x08 // Bus Busy flag
#define BLOST 0x04 // Bus Lost flag
#define _ACKREP 0x02 // ACK response flag
#define SLV 0x01 // Slave Mode flag
// S2CON Equates:
#define CR2 0x80 //
#define ENI 0x40 //
#define STA 0x20 //
#define STO 0x10 //
#define ADDR 0x08 //
#define AA 0x04 //
#define CR1 0x02 //
#define CR0 0x01 //
#define dummy 0xff // dummy byte to send - needs to be FFH
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -