TCP/IP based digital io controller for operating DigitalsOuts and reading DigitalIns.

Dependencies:   EthernetInterface NetworkAPI mbed-rtos mbed

Fork of NetRelais by Roy van Dam

Committer:
NegativeBlack
Date:
Thu Sep 27 10:00:27 2012 +0000
Revision:
11:e5375ae5c8c3
Parent:
10:22d49341340c
Updated project to latest revision of the NetworkAPI

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NegativeBlack 10:22d49341340c 1 #ifndef _IO_HPP_
NegativeBlack 10:22d49341340c 2 #define _IO_HPP_
NegativeBlack 10:22d49341340c 3
NegativeBlack 10:22d49341340c 4 #include "mbed.h"
NegativeBlack 10:22d49341340c 5
NegativeBlack 10:22d49341340c 6 namespace io
NegativeBlack 10:22d49341340c 7 {
NegativeBlack 10:22d49341340c 8 static DigitalOut led[4] = {
NegativeBlack 10:22d49341340c 9 DigitalOut(LED1),
NegativeBlack 10:22d49341340c 10 DigitalOut(LED2),
NegativeBlack 10:22d49341340c 11 DigitalOut(LED3),
NegativeBlack 10:22d49341340c 12 DigitalOut(LED4)
NegativeBlack 10:22d49341340c 13 };
NegativeBlack 10:22d49341340c 14
NegativeBlack 10:22d49341340c 15 static DigitalOut ethernet[2] = {
NegativeBlack 10:22d49341340c 16 DigitalOut(p30),
NegativeBlack 10:22d49341340c 17 DigitalOut(p29)
NegativeBlack 10:22d49341340c 18 };
NegativeBlack 10:22d49341340c 19
NegativeBlack 10:22d49341340c 20 static DigitalOut output[5] = {
NegativeBlack 10:22d49341340c 21 DigitalOut(p9),
NegativeBlack 10:22d49341340c 22 DigitalOut(p8),
NegativeBlack 10:22d49341340c 23 DigitalOut(p7),
NegativeBlack 10:22d49341340c 24 DigitalOut(p6),
NegativeBlack 10:22d49341340c 25 DigitalOut(p5)
NegativeBlack 10:22d49341340c 26 };
NegativeBlack 10:22d49341340c 27
NegativeBlack 10:22d49341340c 28 static DigitalIn input[4] = {
NegativeBlack 10:22d49341340c 29 DigitalIn(p20),
NegativeBlack 10:22d49341340c 30 DigitalIn(p19),
NegativeBlack 10:22d49341340c 31 DigitalIn(p18),
NegativeBlack 10:22d49341340c 32 DigitalIn(p17)
NegativeBlack 10:22d49341340c 33 };
NegativeBlack 10:22d49341340c 34 }
NegativeBlack 10:22d49341340c 35
NegativeBlack 10:22d49341340c 36 #endif // _IO_HPP_