beautypg.com

8 ps2 interface & device configuration, 9 input events detection through gpio, Firmware – Artesyn MITX-CORE-820 Installation and Use (July 2014) User Manual

Page 121

background image

Firmware

MITX-CORE-820 Installation and Use (6806800M10H)

121

6.3.8

PS2 Interface & Device Configuration

NPCE791x provides three PS/2 channels including channel 1, channel 2 and channel 3. For the
MITX-CORE-820, the channel 3 is for PS2 mouse, the channel 2 is for PS2 keyboard and the
channel 1 is not used.

6.3.9

Input Events Detection through GPIO

EC detects the following events:

Power Switch

AC adaptor In/Out

Battery In/Out Event

The power switch and AC adaptor In/Out could be detected through the event table below.

However, the MITX-CORE-820 does not have a GPIO pin for the battery in/out detection. EC
uses the SMBUS polling method to detect if the battery is present.

/*

Time Base is 10mS.

A --> "PORT PIN" definition for Events

B --> Active "HIGH" or "LOW"

C --> Event debounce counter.

D --> "ACTION" of event

*/

const EVENT_DESCRIPTOR Events_Table[] =

{ /* A B C, D*/

{PORT_PIN(0, 3) | LOW, 10, 0x0000}, /* 0x00 - Power Switch Event.*/

{PORT_PIN(0, 4) | HIGH, 10,

0x9130},

/* 0x01 - AC Adaptor In/Out Event. */

{PORT_PIN(9, 1) | LOW, 10, 0x9131}, /* 0x02 - Battery In/Out Event. */

{UNUSED_PIN | LOW, 00, 0x9137}, /* 0x03 - PME Event. */

};

//#define Events_Size (sizeof(Events_Table) / sizeof(EVENT_DESCRIPTOR))

This manual is related to the following products: