Current limiter for NiMH battery charger
You may be looking for something more like a battery charger IC rather than a buck regulator IC.  Basically a buck regulator that better understands current limit mode, which also includes charge termination and other battery protections in the same IC.

However, these are generally meant to operate standalone, so they might not give you the opportunity to program your own MCU code.  Still, you can learn what features you might want to aim for in your own circuit by checking out what such a solution typically offers, and why they are important.  For example:
http://para.maximintegrated.com/results.mvp?fam=batt_chrg&amp;168=NiCd|NiMH