Added command-line options
Added pin-mode "generic"