How does the torque control work?

I understand that on the Odrive you are controlling the torque by controlling the amount of current but how is the current control actually implemented in hardware and software? I do not see a digital potentiometer in the circuit so then how is the current being controlled? Please let me know the theory behind it.

It’s using Field Oriented Control