中文字幕人妻中文_99精品欧美一区二区三区综合在线_精品久久久久一区二区_色月丁香_免费福利在线视频_欧美大片免费观看网址_国产伦精品一区二区三区在线播放_污污污污污污www网站免费_久久月本道色综合久久_色69激情爱久久_尹人香蕉久久99天天拍_国产美女www_亚洲国产精品无码7777一线_五月婷婷六月激情_看免费一级片_精品久久久久久成人av_在线色亚洲_女人另类性混交zo_国产精品青青在线观看爽香蕉_人人澡人人添人人爽一区二区

主頁 > 知識庫 > Linux輸入子系統框架原理解析

Linux輸入子系統框架原理解析

熱門標簽:信貸電銷機器人系統 400 電話 申請費用 山東電信外呼系統靠譜嗎 云南云電銷機器人招商 長沙回撥外呼系統 江蘇自動外呼系統一般多少錢 比較穩定的外呼系統 ai電話機器人營銷 鸚鵡螺號航海地圖標注時間

input輸入子系統框架

linux輸入子系統(linux input subsystem)從上到下由三層實現,分別為:輸入子系統事件處理層(EventHandler)、輸入子系統核心層(InputCore)和輸入子系統設備驅動層。

一個輸入事件,如鼠標移動,鍵盤按鍵按下,joystick的移動等等通過 input driver -> Input core -> Event handler -> userspace 到達用戶空間傳給應用程序。

【注意】keyboard.c不會在/dev/input下產生節點,而是作為ttyn終端(不包括串口終端)的輸入。

驅動層

對于輸入子系統設備驅動層而言,主要實現對硬件設備的讀寫訪問,中斷設置,并把硬件產生的事件轉換為核心層定義的規范提交給事件處理層。將底層的硬件輸入轉化為統一事件形式,想輸入核心(Input Core)匯報。

輸入子系統核心層

對于核心層而言,為設備驅動層提供了規范和接口。設備驅動層只要關心如何驅動硬件并獲得硬件數據(例如按下的按鍵數據),然后調用核心層提供的接口,核心層會自動把數據提交給事件處理層。它承上啟下為驅動層提供輸入設備注冊與操作接口,如:input_register_device;通知事件處理層對事件進行處理;在/Proc下產生相應的設備信息。

事件處理層

對于事件處理層而言,則是用戶編程的接口(設備節點),并處理驅動層提交的數據處理。主要是和用戶空間交互(Linux中在用戶空間將所有的設備都當作文件來處理,由于在一般的驅動程序中都有提供fops接口,以及在/dev下生成相應的設備文件nod,這些操作在輸入子系統中由事件處理層完成)。

/dev/input目錄下顯示的是已經注冊在內核中的設備編程接口,用戶通過open這些設備文件來打開不同的輸入設備進行硬件操作。

事件處理層為不同硬件類型提供了用戶訪問及處理接口。例如當我們打開設備/dev/input/mice時,會調用到事件處理層的Mouse Handler來處理輸入事件,這也使得設備驅動層無需關心設備文件的操作,因為Mouse Handler已經有了對應事件處理的方法。

輸入子系統由內核代碼drivers/input/input.c構成,它的存在屏蔽了用戶到設備驅動的交互細節,為設備驅動層和事件處理層提供了相互通信的統一界面。

由上圖可知輸入子系統核心層提供的支持以及如何上報事件到input event drivers。

作為輸入設備的驅動開發者,需要做以下幾步:

  • 在驅動加載模塊中,設置你的input設備支持的事件類型
  • 注冊中斷處理函數,例如鍵盤設備需要編寫按鍵的抬起、放下,觸摸屏設備需要編寫按下、抬起、絕對移動,鼠標設備需要編寫單擊、抬起、相對移動,并且需要在必要的時候提交硬件數據(鍵值/坐標/狀態等等)
  • 將輸入設備注冊到輸入子系統中

///////////////////////////////////////////////////////////////////分割線/////////////////////////////////////////////////////////////////////////////////

輸入核心提供了底層輸入設備驅動程序所需的API,如分配/釋放一個輸入設備:

struct input_dev *input_allocate_device(void);
void input_free_device(struct input_dev *dev);

/**
 * input_allocate_device - allocate memory for new input device
 *
 * Returns prepared struct input_dev or NULL.
 *
 * NOTE: Use input_free_device() to free devices that have not been
 * registered; input_unregister_device() should be used for already
 * registered devices.
 */
struct input_dev *input_allocate_device(void)
{
  struct input_dev *dev;
     /*分配一個input_dev結構體,并初始化為0*/ 
  dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL);
  if (dev) {
    dev->dev.type = &input_dev_type;/*初始化設備的類型*/ 
    dev->dev.class = &input_class; /*設置為輸入設備類*/ 
    device_initialize(&dev->dev);/*初始化device結構*/ 
    mutex_init(&dev->mutex); /*初始化互斥鎖*/ 
    spin_lock_init(&dev->event_lock); /*初始化事件自旋鎖*/ 
    INIT_LIST_HEAD(&dev->h_list);/*初始化鏈表*/ 
    INIT_LIST_HEAD(&dev->node); /*初始化鏈表*/ 

    __module_get(THIS_MODULE);/*模塊引用技術加1*/ 
  }

  return dev;
}

注冊/注銷輸入設備用的接口如下:

int __must_check input_register_device(struct input_dev *);
void input_unregister_device(struct input_dev *);

/**
 * input_register_device - register device with input core
 * @dev: device to be registered
 *
 * This function registers device with input core. The device must be
 * allocated with input_allocate_device() and all it's capabilities
 * set up before registering.
 * If function fails the device must be freed with input_free_device().
 * Once device has been successfully registered it can be unregistered
 * with input_unregister_device(); input_free_device() should not be
 * called in this case.
 */
int input_register_device(struct input_dev *dev)
{
    //定義一些函數中將用到的局部變量
  static atomic_t input_no = ATOMIC_INIT(0);
  struct input_handler *handler;
  const char *path;
  int error;
  //設置 input_dev 所支持的事件類型,由 evbit 成員來表示。具體類型在后面歸納。
  /* Every input device generates EV_SYN/SYN_REPORT events. */
  __set_bit(EV_SYN, dev->evbit);

  /* KEY_RESERVED is not supposed to be transmitted to userspace. */
  __clear_bit(KEY_RESERVED, dev->keybit);

  /* Make sure that bitmasks not mentioned in dev->evbit are clean. */
  input_cleanse_bitmasks(dev);

   //初始化 timer 定時器,用來處理重復點擊按鍵。(去抖)
  /*
   * If delay and period are pre-set by the driver, then autorepeating
   * is handled by the driver itself and we don't do it in input.c.
   */
  init_timer(&dev->timer);
    //如果 rep[REP_DELAY] 和 [REP_PERIOD] 沒有設值,則賦默認值。為了去抖。
  if (!dev->rep[REP_DELAY] && !dev->rep[REP_PERIOD]) {
    dev->timer.data = (long) dev;
    dev->timer.function = input_repeat_key;
    dev->rep[REP_DELAY] = 250;
    dev->rep[REP_PERIOD] = 33;
  }
   //檢查下列兩個函數是否被定義,沒有被定義則賦默認值。
  if (!dev->getkeycode)
    dev->getkeycode = input_default_getkeycode;//得到指定位置鍵值

  if (!dev->setkeycode)
    dev->setkeycode = input_default_setkeycode;//設置指定位置鍵值
    //設置 input_dev 中 device 的名字為 inputN
    //將如 input0 input1 input2 出現在 sysfs 文件系統中
  dev_set_name(&dev->dev, "input%ld",
       (unsigned long) atomic_inc_return(&input_no) - 1);
    //將 input->dev 包含的 device 結構注冊到 Linux 設備模型中。
  error = device_add(&dev->dev);
  if (error)
    return error;
  //打印設備的路徑并輸出調試信息
  path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
  printk(KERN_INFO "input: %s as %s\n",
    dev->name ? dev->name : "Unspecified device", path ? path : "N/A");
  kfree(path);

  error = mutex_lock_interruptible(&input_mutex);
  if (error) {
    device_del(&dev->dev);
    return error;
  }
    //將 input_dev 加入 input_dev_list 鏈表中(這個鏈表中包含有所有 input 設備)
  list_add_tail(&dev->node, &input_dev_list);

  list_for_each_entry(handler, &input_handler_list, node)
   //調用 input_attatch_handler()函數匹配 handler 和 input_dev。
    //這個函數很重要,在后面單獨分析。
    input_attach_handler(dev, handler);

  input_wakeup_procfs_readers();

  mutex_unlock(&input_mutex);

  return 0;
}

