avr: Added new stuff.

Added some code I've written for various reasons.