This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DDRD (R/W) pin direction (0 = INPUT / 1 = OUTPUT) | |
// PORTD (R/W) pin state (INPUT: 0 = LOW / 1 = HIGH | OUTPUT: 0 = PULL-UP DIACTIVATED / 1 = PULL-UP ACTIVATED) | |
// PIND (R) pin state (INPUT ONLY: 0 = LOW / 1 = HIGH) | |
// bit(n) // calculates value of n-th bit (returns: 0 / 1) | |
// bitRead(byteName, n) // gets value of n-th bit of byte (returns: 0 / 1) | |
// bitSet(byteName, n) // sets value of n-th bit of byte to 1 | |
// bitClear(byteName, n) // sets value of n-th bit of byte to 0 | |
// bitWrite(byteName, n, val) // sets value of n-th bit of byte to 0 or 1 |