而對于所有的輸入事件,內核都用統一的數據結構來描述,這個數據結構是input_event

/*
 * The event structure itself
 */

struct input_event {
  struct timeval time; //<輸入事件發生的時間
  __u16 type;     //<輸入事件的類型
  __u16 code;     //<在輸入事件類型下的編碼
  __s32 value;     //<code的值
};

輸入事件的類型--input_event.type

/*
 * Event types
 */

#define EV_SYN      0x00 //< 同步事件
#define EV_KEY      0x01 //< 按鍵事件
#define EV_REL      0x02 //<相對坐標(如:鼠標移動,報告相對最后一次位置的偏移) 
#define EV_ABS      0x03 //< 絕對坐標(如:觸摸屏或操作桿,報告絕對的坐標位置) 
#define EV_MSC      0x04 //< 其它 
#define EV_SW       0x05 //<開關 
#define EV_LED      0x11 //<按鍵/設備燈 
#define EV_SND      0x12 //<聲音/警報 
#define EV_REP      0x14 //<重復 
#define EV_FF       0x15 //<力反饋 
#define EV_PWR      0x16 //<電源 
#define EV_FF_STATUS   0x17 //<力反饋狀態 
#define EV_MAX      0x1f //< 事件類型最大個數和提供位掩碼支持 
#define EV_CNT      (EV_MAX+1)

Linux輸入子系統提供了設備驅動層上報輸入事件的函數

報告輸入事件用的接口如下:

/* 報告指定type、code的輸入事件 */
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
/* 報告鍵值 */
static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
{
  input_event(dev, EV_KEY, code, !!value);
}
/* 報告相對坐標 */
static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value)
{
  input_event(dev, EV_REL, code, value);
}
/* 報告絕對坐標 */
static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value)
{
  input_event(dev, EV_ABS, code, value);
}
...

當提交輸入設備產生的輸入事件之后,需要調用下面的函數來通知輸入子系統,以處理設備產生的完整事件:

void input_sync(struct input_dev *dev);

【例子】驅動實現——報告結束input_sync()同步用于告訴input core子系統報告結束,觸摸屏設備驅動中,一次點擊的整個報告過程如下:

input_reprot_abs(input_dev,ABS_X,x); //x坐標
input_reprot_abs(input_dev,ABS_Y,y); // y坐標
input_reprot_abs(input_dev,ABS_PRESSURE,1);
input_sync(input_dev);//同步結束

【例子】按鍵中斷程序

//按鍵初始化
static int __init button_init(void)
{//申請中斷
  if(request_irq(BUTTON_IRQ,button_interrupt,0,”button”,NUll))
    return –EBUSY;
  set_bit(EV_KEY,button_dev.evbit); //支持EV_KEY事件
  set_bit(BTN_0,button_dev.keybit); //支持設備兩個鍵
  set_bit(BTN_1,button_dev.keybit); //
  input_register_device(&button_dev);//注冊input設備
}
/*在按鍵中斷中報告事件*/
Static void button_interrupt(int irq,void *dummy,struct pt_regs *fp)
{
  input_report_key(&button_dev,BTN_0,inb(BUTTON_PORT0));//讀取寄存器BUTTON_PORT0的值
  input_report_key(&button_dev,BTN_1,inb(BUTTON_PORT1));
  input_sync(&button_dev);
}

【小結】input子系統仍然是字符設備驅動程序,但是代碼量減少很多,input子系統只需要完成兩個工作:初始化和事件報告(這里在linux中是通過中斷來實現的)。

Event Handler層解析

Input輸入子系統數據結構關系圖

input_handler結構體

struct input_handle;

/**
 * struct input_handler - implements one of interfaces for input devices
 * @private: driver-specific data
 * @event: event handler. This method is being called by input core with
 *  interrupts disabled and dev->event_lock spinlock held and so
 *  it may not sleep
 * @filter: similar to @event; separates normal event handlers from
 *  "filters".
 * @match: called after comparing device's id with handler's id_table
 *  to perform fine-grained matching between device and handler
 * @connect: called when attaching a handler to an input device
 * @disconnect: disconnects a handler from input device
 * @start: starts handler for given handle. This function is called by
 *  input core right after connect() method and also when a process
 *  that "grabbed" a device releases it
 * @fops: file operations this driver implements
 * @minor: beginning of range of 32 minors for devices this driver
 *  can provide
 * @name: name of the handler, to be shown in /proc/bus/input/handlers
 * @id_table: pointer to a table of input_device_ids this driver can
 *  handle
 * @h_list: list of input handles associated with the handler
 * @node: for placing the driver onto input_handler_list
 *
 * Input handlers attach to input devices and create input handles. There
 * are likely several handlers attached to any given input device at the
 * same time. All of them will get their copy of input event generated by
 * the device.
 *
 * The very same structure is used to implement input filters. Input core
 * allows filters to run first and will not pass event to regular handlers
 * if any of the filters indicate that the event should be filtered (by
 * returning %true from their filter() method).
 *
 * Note that input core serializes calls to connect() and disconnect()
 * methods.
 */
struct input_handler {

  void *private;

  void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
  bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
  bool (*match)(struct input_handler *handler, struct input_dev *dev);
  int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
  void (*disconnect)(struct input_handle *handle);
  void (*start)(struct input_handle *handle);

  const struct file_operations *fops;
  int minor;
  const char *name;

  const struct input_device_id *id_table;

  struct list_head  h_list;
  struct list_head  node;
};

【例子】以evdev.c中的evdev_handler為例:

static struct input_handler evdev_handler = {
        .event = evdev_event, //<向系統報告input事件,系統通過read方法讀取
        .connect = evdev_connect, //<和input_dev匹配后調用connect構建
        .disconnect = evdev_disconnect,
        .fops = &evdev_fops, //<event設備文件的操作方法
        .minor = EVDEV_MINOR_BASE, //<次設備號基準值
        .name = "evdev",
        .id_table = evdev_ids, //<匹配規則
    };

輸入設備驅動的簡單案例

documentation/input/input-programming.txt文件,講解了編寫輸入設備驅動程序的核心步驟。

Programming input drivers
~~~~~~~~~~~~~~~~~~~~~~~~~

1. Creating an input device driver
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.0 The simplest example
~~~~~~~~~~~~~~~~~~~~~~~~

Here comes a very simple example of an input device driver. The device has
just one button and the button is accessible at i/o port BUTTON_PORT. When
pressed or released a BUTTON_IRQ happens. The driver could look like:

#include <linux/input.h>
#include <linux/module.h>
#include <linux/init.h>

#include <asm/irq.h>
#include <asm/io.h>

static struct input_dev *button_dev;

static irqreturn_t button_interrupt(int irq, void *dummy)
{
  input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
  input_sync(button_dev);
  return IRQ_HANDLED;
}

