A multifunction device for an undercarriage. The device comprises at least a first shaft rotatably mounted on the aircraft to rotate about an axis of rotation that is substantially parallel to a hinge axis hinging the undercarriage to the aircraft, and a telescopic second shaft rotatably mounted in the undercarriage and extending down along the undercarriage to the proximity of wheels carried thereby. A motor is adapted to cause the first shaft to rotate. The telescopic second shaft is a single shaft that extends inside the undercarriage to the proximity of an axle carrying the wheels of the undercarriage. The second shaft is connected to a differential connected to the wheels via drive shafts extending inside the axle.