---
name: "struct_ff_effect"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/struct_ff_effect"
---

# struct\_ff\_effect(9)

defines force feedback effect

## NAME

struct\_ff\_effect - defines force feedback effect

## SYNOPSIS

```
struct ff_effect {
  __u16 type;
  __s16 id;
  __u16 direction;
  struct ff_trigger trigger;
  struct ff_replay replay;
  union u;
};
```

## MEMBERS

type

type of the effect (FF\_CONSTANT, FF\_PERIODIC, FF\_RAMP, FF\_SPRING, FF\_FRICTION, FF\_DAMPER, FF\_RUMBLE, FF\_INERTIA, or FF\_CUSTOM)

id

an unique id assigned to an effect

direction

direction of the effect

trigger

trigger conditions (struct ff\_trigger)

replay

scheduling of the effect (struct ff\_replay)

u

effect-specific structure (one of ff\_constant\_effect, ff\_ramp\_effect, ff\_periodic\_effect, ff\_condition\_effect, ff\_rumble\_effect) further defining effect parameters

## DESCRIPTION

This structure is sent through ioctl from the application to the driver. To create a new effect application should set its *id* to -1; the kernel will return assigned *id* which can later be used to update or delete this effect.

## DIRECTION OF THE EFFECT IS ENCODED AS FOLLOWS

0 deg -\> 0x0000 (down) 90 deg -\> 0x4000 (left) 180 deg -\> 0x8000 (up) 270 deg -\> 0xC000 (right)

## COPYRIGHT
