Doxtest
1
|
I2C Bus Master Driver Implementation. More...
Go to the source code of this file.
Macros | |
Delay Macros | |
These macros must be adjusted to the actual target hardware. | |
#define | delay_1us() { _nop(); _nop(); } |
Delay execution for 1us. More... | |
#define | delay_2us() { delay_1us(); delay_1us(); } |
Delay execution for 2us. More... | |
I/O Port Access Macros | |
These macros must be adjusted to the actual target hardware. | |
#define | set_sda(state) |
Set SDA Output State. More... | |
#define | get_sda() IO_I2C_SDA |
Read SDA Input State. More... | |
#define | set_scl(state) |
Set SCL Output State. More... | |
Bit Transfer Macros | |
The bit transfer operations are implemented as macros to reduce the call overhead. | |
#define | write_bit(databit) |
Output a bit. More... | |
#define | read_bit(databit) |
Read a bit. More... | |
Functions | |
Public Functions | |
Documentation is found in module header | |
void | i2c_start (void) |
void | i2c_stop (void) |
bool | i2c_write (uint8 data) |
uint8 | i2c_read (ack_t ack) |
I2C Bus Master Driver Implementation.
Customer: Source Graphics
Project: Cafissimo 1B
Controller: Holtek HT46x232
Compiler: Holtek C 2.02
Created: 02.09.2005 Peter Horn, Micropool GmbH
Copyright: (C) Micropool GmbH
Definition in file i2c.c.
#define delay_1us | ( | ) | { _nop(); _nop(); } |
#define set_sda | ( | state) |
#define get_sda | ( | ) | IO_I2C_SDA |
#define set_scl | ( | state) |
#define write_bit | ( | databit) |
#define read_bit | ( | databit) |
Read a bit.
databit | lvalue to receive the read bit (e.g. name of a variable) |
_______ SCL ____/ 2us _ __________ __ SDA _X__________X__ ^- Sampling Point