Thanks everyone for the answers. Do I understand it correctly that in fact in all 3 common types of flahslight driver, buck, boost, and CC, it is the current that is programmed/set by the designer, and an MCU adjusts voltage to maintain this current?

LED drivers are basically “constant current”, not “constant voltage” driver? TIA.