28
Chapter 15 LED GPIO Definition
This chapter describes GPIO definition of three LEDs on front panel.
Digital I/O Sample Configuration
Filename
:
Main.cpp
//---------------------------------------------------------------------------
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//---------------------------------------------------------------------------
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include "W627DHG.H"
//---------------------------------------------------------------------------
int main (void);
void Dio2Initial(void);
void Dio2SetOutput(unsigned char);
unsigned char Dio2GetInput(void);
void Dio2SetDirection(unsigned char);
unsigned char Dio2GetDirection(void);
void Dio3Initial(void);
void Dio3SetOutput(unsigned char);
unsigned char Dio3GetInput(void);
Status1 LED
GPIO35
GPIO21
RED
H
L
YELLOW
L
H
Status2 / Alarm LED
GPIO34
GPIO32
RED
H
L
GREEN
L
H
Power LED
GPIO37
GPIO36
RED
H
L
GREEN
L
H
Status 1
Status 2 /
Alarm
Power