static int __init button_init(void)
{
  int error;

  if (request_irq(BUTTON_IRQ, button_interrupt, 0, "button", NULL)) {
        printk(KERN_ERR "button.c: Can't allocate irq %d\n", button_irq);
        return -EBUSY;
    }

  button_dev = input_allocate_device();
  if (!button_dev) {
    printk(KERN_ERR "button.c: Not enough memory\n");
    error = -ENOMEM;
    goto err_free_irq;
  }

  button_dev->evbit[0] = BIT_MASK(EV_KEY);
  button_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);

  error = input_register_device(button_dev);
  if (error) {
    printk(KERN_ERR "button.c: Failed to register device\n");
    goto err_free_dev;
  }

  return 0;

 err_free_dev:
  input_free_device(button_dev);
 err_free_irq:
  free_irq(BUTTON_IRQ, button_interrupt);
  return error;
}

static void __exit button_exit(void)
{
    input_unregister_device(button_dev);
  free_irq(BUTTON_IRQ, button_interrupt);
}

module_init(button_init);
module_exit(button_exit);

1.1 What the example does
~~~~~~~~~~~~~~~~~~~~~~~~~

First it has to include the <linux/input.h> file, which interfaces to the
input subsystem. This provides all the definitions needed.

In the _init function, which is called either upon module load or when
booting the kernel, it grabs the required resources (it should also check
for the presence of the device).

Then it allocates a new input device structure with input_allocate_device()
and sets up input bitfields. This way the device driver tells the other
parts of the input systems what it is - what events can be generated or
accepted by this input device. Our example device can only generate EV_KEY
type events, and from those only BTN_0 event code. Thus we only set these
two bits. We could have used

  set_bit(EV_KEY, button_dev.evbit);
  set_bit(BTN_0, button_dev.keybit);

as well, but with more than single bits the first approach tends to be
shorter.

Then the example driver registers the input device structure by calling

  input_register_device(&button_dev);

This adds the button_dev structure to linked lists of the input driver and
calls device handler modules _connect functions to tell them a new input
device has appeared. input_register_device() may sleep and therefore must
not be called from an interrupt or with a spinlock held.

While in use, the only used function of the driver is

  button_interrupt()

which upon every interrupt from the button checks its state and reports it
via the

  input_report_key()

call to the input system. There is no need to check whether the interrupt
routine isn't reporting two same value events (press, press for example) to
the input system, because the input_report_* functions check that
themselves.

Then there is the

  input_sync()

call to tell those who receive the events that we've sent a complete report.
This doesn't seem important in the one button case, but is quite important
for for example mouse movement, where you don't want the X and Y values
to be interpreted separately, because that'd result in a different movement.

1.2 dev->open() and dev->close()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In case the driver has to repeatedly poll the device, because it doesn't
have an interrupt coming from it and the polling is too expensive to be done
all the time, or if the device uses a valuable resource (eg. interrupt), it
can use the open and close callback to know when it can stop polling or
release the interrupt and when it must resume polling or grab the interrupt
again. To do that, we would add this to our example driver:

static int button_open(struct input_dev *dev)
{
  if (request_irq(BUTTON_IRQ, button_interrupt, 0, "button", NULL)) {
        printk(KERN_ERR "button.c: Can't allocate irq %d\n", button_irq);
        return -EBUSY;
    }

    return 0;
}

static void button_close(struct input_dev *dev)
{
    free_irq(IRQ_AMIGA_VERTB, button_interrupt);
}

static int __init button_init(void)
{
  ...
  button_dev->open = button_open;
  button_dev->close = button_close;
  ...
}

Note that input core keeps track of number of users for the device and
makes sure that dev->open() is called only when the first user connects
to the device and that dev->close() is called when the very last user
disconnects. Calls to both callbacks are serialized.

The open() callback should return a 0 in case of success or any nonzero value
in case of failure. The close() callback (which is void) must always succeed.

1.3 Basic event types
~~~~~~~~~~~~~~~~~~~~~

The most simple event type is EV_KEY, which is used for keys and buttons.
It's reported to the input system via:

  input_report_key(struct input_dev *dev, int code, int value)

See linux/input.h for the allowable values of code (from 0 to KEY_MAX).
Value is interpreted as a truth value, ie any nonzero value means key
pressed, zero value means key released. The input code generates events only
in case the value is different from before.

In addition to EV_KEY, there are two more basic event types: EV_REL and
EV_ABS. They are used for relative and absolute values supplied by the
device. A relative value may be for example a mouse movement in the X axis.
The mouse reports it as a relative difference from the last position,
because it doesn't have any absolute coordinate system to work in. Absolute
events are namely for joysticks and digitizers - devices that do work in an
absolute coordinate systems.

Having the device report EV_REL buttons is as simple as with EV_KEY, simply
set the corresponding bits and call the

  input_report_rel(struct input_dev *dev, int code, int value)

function. Events are generated only for nonzero value.

However EV_ABS requires a little special care. Before calling
input_register_device, you have to fill additional fields in the input_dev
struct for each absolute axis your device has. If our button device had also
the ABS_X axis:

  button_dev.absmin[ABS_X] = 0;
  button_dev.absmax[ABS_X] = 255;
  button_dev.absfuzz[ABS_X] = 4;
  button_dev.absflat[ABS_X] = 8;

Or, you can just say:

  input_set_abs_params(button_dev, ABS_X, 0, 255, 4, 8);

This setting would be appropriate for a joystick X axis, with the minimum of
0, maximum of 255 (which the joystick *must* be able to reach, no problem if
it sometimes reports more, but it must be able to always reach the min and
max values), with noise in the data up to +- 4, and with a center flat
position of size 8.

If you don't need absfuzz and absflat, you can set them to zero, which mean
that the thing is precise and always returns to exactly the center position
(if it has any).

1.4 BITS_TO_LONGS(), BIT_WORD(), BIT_MASK()
~~~~~~~~~~~~~~~~~~~~~~~~~~

These three macros from bitops.h help some bitfield computations:

  BITS_TO_LONGS(x) - returns the length of a bitfield array in longs for
        x bits
  BIT_WORD(x)   - returns the index in the array in longs for bit x
  BIT_MASK(x)   - returns the index in a long for bit x

1.5 The id* and name fields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The dev->name should be set before registering the input device by the input
device driver. It's a string like 'Generic button device' containing a
user friendly name of the device.

The id* fields contain the bus ID (PCI, USB, ...), vendor ID and device ID
of the device. The bus IDs are defined in input.h. The vendor and device ids
are defined in pci_ids.h, usb_ids.h and similar include files. These fields
should be set by the input device driver before registering it.

The idtype field can be used for specific information for the input device
driver.

The id and name fields can be passed to userland via the evdev interface.

1.6 The keycode, keycodemax, keycodesize fields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These three fields should be used by input devices that have dense keymaps.
The keycode is an array used to map from scancodes to input system keycodes.
The keycode max should contain the size of the array and keycodesize the
size of each entry in it (in bytes).

Userspace can query and alter current scancode to keycode mappings using
EVIOCGKEYCODE and EVIOCSKEYCODE ioctls on corresponding evdev interface.
When a device has all 3 aforementioned fields filled in, the driver may
rely on kernel's default implementation of setting and querying keycode
mappings.

1.7 dev->getkeycode() and dev->setkeycode()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
getkeycode() and setkeycode() callbacks allow drivers to override default
keycode/keycodesize/keycodemax mapping mechanism provided by input core
and implement sparse keycode maps.

1.8 Key autorepeat
~~~~~~~~~~~~~~~~~~

... is simple. It is handled by the input.c module. Hardware autorepeat is
not used, because it's not present in many devices and even where it is
present, it is broken sometimes (at keyboards: Toshiba notebooks). To enable
autorepeat for your device, just set EV_REP in dev->evbit. All will be
handled by the input system.

1.9 Other event types, handling output events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The other event types up to now are:

EV_LED - used for the keyboard LEDs.
EV_SND - used for keyboard beeps.

They are very similar to for example key events, but they go in the other
direction - from the system to the input device driver. If your input device
driver can handle these events, it has to set the respective bits in evbit,
*and* also the callback routine:

  button_dev->event = button_event;

