This circuit, from the Texas Instruments component datasheet, allows the switching current to be limited to two levels determined by the components. More information can be obtained in the datasheet where the circuit was taken from.