Main Page Data Structures File List Data Fields Globals Related Pages

# clib/i2c_api.c File Reference

`#include <dos.h>`
`#include <stdio.h>`
`#include "I2C_API.H"`

Go to the source code of this file.

## Functions
void | I2C_init (void)
void | I2C_release (void)
void | I2C_restart (void)
unsigned char | I2C_scan (unsigned char start_addr, unsigned char end_addr)
int | I2C_transmit_block (unsigned char slave, char far *buffer, int length)
int | I2C_receive_block (unsigned char slave, char far *buffer, int length)
int | I2C_transmit_char (unsigned char slave, char c)
int | I2C_receive_char (unsigned char slave, char *c, unsigned char lastchar)
void | I2C_select_clock_pin (unsigned char pio_no)
void | I2C_select_data_pin (unsigned char pio_no)

## Function Documentation

void I2C_init | ( | void |  | ) |

| Definition at line 63 of file i2c_api.c. References I2C_INIT, and I2CINT.

int I2C_receive_block | ( | unsigned char | slave,
|  | char far * | buffer,
|  | int | length
| ) |

| Definition at line 151 of file i2c_api.c. References I2C_TRANS_RECV_BLOCK, and I2CINT.

int I2C_receive_char | ( | unsigned char | slave,
|  | char * | c,
|  | unsigned char | lastchar
| ) |

| Definition at line 198 of file i2c_api.c. References I2C_TRANS_RECV_CHAR, and I2CINT.

void I2C_release | ( | void |  | ) |

| Definition at line 78 of file i2c_api.c. References I2C_RELEASE, and I2CINT.

void I2C_restart | ( | void |  | ) |

| Definition at line 93 of file i2c_api.c. References I2C_RESTART, and I2CINT.

unsigned char I2C_scan | ( | unsigned char | start_addr,
|  | unsigned char | end_addr
| ) |

| Definition at line 108 of file i2c_api.c. References I2C_SCAN, and I2CINT.

void I2C_select_clock_pin | ( | unsigned char | pio_no | ) |

| Definition at line 228 of file i2c_api.c. References I2C_SELECT_CLK_PIN, and I2CINT.

void I2C_select_data_pin | ( | unsigned char | pio_no | ) |

| Definition at line 241 of file i2c_api.c. References I2C_SELECT_DATA_PIN, and I2CINT.

int I2C_transmit_block | ( | unsigned char | slave,
|  | char far * | buffer,
|  | int | length
| ) |

| Definition at line 126 of file i2c_api.c. References I2C_TRANS_RECV_BLOCK, and I2CINT.

int I2C_transmit_char | ( | unsigned char | slave,
|  | char | c
| ) |

| Definition at line 177 of file i2c_api.c. References I2C_TRANS_RECV_CHAR, and I2CINT.