J
john2020
Guest
Hi,
Es gribētu zināt, kāpēc tiek const izmanto varam izmantot # define LPT1 0x378 vietā?
Ja tā kuriem viens ir labāks, kāpēc?
const int LPT1 = 0x378;
const int CONTROL = 0x37A;
const int NUM_BITS = 8;
const int cero = 0;
const int onfiltered = 1;
const int TIME_DELAY = 0;
Programma ir dots tālāk ....
/ / PC Display Driver
Max7219
/ /
/ / Signal DB25 pin Signal
IC pin
/ / D0 .................2
CLOCK ............13
/ / D1 .................3
DATU .............01
/ / D2 .................4 / DATA
ENEABLE ....12
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietver "MAX7219.H"
const int LPT1 = 0x378;
const int CONTROL = 0x37A;
const int NUM_BITS = 8;
const int cero = 0;
const int onfiltered = 1;
const int TIME_DELAY = 0;
const char REG_DECODE = 0x09;
const char REG_INTENSITY = 0x0A;
const char REG_SCAN_LIMIT = 0x0B;
const char REG_SHUTDOWN = 0x0C;
const char REG_DISPLAY_TEST = 0x0F;
const char INTENSITY_MIN = 0x00;
const char INTENSITY_MAX = 0x0F;paldies un uz
john
Es gribētu zināt, kāpēc tiek const izmanto varam izmantot # define LPT1 0x378 vietā?
Ja tā kuriem viens ir labāks, kāpēc?
const int LPT1 = 0x378;
const int CONTROL = 0x37A;
const int NUM_BITS = 8;
const int cero = 0;
const int onfiltered = 1;
const int TIME_DELAY = 0;
Programma ir dots tālāk ....
/ / PC Display Driver
Max7219
/ /
/ / Signal DB25 pin Signal
IC pin
/ / D0 .................2
CLOCK ............13
/ / D1 .................3
DATU .............01
/ / D2 .................4 / DATA
ENEABLE ....12
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietvert
# Ietver "MAX7219.H"
const int LPT1 = 0x378;
const int CONTROL = 0x37A;
const int NUM_BITS = 8;
const int cero = 0;
const int onfiltered = 1;
const int TIME_DELAY = 0;
const char REG_DECODE = 0x09;
const char REG_INTENSITY = 0x0A;
const char REG_SCAN_LIMIT = 0x0B;
const char REG_SHUTDOWN = 0x0C;
const char REG_DISPLAY_TEST = 0x0F;
const char INTENSITY_MIN = 0x00;
const char INTENSITY_MAX = 0x0F;paldies un uz
john