Added functions for using frequency and %-duty cycle

Added "_ns" suffix for existing methods and "_percent" for new methods
Removed debugging output
Make polarity an enum-type.
Use unsigned int for period, dutycycles and frequency
forgot one unsigned int
Remove unused return values, add exceptions where suitable
Change example program accordingly
correct wrong value for duty_percent
Fixes after testing
Merge pull request #1 from thesummer/upstream

Upstream