- /* returns the KHz for the provided JTAG speed. 0=RTCK. The function returns
- * a failure if it can't support the KHz/RTCK. */
+ /**
+ * Calculate the clock frequency (in KHz) for the given @a speed.
+ * @param speed The desired interface speed setting.
+ * @param khz On return, contains the speed in KHz (0 for RTCK).
+ * @returns ERROR_OK on success, or an error code if the
+ * interface cannot support the specified speed (KHz or RTCK).
+ */