| 
  • This workspace has been inactive for over 11 months, and is scheduled to be reclaimed. Make an edit or click here to mark it as active.
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions! Dokkio, a new product from the PBworks team, integrates and organizes your Drive, Dropbox, Box, Slack and Gmail files. Sign up for free.

View
 

fipmodule

Page history last edited by PBworks 11 years, 8 months ago

fipmodule

fipmodule (fipmodule.o) is a remote control and front panel driver module.

Version: 2.3

Status: Done

 



 

Description

 

FIP stands for "Front Interface Panel". fipmodule offers a standard way to deal with the keys, LEDs and IR sensor, using /dev/fip device. A GPLed version of this module for the MG-35 is here. A user mode driver is available here.

 

Usage

 

Loading the module

 

To insert the module, use the insmod command:

 

insmod /fipmodule.o

 

Unloading the module

 

To remove the module, use the rmmod command:

 

rmmod fipmodule

 

Key codes

 

These codes are used by the ADD_KEY, INS_KEY and GET_KEY device commands.

 

Low word

0x807F keypad
0x7F80 IR key

 

High word

Enter EA15
Up ED12
Down EC13
Right E916
Power FF00 (action taken by fip processor!)
Play B649
Stop B748
Menu A758
Title E817
Setup EE11
Angle A659
Repeat A857
A+B F40b
Slow B24d
File Info F609
Time Search A55a
Br Cont F30C
Media Type A35C
Main Page E41B
Rew EF10
FF B14E
Prev E01F
Next Bc43
Video F906
Audio F807
Subtitle FD02
ScrSize Fc03
1 E31C
2 E21D
3 E11E
Vol + B54A
4 BF40
5 BE41
6 BD42
Vol - F708
7 BB44
8 Ba45
9 B946
Mute A956
0 B847
Cancel FA05

 

 

Device Commands

 

The currently defined IOCTL's (device commands) are as follows (+0x450000):

IOCTL Name Description
1 GET_KEY Retrieve the last pressed key code
2 GET_LEDS Retrieve the current LED state
3 SET_LEDS Update the current LED state
4 ADD_KEY Identify a key as 'repeating'
5 INS_KEY Fake a key press
6 POWER_DOWN Turn off power to the mainboard
7 GET_VERSION Return the interface version for the FIP board
8 READ_DATA Return the current value of the FIP 'data' register
9 GET_CONTROL Return the current value of the FIP 'control' register
10 SET_CONTROL Update the value of the FIP 'control' register
11 GET_TIMER Return the current value of the FIP 'timer' register
12 SET_TIMER Update the value of the FIP 'timer' register

 

Reading keys: GET_KEY (1)

Here is how to read the FIP keys (C snippet):

 

#define READ_KEY_NB 0x00450001 // read key non-blocking
fp = fopen("/dev/fip", "rw");
result = ioctl(fileno(fp), READ_KEY_NB, &key);

 

 

 

 

 

 

Download

Format Location
.c SourceForge - kernel source
.o SourceForge - Devel binaries

 

License

 

GPL

 

Todo

 

History

Version 2.3 - [2008-07, John]

  • Debugged ADD_KEY/FIND_KEY/fip_ir_sm2
  • Key repeating now works properly

 

Version 2.2 - [2008-04, John]

  • Added FIOC_INS_KEY for programmatically inserting keys into the FIP stream

 

Version 2.1 - [2008-02, John]

  • Re-written for GPL release

 

Version 2.0 - [2007, Airlink Tech]

  • Upgraded to FIP interrupt handler #2

Comments (0)

You don't have permission to comment on this page.