Skip to content

Instantly share code, notes, and snippets.

@NearLinHere
Last active August 29, 2015 14:14
Show Gist options
  • Save NearLinHere/b7ec7ecc613214f24c63 to your computer and use it in GitHub Desktop.
Save NearLinHere/b7ec7ecc613214f24c63 to your computer and use it in GitHub Desktop.
#include <avr/io.h>
PORC |= _BV(0); //PORTC |= (1 << 0); // Set bit 0 only
PORCT &= ~_BV(1); //PORTC &= ~(1 << 1); // Clear bit 1 only
PORTC ^= _BV(4); //PORTC ^= (1 << 4); // Toggle bit 4 only.
PORTC |= _BV(7); //PORTC |= (1 << 7); // Set bit 7 only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment