Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| microcontrollertechnik:software_i2c_slave [2021/06/20 23:50] – angelegt tfischer | microcontrollertechnik:software_i2c_slave [2023/12/19 17:36] (current) – mexleadmin | ||
|---|---|---|---|
| Line 52: | Line 52: | ||
| // Konstanten | // Konstanten | ||
| - | #define SET_BIT(PORT, BIT) ((PORT) |= (1 << (BIT))) // Port-Bit Zustand setzen | + | # |
| - | #define CLR_BIT(PORT, BIT) ((PORT) &= ~(1 << (BIT))) // Port-Bit Zustand loeschen | + | #define CLR_BIT(BYTE, BIT) ((BYTE) &= ~(1 << (BIT))) // Bit Zustand |
| - | #define TGL_BIT(PORT, BIT) ((PORT) ^= (1 << (BIT))) // Port-Bit Zustand wechseln (toggle) | + | #define TGL_BIT(BYTE, BIT) ((BYTE) ^= (1 << (BIT))) // Bit Zustand |
| /// Port for the I2C | /// Port for the I2C | ||
| Line 188: | Line 188: | ||
| TWAR_soft = (Address<< | TWAR_soft = (Address<< | ||
| TWAMR_soft= AddressMask; | TWAMR_soft= AddressMask; | ||
| - | TWCR_soft = (1<< | + | TWCR_soft = (1<< |