swd: Add frequency setting and special/switching sequences to the API