P0340 = Camshaft position sensor.
Easy fix if that's the problem. The timing belt breaking will also send various fault codes like that and Crankshaft position sensor because everything stops turning and the sensors aren't able to send a signal to the computer.
The Camshaft position sensor is on the top right side of the engine. Easy to change out and costs somewhere around $40 (I think).