Configurable 0, 90, 180 and 270 degree rotation

Change-Id: Ia1859c51d71ef9d01cec2d13c6468ed89c6ac53e
Contributor: jonasl