here you go

Make sure your RobotC is set to NXT and TETRIX mode and also go to motor and sensors setup and configure you motors to how you have them set up.
#include "joystickdriver.c"
task main ()
{
{
getJoystickSettings(joystick);
motor[motorD] = joystick.joy1_y1;
motor[motorE] = joystick.joy1_y2;
}
}