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