• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/input/joystick/iforce/

Lines Matching refs:effect

33  * Set the magnitude of a constant force effect
66 * Upload the component of an effect dealing with the period, phase and magnitude
104 * Uploads the part of an effect setting the envelope of the force
199 * Analyse the changes in an effect, and tell if we need to send an condition
208 warn("bad effect type in need_condition_modifier");
224 * Analyse the changes in an effect, and tell if we need to send a magnitude
227 static int need_magnitude_modifier(struct ff_effect *old, struct ff_effect *effect)
229 if (effect->type != FF_CONSTANT) {
230 warn("bad effect type in need_envelope_modifier");
234 return old->u.constant.level != effect->u.constant.level;
238 * Analyse the changes in an effect, and tell if we need to send an envelope
241 static int need_envelope_modifier(struct ff_effect *old, struct ff_effect *effect)
243 switch (effect->type) {
245 if (old->u.constant.envelope.attack_length != effect->u.constant.envelope.attack_length
246 || old->u.constant.envelope.attack_level != effect->u.constant.envelope.attack_level
247 || old->u.constant.envelope.fade_length != effect->u.constant.envelope.fade_length
248 || old->u.constant.envelope.fade_level != effect->u.constant.envelope.fade_level)
253 if (old->u.periodic.envelope.attack_length != effect->u.periodic.envelope.attack_length
254 || old->u.periodic.envelope.attack_level != effect->u.periodic.envelope.attack_level
255 || old->u.periodic.envelope.fade_length != effect->u.periodic.envelope.fade_length
256 || old->u.periodic.envelope.fade_level != effect->u.periodic.envelope.fade_level)
261 warn("bad effect type in need_envelope_modifier");
268 * Analyse the changes in an effect, and tell if we need to send a periodic
269 * parameter effect
274 warn("bad effect type in need_period_modifier");
284 * Analyse the changes in an effect, and tell if we need to send an effect
331 /* Stop effect */
336 /* If needed, restart effect */
346 * Upload a periodic effect to the device
349 int iforce_upload_periodic(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
352 int core_id = effect->id;
360 if (!old || need_period_modifier(old, effect)) {
363 effect->u.periodic.magnitude, effect->u.periodic.offset,
364 effect->u.periodic.period, effect->u.periodic.phase);
370 if (!old || need_envelope_modifier(old, effect)) {
373 effect->u.periodic.envelope.attack_length,
374 effect->u.periodic.envelope.attack_level,
375 effect->u.periodic.envelope.fade_length,
376 effect->u.periodic.envelope.fade_level);
382 switch (effect->u.periodic.waveform) {
391 if (!old || need_core(old, effect)) {
392 core_err = make_core(iforce, effect->id,
397 effect->replay.length,
398 effect->replay.delay,
399 effect->trigger.button,
400 effect->trigger.interval,
401 effect->direction);
414 * Upload a constant force effect
417 * 0 Ok, effect created or updated
418 * 1 effect did not change since last upload, and no packet was therefore sent
420 int iforce_upload_constant(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
422 int core_id = effect->id;
430 if (!old || need_magnitude_modifier(old, effect)) {
433 effect->u.constant.level);
439 if (!old || need_envelope_modifier(old, effect)) {
442 effect->u.constant.envelope.attack_length,
443 effect->u.constant.envelope.attack_level,
444 effect->u.constant.envelope.fade_length,
445 effect->u.constant.envelope.fade_level);
451 if (!old || need_core(old, effect)) {
452 core_err = make_core(iforce, effect->id,
457 effect->replay.length,
458 effect->replay.delay,
459 effect->trigger.button,
460 effect->trigger.interval,
461 effect->direction);
474 * Upload an condition effect. Those are for example friction, inertia, springs...
476 int iforce_upload_condition(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old)
478 int core_id = effect->id;
486 switch (effect->type) {
492 if (!old || need_condition_modifier(old, effect)) {
495 effect->u.condition[0].right_saturation,
496 effect->u.condition[0].left_saturation,
497 effect->u.condition[0].right_coeff,
498 effect->u.condition[0].left_coeff,
499 effect->u.condition[0].deadband,
500 effect->u.condition[0].center);
507 effect->u.condition[1].right_saturation,
508 effect->u.condition[1].left_saturation,
509 effect->u.condition[1].right_coeff,
510 effect->u.condition[1].left_coeff,
511 effect->u.condition[1].deadband,
512 effect->u.condition[1].center);
519 if (!old || need_core(old, effect)) {
520 core_err = make_core(iforce, effect->id,
523 effect->replay.length, effect->replay.delay,
524 effect->trigger.button, effect->trigger.interval,
525 effect->direction);