int button_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
{
  if (type == EV_SND && code == SND_BELL) {
    outb(value, BUTTON_BELL);
    return 0;
  }
  return -1;
}

This callback routine can be called from an interrupt or a BH (although that
isn't a rule), and thus must not sleep, and must not take too long to finish.

input-programming.txt

該例子提供的案例代碼描述了一個button設備,產生的事件通過BUTTON_PORT引腳獲取,當有按下/釋放發生時,BUTTON_IRQ被觸發,以下是驅動的源代碼:

#include <linux/input.h>
#include <linux/module.h>
#include <linux/init.h>

#include <asm/irq.h>
#include <asm/io.h>

static struct input_dev *button_dev; /*輸入設備結構體*/ 
/*中斷處理函數*/ 
static irqreturn_t button_interrupt(int irq, void *dummy)
{
  /*向輸入子系統報告產生按鍵事件*/ 
  input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
  /*通知接收者,一個報告發送完畢*/ 
  input_sync(button_dev);
  return IRQ_HANDLED;
}
/*加載函數*/ 
static int __init button_init(void)
{
  int error;
  /*申請中斷處理函數*/ //返回0表示成功,返回-INVAL表示無效
  if (request_irq(BUTTON_IRQ, button_interrupt, 0, "button", NULL)) {
        /*申請失敗,則打印出錯信息*/ 
        printk(KERN_ERR "button.c: Can't allocate irq %d\n", button_irq);
        return -EBUSY;
    }
  /*分配一個設備結構體*/ 
  //將在 sys/class/input/input-n 下面創建設備屬性文件
  button_dev = input_allocate_device();
  if (!button_dev) {   /*判斷分配是否成功*/ 
    printk(KERN_ERR "button.c: Not enough memory\n");
    error = -ENOMEM;
    goto err_free_irq;
  }

  button_dev->evbit[0] = BIT_MASK(EV_KEY); /*設置按鍵信息*/ 
  button_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);

  error = input_register_device(button_dev); /*注冊一個輸入設備*/ 
  if (error) {
    printk(KERN_ERR "button.c: Failed to register device\n");
    goto err_free_dev;
  }

  return 0;
 /*以下是錯誤處理*/ 
 err_free_dev:
  input_free_device(button_dev);
 err_free_irq:
  free_irq(BUTTON_IRQ, button_interrupt);
  return error;
}
 /*卸載函數*/ 
static void __exit button_exit(void)
{
  input_unregister_device(button_dev); /*注銷按鍵設備*/ 
  free_irq(BUTTON_IRQ, button_interrupt);/*釋放按鍵占用的中斷線*/ 
}

module_init(button_init);
module_exit(button_exit);

從這個簡單的例子中可以看到。

  • 在初始化函數 button_init() 中注冊了一個中斷處理函數,然后調用 input_allocate_device() 函數分配了一個 input_dev 結構體,并調用 input_register_device() 對其進行注冊。
  • 在中斷處理函數 button_interrupt() 中,實例將接收到的按鍵信息上報給 input 子系統,從而通過 input子系統,向用戶態程序提供按鍵輸入信息。

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:運城 齊齊哈爾 亳州 烏海 嘉興 澳門 衡陽 拉薩

