nicolás rodríguez / Mbed 2 deprecated BCD_GUIA2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BCDSEG.cpp Source File

BCDSEG.cpp

00001 #include "BCDSEG.h"
00002 
00003 
00004 int anodo[10] = {0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x58,0x00,0x18};
00005 
00006 int anodoo::entrada (PinName A, PinName B, PinName C, PinName D)
00007 {
00008     BusIn dip(A,B,C,D); 
00009     Sw = dip.read();
00010     return Sw;
00011     
00012 }
00013 void anodoo::visual(PinName A, PinName B, PinName C, PinName D, PinName E, PinName F, PinName G)
00014 {
00015     _A=A; _B=B; _C=C; _D=D; _E=E; _F=F; _G=G;
00016 }
00017 void anodoo::bcd(int number)
00018 {
00019     BusOut display(_G,_F,_E,_D,_C,_B,_A); 
00020     display=anodo[number];
00021 }