Abstract - MSI MS-98E6 Manual

(v1.x) industrial computer board
Table of Contents

Advertisement

GPIO WDT BKL

Abstract

MSI Industrial Platform Computing
Abstract
In this document, code examples based on C programming language are provided for
customer interest. Inportb, Outportb, Inportl and Outportl are basic functions used for
access IO ports and defined as following.
Inportb: Read a single 8-bit I/O port.
Outportb: Write a single byte to an 8-bit port.
Inportl: Reads a single 32-bit I/O port.
Outportl: Write a single long to a 32-bit port.
1. General Purposed IO – GPIO/DIO
The GPIO port configuration addresses are listed in the following table:
Name
N_GPI0
N_GPI1
N_GPI2
N_GPI3
N_GPI4
N_GPI5
N_GPI6
N_GPI7
Note: GPIO should be accessed through controller device 0x6E on SMBus. The associated access
method in examples (SMBus_ReadByte, SMBus_WriteByte) are provided in part 4.
1.1
Set output value of GPO
1. Read the value from GPO port.
2. Set the value of GPO address.
3. Write the value back to GPO port.
Example: Set N_GPO0 output "high"
val =SMBus_ReadByte (0x6E, 0x11);
val = val | (1<<0);
A-2
IO Port
IO address
0x42
Bit 0
0x42
Bit 1
0x42
Bit 2
0x42
Bit 3
0x42
Bit 4
0x42
Bit 5
0x42
Bit 6
0x42
Bit 7
// Read value from N_GPO0 port through SMBus.
// Set N_GPO0address (bit 0) to 1 (output "high").
Name
IO Port
IO address
N_GPO0
0x11
N_GPO1
0x11
N_GPO2
0x11
N_GPO3
0x11
N_GPO4
0x11
N_GPO5
0x11
N_GPO6
0x11
N_GPO7
0x11
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
1

Advertisement

Table of Contents
loading

Table of Contents