巨人網絡通訊聲明:本文標題《Linux輸入子系統框架原理解析》,本文關鍵詞  Linux,輸入,子系統,框架,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Linux輸入子系統框架原理解析》相關的同類信息!
  • 本頁收集關于Linux輸入子系統框架原理解析的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 济南大彤机械设备有限公司| 浙江嘉益机械有限公司| 佛宇重工实业有限公司| 烟台拓伟机械有限公司| 新疆 机械有限公司| 爱科农业机械有限公司| 格林策巴赫机械有限公司| 友隆精密机械有限公司| 上海德机械设备有限公司| 湖北天和机械有限公司| 济南威力机械有限公司| 成都机械设备有限公司| 河北清大环保机械有限公司| 宁波安德机械有限公司| 三一起重机械有限公司| 上海玉兆精密机械有限公司| 四川工程机械有限公司| 山东日发纺织机械有限公司| 江苏古川机械有限公司| 山西常平钢铁有限公司| 湖北襄玉机械有限公司| 山东诚铭建设机械有限公司| 杭州灵达机械有限公司| 东莞市智科精密机械有限公司 | 上海齐耀重工有限公司| 浙江明天机械有限公司| 浙江铖虹机械有限公司| 重庆阿德耐特动力机械有限公司| 泉州市机械有限公司| 山东中探机械有限公司| 潍坊浩泰机械有限公司| 汶上金城机械有限公司| 鑫成机械设备有限公司| 青岛金越隆机械有限公司| 坎山机械有限公司招聘| 无纺布机械有限公司| 丝网机械 有限公司| 山东起重机械有限公司| 江苏新美星包装机械有限公司| 上海龙应机械制造有限公司| 苏州神峰起重机械有限公司| 河北石阀机械设备有限公司| 青岛华雷重工设备有限公司| 江阴戎辉机械设备制造有限公司| 宝鸡南车时代工程机械有限公司| 徐工建机机械有限公司| 上海 乐 机械有限公司| 宿迁 机械 有限公司| 诚鑫诚机械有限公司| 山西建龙钢铁有限公司| 南海区机械设备有限公司| 咸阳机械制造有限公司| 大连工程机械有限公司| 佛山市陶瓷机械有限公司| 合肥旭龙机械有限公司| 中核华兴达丰机械工程有限公司| 河南省平原矿山机械有限公司| 龙口金正机械有限公司| 新力机械制造有限公司| 山东永健机械有限公司| 龙腾机械制造有限公司| 塑料包装机械有限公司| 徐州市机械有限公司| 无锡 精密机械有限公司| 青岛诺机械有限公司| 东莞市自动化机械有限公司| 上海金相机械有限公司| 济南龙安机械有限公司| 东莞胜通机械有限公司| 北京长空机械有限公司| 河南黎明路桥重工有限公司| 上海宝峨机械有限公司| 宁波北仑机械有限公司| 上海申克机械有限公司| 南昌机械设备有限公司| 河钢钢铁贸易有限公司| 南宁敏创机械有限公司| 天津江天重工有限公司| 衡阳华意机械有限公司| 浙江美格机械有限公司| 上海机械加工有限公司| 泰州机械 有限公司| 常州杭钢卓信机械装备有限公司| 河南三星机械有限公司| 曲阜圣泰机械有限公司| 天津起重设备有限公司| 顺兴机械制造有限公司| 上海力净洗涤机械制造有限公司| 扬州扬工机械有限公司| 河北永明地质工程机械有限公司| 浙江远信印染机械有限公司| 德耐尔压缩机械有限公司| 上海全众机械有限公司| 重庆捷灿机械有限公司| 宁波机械设备有限公司| 昆山 精密机械有限公司| 昆山鑫建诚机械设备有限公司 | 北京富佳伟业机械制造有限公司 | 温州正信机械有限公司| 潍坊天宇机械有限公司| 大连世达重工有限公司| 上海昊宇机械有限公司| 南京利晨机械有限公司| 江苏鑫林钢铁有限公司| 浙江制药机械有限公司| 佛山市南海鼎工包装机械有限公司| 浙江迅定钢铁有限公司| 常州海杰冶金机械制造有限公司 | 昆山 机械有限公司| 苏州亿泛精密机械有限公司| 东莞高盟机械有限公司| 青岛联瑞精密机械有限公司| 上海工程机械有限公司| 江阴市江南轻工机械有限公司| 华东油压机械制造有限公司| 广东先达数控机械有限公司| 连云港 机械有限公司| 东莞宏起塑胶电子有限公司| 大连机械设备有限公司| 德州 机械有限公司| 江苏鹤溪机械有限公司| 温州国伟印刷机械有限公司| 上海嘉歆包装机械有限公司 | 机械有限公司起名大全| 椿中岛机械有限公司| 泰上机械设备有限公司| 南海区机械设备有限公司| 常州艾隆精密机械有限公司| 青岛海佳机械有限公司| 天津 起重有限公司| 湖南金牛重工机械有限公司| 北京精密机械有限公司| 海的动力机械有限公司| 杭州鸿立机械有限公司| 千机械制造有限公司| 深圳市创能机械有限公司| 张家港长力机械有限公司| 中阳钢铁有限公司官网| 上海长空机械有限公司| 重庆动力机械有限公司| 宁波盛技机械有限公司| 临沂 机械有限公司| 河南兴远起重机有限公司| 华电曹妃甸重工装备有限公司| 上海新沪机械有限公司| 江苏别具匠心机械设备有限公司| 江苏先电机械有限公司| 安徽同铸工程机械有限公司| 潍坊永成机械有限公司| 北京恒机械有限公司| 东芝机械上海有限公司| 上海鹏则机械有限公司| 广州新欧机械有限公司| 晋江市机械有限公司| 江苏舜天机械进出口有限公司| 江苏 重型机械有限公司| 东莞胜通机械有限公司| 吴江机械设备有限公司| 石家庄聚力特机械有限公司| 浙江江鑫机械有限公司| 唐山新宝泰钢铁有限公司| 惟其信石油机械(天津)有限公司| 衡阳纺织机械有限公司| 上海竹达机械设备有限公司| 飞迈烟台机械有限公司| 佛山市中牌机械有限公司| 苏州铭峰精密机械有限公司| 东莞市科环机械设备有限公司| 南京惠德机械有限公司| 青岛德维机械制造有限公司| 无锡威马机械有限公司| 河北东方富达机械有限公司| 南京力同重工机械有限公司| 力士德机械有限公司| 潍坊圣旋机械有限公司| 深圳精密机械有限公司| 浙江威泰机械有限公司| 新乡正兴机械有限公司| 洛阳友建工程机械有限公司| 山东鑫弘重工有限公司| 中安重工自动化装备有限公司| 临沂机械设备有限公司| 上海凡贝机械有限公司| 郑州钰隆机械有限公司| 力迈机械设备有限公司| 南通奥普机械工程有限公司| 浙江双畅起重机械有限公司| 厦门天一精密机械有限公司| 威海机械制造有限公司| 浙江先锋机械有限公司| 济南捷迈数控机械有限公司| 山东业机械有限公司| 浙江锦峰纺织机械有限公司| 阳煤化工机械有限公司| 宁波 机械有限公司| 章丘丰源机械有限公司| 广州卓远机械有限公司| 太仓旭升机械有限公司| 上海 包装机械 有限公司| 淄博捷达机械有限公司| 莱州华汽机械有限公司| 广东顺发起重设备有限公司| 天津市三鼎包装机械有限公司| 山东环保机械有限公司| 杭州三共机械有限公司| 山东金亿机械制造有限公司| 东莞市业佳精密机械有限公司| 东莞机械设备制造有限公司| 厦门机械制造有限公司| 和和机械(张家港)有限公司| 上海全驰机械有限公司| 江苏电能机械有限公司| 上海世达机械工具厂有限公司| 广州东昻机械有限公司| 福州 机械 有限公司| 河南工程机械有限公司| 山东金成机械有限公司| 徐州市机械有限公司| 上海满鑫机械有限公司| 上海普顺机械电器制造有限公司| 上海新沪机械有限公司| 安徽泰恒机械制造有限公司| 厦门天一精密机械有限公司| 无锡市川中五金机械有限公司| 广州市 机械有限公司| 河北永明地质工程机械有限公司| 湖南机械制造有限公司| 扬州恒润钢铁有限公司| 东莞协鑫机械有限公司| 江苏清淮机械有限公司| 山东同洲机械制造有限公司| 凹凸精密机械有限公司| 浙江金辉机械有限公司| 安徽佶龙机械有限公司| 河北小松工程机械贸易有限公司| 湖州市湖州机械有限公司| 杭州机械制造有限公司| 雷州雷宝机械有限公司| 勃农兴达机械有限公司| 山东利丰机械有限公司| 宁波联成机械有限公司| 凯斯纽荷兰机械 哈尔滨 有限公司| 成都杰瑞达工程机械有限公司| 中山市机械有限公司| 山西中宇钢铁有限公司| 浙江欧耀机械有限公司| 丽驰精密机械有限公司| 浙江吉隆机械有限公司| 南通龙威机械有限公司| 广州赛思达机械设备有限公司 | 南皮县中顺环保机械有限公司| 莱州市鲁樽机械有限公司| 印刷包装机械有限公司| 陕西恒德精密机械有限公司| 天津市钢铁有限公司| 四川机械制造有限公司| 连云港机械制造有限公司| 安徽玻璃机械有限公司| 石化机械制造有限公司| 嘉兴机械设备有限公司| 粤北联合钢铁有限公司| 上海冬松精密机械有限公司| 嘉兴市宏丰机械有限公司| 广州嘉银机械有限公司| 山东新船重工有限公司| 宁波健信机械有限公司| 山东矿山机械有限公司| 江苏三麦食品机械有限公司| 山东大丰机械有限公司| 杭州雅顿过滤机械有限公司| 苏州苏安起重吊装有限公司| 安徽格瑞德机械制造有限公司| 沈阳东荣机械有限公司| 浙江万通重工有限公司| 合肥中通抛光机械有限公司| 重庆墨龙机械有限公司| 英侨机械制造有限公司| 承德 机械有限公司| 安徽艾特巴机械制造有限公司| 河南大方起重机有限公司| 西安科迅机械制造有限公司 | 上海港机重工有限公司| 深圳精机械有限公司| 新乡市长城机械有限公司| 苏州伟鼎机械设备有限公司 | 济宁恒远机械有限公司| 无纺布机械有限公司| 北京长空机械有限公司| 南通国盛精密机械有限公司| 射阳县机械有限公司| 河北天择重型机械有限公司| 农友机械设备有限公司| 山西重工机械有限公司| 武汉餐至饮机械设备有限公司| 宁波梦神床垫机械有限公司| 常州市 机械设备有限公司| 重庆华渝重工机电有限公司 | 佛山市康思达液压机械有限公司| 珠海华亚机械有限公司| 常州英来机械有限公司| 宝索机械制造有限公司| 常州纺织机械有限公司| 西安飞鸿机械有限公司| 潍坊圣旋机械有限公司| 杭州化工机械有限公司| 东莞市通机械有限公司| 济南威力机械有限公司| 苏州辽鞍机械有限公司| 温州设备机械有限公司| 山东龙起重工有限公司| 温州瑞达机械有限公司| 安徽宇华机械制造有限公司| 重庆明鑫机械有限公司| 广州通泽机械有限公司| 无纺布机械有限公司| 新进精密机械苏州有限公司| 浙江兴盛机械有限公司| 河南正亚机械设备制造有限公司| 昆山联德精密机械有限公司| 嘉兴赛诺机械有限公司| 绵阳机械制造有限公司| 江苏八达重工机械有限公司| 广州市磊蒙机械设备有限公司| 山东纺织机械有限公司| 合肥至信机械有限公司| 广州机械设备有限公司| 上海东泷重型机械有限公司| 山东海诺机械有限公司| 上海建筑机械有限公司| 湖北三六重工有限公司| 滨州市机械有限公司| 青岛大牧人机械有限公司招聘 | 沃得农业机械有限公司| 深圳机械院建筑设计有限公司 | 宁波钢铁有限公司工作| 江苏力威机械有限公司| 上海塑料机械有限公司| 济南诺斯机械有限公司| 江苏海特尔机械有限公司| 湖北华伟石化机械设备制造有限公司 | 杭州长虹机械有限公司| 三国精密机械有限公司| 沈阳凯力拓机械设备有限公司| 科倍隆南京机械有限公司| 昆成机械(昆山)有限公司| 杭州萧山鼎立机械有限公司| 山西天巨重工机械有限公司| 无锡东源机械制造有限公司| 上海天和制药机械有限公司 | 浙江双环传动机械有限公司| 道依茨法尔机械有限公司| 石家庄博锐食品机械有限公司 | 山东岳峰起重机械有限公司 | 三联传动机械有限公司| 常熟通江机械有限公司| 宁波传动机械有限公司| 盐城三益石化机械有限公司 | 东营 机械制造 有限公司| 上海腾迈机械有限公司| 安徽中科光电色选机械有限公司| 山东利达工程机械有限公司| 南平 机械 有限公司| 佛山创宝包装机械有限公司| 青岛精密机械有限公司| 山东明天机械有限公司| 肥城云宇机械有限公司| 济南四通机械有限公司| 徐州天立机械有限公司| 徐州福曼随车起重机有限公司| 浙江欧森机械有限公司| 无锡东源机械制造有限公司| 徐州普特工程机械有限公司| 江阴市洪腾机械有限公司| 杭州建泰机械有限公司| 云南德胜钢铁有限公司| 南通腾中机械有限公司| 河南工程机械有限公司| 东莞市高臻机械设备有限公司| 硕方精密机械有限公司| 中山市翠山机械制造有限公司| 昌信机械制造有限公司| 浙江小伦制药机械有限公司| 浙江全兴机械制造有限公司| 合浦惠利机械有限公司| 无锡通用机械有限公司| 山东宏鑫机械有限公司| 瑞达机械制造有限公司| 山东良鑫机械有限公司| 德国机械制造有限公司| 丰诺植保机械制造有限公司| 机械配件苏州有限公司| 河南省矿山起重机械有限公司| 上海昶旭包装机械有限公司| 昆山昆成机械有限公司| 山东博宇机械有限公司| 山东瑞华机械有限公司| 海安机械制造有限公司| 昆山贝奇精密机械有限公司| 海顺机械台州有限公司| 志成机械制造有限公司| 烟台华隆机械有限公司| 温州市春来包装机械有限公司| 常熟 机械 有限公司| 远大机械制造有限公司| 上海全驰机械有限公司| 广州市三禾机械有限公司| 焦作巨航粮油机械有限公司| 汕头机械设备有限公司| 江苏苏盐阀门机械有限公司| 浙江美格机械有限公司| 海盛精密机械有限公司| 南通新兴机械制造有限公司 | 华通动力重工有限公司| 青岛辉特重工有限公司| 东莞市嘉鲁特注塑机械有限公司 | 亚龙机械制造有限公司| 涞源奥宇钢铁有限公司| 昆玉钢铁有限公司招聘| 浙江安奇迪动力机械有限公司| 山东萨丁重工有限公司| 青州泰达机械有限公司| 艾莎钢铁天津有限公司| 仙游东亚机械有限公司| 河北小松工程机械贸易有限公司| 河北冀工机械制造有限公司| 南平 机械 有限公司| 北京京西重工有限公司| 浙江欧森机械有限公司| 浙江荣德机械有限公司| 昆山北钜机械有限公司| 浙江天泰机械有限公司| 宝钢湛江钢铁有限公司招聘| 常州超通机械有限公司| 诸城市富瑞德机械有限公司| 山东博杰重型工程机械有限公司| 江苏谷登工程机械装备有限公司 | 潍坊精诺机械有限公司| 潍坊圣川机械有限公司| 上海利昆机械有限公司| 山东首钢钢铁贸易有限公司| 广西千里通机械设备有限公司| 济南天助升降机械有限公司| 佛山市洛德机械设备有限公司| 上海腾迈机械有限公司| 上海玉兆精密机械有限公司| 新乡市中轻机械有限公司| 成都机械设备有限公司| 上海慕鼎机械设备有限公司| 机械自动化有限公司| 潍坊市贝特机械有限公司| 安印刷机械有限公司| 新乡市海纳筛分机械制造有限公司| 南昌机械设备有限公司| 江苏鼎盛重工有限公司| 纽科伦新乡起重机有限公司| 黄山市机械有限公司| 绍兴 机械 有限公司| 无锡 精密机械有限公司| 宁夏瑞光机械有限公司| 南京南特精密机械有限公司| 苏州奥德机械有限公司| 上海 输送机械有限公司| 南京工程机械有限公司| 常州杰洋精密机械有限公司| 上海玉兆精密机械有限公司 | 山东曲阜机械有限公司| 无锡 液压机械有限公司| 河南省机械有限公司| 无锡佳特机械有限公司| 上海剑豪传动机械有限公司 | 东莞液压机械有限公司| 山东数控机械有限公司| 汕头市机械有限公司| 深圳步先包装机械有限公司| 如皋市通达机械制造有限公司| 江苏省南扬机械制造有限公司| 南京星德机械有限公司| 禹州市机械有限公司| 中山市信元铝门窗机械制造有限公司 | 济南迈动数控机械有限公司| 广州善友机械设备有限公司| 上海恒麦食品机械有限公司 | 瑞祥机械制造有限公司| 浙江天盛机械有限公司| 山东泗水鑫峰面粉机械有限公司| 上海成套机械有限公司| 邯郸纺织机械有限公司| 浙江新德宝机械有限公司| 上海振华重工有限公司| 欧力特机械有限公司| 新乡市法斯特机械有限公司| 郑州永兴重工机械有限公司| 杰西博工程机械有限公司| 郑州市机械设备有限公司| 重庆江峰机械有限公司| 无锡好麦机械有限公司| 德州力维机械有限公司| 塑料包装机械有限公司| 浙江鸿森机械有限公司| 潍坊市贝特机械有限公司| 江西鑫通机械有限公司| 温州立胜印刷包装机械有限公司| 浙江鑫 机械有限公司| 济南鼎业机械制造有限公司| 浙江威泰机械有限公司| 上海松铭传动机械有限公司| 唐山唐银钢铁有限公司| 浙江万能弹簧机械有限公司| 潍坊广德机械有限公司| 盐山宏润重工有限公司| 诸城市盛和机械有限公司| 上海众德机械有限公司| 新能源有限公司起名| 青岛晟森机械有限公司| 山东兴田机械有限公司| 江苏久盛机械设备有限公司 | 河南省化工机械制造有限公司 | 山东龙起重工有限公司| 浙江路杰机械有限公司| 泰州市海锋机械制造有限公司| 山西太行钢铁有限公司| 奥通机械制造有限公司| 江苏食品机械有限公司| 常州欧鹰焊割机械有限公司| 山东河山机械有限公司| 山东省机械施工有限公司| 河南安普包装机械制造有限公司 | 河北荣信钢铁有限公司| 梧州沃华机械有限公司| 济南华飞数控机械有限公司| 天津同力重工有限公司| 中煤盘江重工有限公司| 德州市启泰机械设备有限公司| 上海川口机械有限公司| 南京建克机械有限公司| 上海炬钢机械制造有限公司| 山东问云机械有限公司| 河北卓昊机械制造有限公司| 台州欧玮机械有限公司| 江阴市三 机械有限公司| 佳铭机械有限公司骗局| 涿州北方重工设备设计有限公司| 石家庄米兹机械设备有限公司| 润源经编机械有限公司| 天津润机械有限公司| 济南东泰机械制造有限公司| 保定向阳航空精密机械有限公司 | 章丘大成机械有限公司| 佳木斯农业机械有限公司| 常州先电机械有限公司| 宁波裕民机械工业有限公司| 深圳龙润彩印机械设备有限公司| 广州市荣艺食品机械有限公司 | 西安中天机械有限公司| 山东巨力机械有限公司| 河南世博机械工程有限公司| 苏州市机械制造有限公司| 海宁诚达机械有限公司| 淮安机械制造有限公司| 青岛顺丰机械有限公司| 安丘瑞源机械制造有限公司| 戴氏印刷机械有限公司| 杭州群起建材有限公司| 南昌机械设备有限公司| 郑州万谷机械有限公司| 河北龙汐机械制造有限公司| 丰凯机械制造有限公司| 益丰泰机械有限公司| 溧阳机械制造有限公司| 泸州发展机械有限公司| 苏州凯威塑料机械有限公司| 沈阳顺达重矿机械制造有限公司| 诺威起重设备苏州有限公司| 恩德特机械(苏州)有限公司| 郑州水工机械有限公司招聘| 德阳机械制造有限公司| 山东巨威机械有限公司| 广西中源机械有限公司| 烟台飞达机械设备有限公司| 苏州 机械有限公司| 浙江联科机械有限公司| 郑州万谷机械有限公司| 温州万润机械有限公司| 长城重型机械制造有限公司| 合肥中通抛光机械有限公司| 志庆机械设备有限公司| 江阴华西钢铁有限公司| 烟台福信钢铁有限公司| 马鞍山 重工机械有限公司| 山东威达机械有限公司| 山东川大机械设备有限公司| 宏机械铸造有限公司| 常熟神马机械有限公司| 无锡诺美机械有限公司| 纸箱机械制造有限公司| 南京惠德机械有限公司| 中阳钢铁有限公司电话| 东莞市机械设备有限公司| 冷水江钢铁有限公司| 上海科熙起重设备有限公司| 河钢钢铁贸易有限公司| 浙江瑞大机械有限公司| 河南良益机械有限公司| 众立机械制造有限公司| 常州液压机械有限公司| 广州萱裕机械有限公司| 佛山市顺德区金工铝门窗机械实业有限公司| 和本精密机械有限公司| 张家港亿塑机械有限公司| 宁波江北机械有限公司| 青岛北船重工有限公司| 郑州品创机械设备有限公司| 山东泰力起重设备有限公司| 广州恒星冷冻机械制造有限公司| 包装机械设备有限公司| 上海盛普机械制造有限公司| 河北强华水利机械有限公司| 东莞奥锐机械有限公司| 安印刷机械有限公司| 南京机械制造有限公司| 济南金胜星机械设备有限公司| 无锡盛达机械制造有限公司 | 海华机械制造有限公司| 广州市京龙工程机械有限公司| 上海行雄机械有限公司| 苏州市机械制造有限公司| 青岛宏达锻压机械有限公司 | 工程机械有限公司经营范围| 济宁朝阳机械有限公司| 常州纺织机械有限公司| 上海服装机械有限公司| 广东富华机械装备制造有限公司 | 沈阳盈好机械有限公司| 武汉东尔机械有限公司| 常州赛瑞克包装机械有限公司 | 青岛液压机械有限公司 | 常州市日中精密机械有限公司| 杭州传动机械有限公司| 青岛特殊钢铁有限公司| 无锡万华机械有限公司| 德阳思远重工有限公司| 张家港长力机械有限公司| 杭州方圆塑料机械有限公司| 江苏韩通船舶重工有限公司| 兄弟机械西安有限公司| 台州欧玮机械有限公司| 上海曼中机械有限公司| 郑州市建新机械制造有限公司| 宁波塑料机械有限公司| 南京力同重工机械有限公司| 无锡市浦尚精密机械有限公司| 上海 包装机械 有限公司| 机械密封件有限公司| 郑州华隆机械制造有限公司 | 威海行雨化工机械有限公司| 常州豪凯机械有限公司| 浙江建机起重机械有限公司| 江阴万恒机械制造有限公司| 西安科迅机械制造有限公司| 晶元精密机械有限公司| 济南业兴通工程机械有限公司| 江苏银河机械有限公司| 上海起重电机厂有限公司| 骁马机械上海有限公司| 江苏方邦机械有限公司| 青岛青工机械有限公司| 洗涤机械制造有限公司| 张家港市鑫港机械有限公司| 无锡盛达机械制造有限公司| 苏州施米特机械有限公司| 青岛天乐机械有限公司| 郑州正科机械有限公司| 山东重特机械有限公司| 上海众和包装机械有限公司 | 中意合资 威尼托机械有限公司 | 东莞达成机械设备制造有限公司| 上海博强机械有限公司| 明辉机械设备制造有限公司| 广州振通机械有限公司| 南通中远重工有限公司| 浙江劲豹机械有限公司| 天津 津工机械有限公司| 河南机械制造有限公司| 无锡布勒机械制造有限公司招聘| 杭州诺迈机械有限公司| 宁江精密机械有限公司| 安徽泰源工程机械有限公司| 石家庄聚力特机械有限公司| 扬州冶金机械有限公司| 山东萨丁重工有限公司| 温州 印刷机械有限公司| 昆山市众捷塑料机械有限公司| 浙江速成精密机械有限公司| 安徽唐兴机械装备有限公司| 苏州安特精密机械有限公司| 集瑞联合重工有限公司| 济南机械 设备有限公司| 永华机械有限公司招聘| 东芝机械上海有限公司| 东莞市乔锋机械有限公司| 东莞鸿铭机械有限公司| 四川沱江起重机有限公司| 珠海精密机械有限公司| 无锡市巨神起重机有限公司| 科倍隆南京机械有限公司| 吴江聚力机械有限公司| 黄山市机械有限公司| 无锡市双瑞机械有限公司| 天津瑞星传动机械有限公司| 武安裕华钢铁有限公司| 合肥市春华起重机械有限公司 | 济南圣元机械工程有限公司| 昆山河海精密机械有限公司| 北京长空机械有限公司| 河北德林机械有限公司| 永兴机械设备有限公司| 广州机械设备有限公司| 嘉兴机械设备有限公司| 徐州彭贝机械制造有限公司| 苏州友众传动机械有限公司| 青岛塑料机械有限公司| 力邦 机械有限公司| 青岛隆硕农牧机械制造有限公司| 莒县长运机械有限公司| 温州佳诚机械有限公司| 河北德欧机械有限公司| 江苏迈安德食品机械有限公司| 无锡九明机械有限公司| 浙江胜代机械有限公司| 河南佳德机械有限公司| 荣龙精密机械有限公司| 深圳市钢铁有限公司| 无锡联通焊接机械有限公司| 上海瑞派机械有限公司| 浙江传动机械有限公司| 上海赛峰包装机械设备有限公司| 山东明威起重设备有限公司 | 汕头市伟力塑料机械厂有限公司 | 南京南特精密机械有限公司| 上海丰禾精密机械有限公司| 山东锦鹏机械有限公司| 潍坊钰兴机械有限公司| 三一海洋重工有限公司| 林州中奥机械有限公司| 上海松井机械有限公司| 陕西通运机械有限公司| 江苏古川机械有限公司| 唐山港陆钢铁有限公司| 诸城市鼎康机械有限公司| 荆州华力机械有限公司| 唐山市德龙钢铁有限公司| 机械设备有限公司经营范围| 武汉工程机械有限公司| 河南合力起重机械有限公司| 徐州福曼随车起重机有限公司 | 佳木斯农业机械有限公司| 湖北天腾重型机械制造有限公司| 广州甲宝机械有限公司| 宁波市凯博数控机械有限公司| 启英机械设备有限公司| 盾建重工制造有限公司| 北京大铭世进机械设备有限公司 | 昆成机械制造有限公司| 机械自动化设备有限公司| 威海威力起重有限公司| 杭州永创机械有限公司| 河南飞马起重机械有限公司| 龙工机械制造有限公司| 玛狮工程机械有限公司| 天翔机械制造有限公司| 东莞市峰茂机械设备有限公司| 迁安九江钢铁有限公司| 河南省邦恩机械制造有限公司| 江苏力源液压机械有限公司| 河北敬业钢铁有限公司地址| 饶阳鸿源机械有限公司| 德州联合石油机械有限公司| 南通航力重工机械有限公司| 山东兖州煤矿机械有限公司| 大连 工程机械有限公司| 青岛堡鑫机械有限公司| 苏州 工业机械有限公司| 潍坊西泰机械有限公司| 宜兴市机械有限公司| 张家港市通惠化工机械有限公司 | 中交天和机械设备制造有限公司| 郑州双合机械有限公司| 山东精密机械有限公司| 锦辉五金机械有限公司| 洛阳中收机械装备有限公司| 开封元创机械有限公司| 武汉精密机械有限公司| 诸城市华邦机械有限公司| 沈阳斗山工程机械有限公司| 蔚蓝机械设备有限公司| 仕诚塑料机械有限公司| 枣庄誉源挂车机械有限公司| 天津机械制造有限公司| 东莞胜通机械有限公司| 常州浦发机械有限公司| 广州东昻机械有限公司| 富阳液压机械有限公司| 东源精密机械有限公司| 重庆海松机械有限公司| 枣庄誉源挂车机械有限公司| 星光传动机械有限公司| 四平红嘴钢铁有限公司| 南通丰威机械有限公司| 济南大彤机械设备有限公司| 东莞市博志达工程机械制造有限公司 | 连云港亚新钢铁有限公司| 烟台飞达机械设备有限公司| 河南重机械有限公司| 无锡真木机械有限公司| 东莞奥锐机械有限公司| 中海福陆重工有限公司| 新乡市起重机有限公司| 江苏东邦机械有限公司| 萨克米机械有限公司| 江苏鸿泰钢铁有限公司| 山东永峰钢铁有限公司| 星 精密机械有限公司| 旭众食品机械有限公司| 邢台正佳机械制造有限公司| 淄博 机械制造有限公司| 山东华屹重工有限公司| 安宁永昌钢铁有限公司| 湖南天拓重工有限公司| 厦门厦工机械有限公司| 东莞市瑞辉机械制造有限公司| 东莞市永乐机械有限公司| 武汉臻尚机械设备有限公司| 安徽省机械有限公司| 扬州恒润钢铁有限公司| 莱州市华弘机械有限公司| 蓬莱巨涛海洋工程重工有限公司怎么样 | 新乡正兴机械有限公司| 汕头市机械有限公司| 宜兴市华鼎机械有限公司| 龙工江西机械有限公司| 山东威达机械有限公司| 万工机械制造有限公司| 昆玉钢铁有限公司招聘| 上海佳成服装机械有限公司| 设备机械制造有限公司| 洛阳古城机械有限公司| 山东和晟机械设备有限公司| 昆山圣源机械有限公司| 山东华准机械有限公司| 廊坊德基机械有限公司| 易百通机械有限公司| 石家庄米兹机械设备有限公司 | 苏州阿姆斯壮阀门机械有限公司| 郑州锦德润机械设备有限公司| 邹平 机械有限公司| 桂林橡胶机械有限公司| 科尼起重机设备(上海)有限公司| 南通液压机械有限公司| 上海全驰机械有限公司| 无锡威马机械有限公司| 重庆瀚源机械有限公司| 萧山天成机械有限公司| 舟山荣德机械有限公司| 东台市机械有限公司| 爱可机械深圳有限公司| 陕西锦泰机械有限公司| 临沂盛德机械有限公司| 深圳市兴合发齿轮机械有限公司| 有限公司发起人协议| 廊坊百冠包装机械有限公司| 常州工程机械有限公司| 大连正丰机械有限公司| 上海龙应机械制造有限公司| 东莞麒麟机械有限公司| 江阴市三 机械有限公司| 茂名重力石化机械制造有限公司| 重庆自动化机械有限公司| 无锡金球机械有限公司| 南通中船机械制造有限公司| 陆丰机械郑州有限公司| 威海华丰机械有限公司| 天宇机械制造有限公司| 山东龙辉起重机械有限公司| 诺威起重设备苏州有限公司| 中山弘立机械有限公司| 苏州启点机械有限公司| 温州 机械有限公司| 杭州丽伟电脑机械有限公司| 玉溪新兴钢铁有限公司| 纸箱机械 有限公司| 广州市汇格机械设备有限公司| 广州新欧机械有限公司| 河北水利机械有限公司| 重庆屯茂机械有限公司| 华电重工装备有限公司| 张家口煤机械有限公司| 北仑旭升机械有限公司| 河南千里机械有限公司| 上海起泽起重机械有限公司| 唐山宏润钢铁有限公司| 北京大铭世进机械设备有限公司 | 永宏机械制造有限公司| 诸城顺德机械有限公司| 苏州市丰科精密机械有限公司| 江苏长虹涂装机械有限公司 | 恒力泰机械有限公司| 鞍山重工机械有限公司| 天津 机械 有限公司| 苏州联屹精密机械有限公司| 万好万家机械有限公司| 河南豪丰机械制造有限公司| 金泰机械制造有限公司| 北京恒机械设备有限公司| 诸暨市机械有限公司| 天津富启机械有限公司| 青岛浩翔机械有限公司| 天津华信机械有限公司| 吉林大华机械制造有限公司| 矿山机械制造有限公司| 义乌机械设备有限公司| 洛阳中收机械装备有限公司招聘| 成都万欣邦达机械制造有限公司 | 密机械(西安)有限公司| 兴龙机械模具有限公司| 广西利维重工有限公司| 淄博银丰机械有限公司| 广东巨风机械制造有限公司| 南京海威机械有限公司| 河北卓昊机械制造有限公司| 太仓越华精密机械配件有限公司| 常州常发动力机械有限公司| 上海宝峨机械有限公司| 昆山环保机械有限公司| 大连正丰机械有限公司| 富伟精密机械有限公司| 山东明沃机械有限公司| 苏州恒威海绵机械有限公司| 诸城市万兴机械有限公司| 河南万泰机械有限公司| 国机铸锻机械有限公司| 烟台建筑机械有限公司| 河南胜飞石油机械有限公司| 柳州高华机械有限公司| 宝索机械制造有限公司| 东莞市精密机械有限公司| 骁马机械上海有限公司| 郑州万谷机械有限公司| 绵阳新晨动力机械有限公司| 上海法德机械设备有限公司| 韶瑞重工有限公司官网| 江苏天宇机械有限公司| 机械生产制造有限公司| 机械有限公司怎么注册| 上海升立机械制造有限公司| 三友医疗机械有限公司| 常州嘉耘机械有限公司| 安徽涌诚机械有限公司| 江阴市勤业化工机械有限公司 | 龙岩市机械有限公司| 东莞市和明机械有限公司| 徐工辽宁机械有限公司| 丰精密机械有限公司| 山东杰卓机械有限公司| 珠海三麦机械有限公司| 随州市恒大机械铸造有限公司| 浙江达青机械有限公司| 威海环宇化工机械有限公司| 江苏聚丰园林机械有限公司| 青岛金诺机械有限公司| 青岛诺机械有限公司| 上海申虎包装机械设备有限公司 | 温州瑞达机械有限公司| 好利用机械有限公司| 合肥盛安机械有限公司| 宁波 机械 有限公司| 河南嵩山重工有限公司| 高服筛分机械有限公司| 东方传动机械有限公司| 常州捷佳创精密机械有限公司| 常州朝康机械有限公司| 重庆嘉木机械有限公司| 河南启瀚机械设备有限公司| 锋劲威机械有限公司| 五洋纺织机械有限公司| 无锡布勒机械有限公司| 江苏优远机械有限公司| 新乡振动机械有限公司| 圣固 江苏 机械有限公司| 徐工机械有限公司现状| 陕西 工程机械有限公司| 天津京龙工程机械有限公司| 东莞市瑞辉机械制造有限公司| 常州杭钢卓信机械装备有限公司| 上海起重电机厂有限公司| 山东利达工程机械有限公司| 东莞市沃德精密机械有限公司| 江阴机械制造有限公司怎么样 | 杭州康发塑料机械有限公司| 广西徐重机械有限公司|