eBoard ๐
โ โงโจ
Written for SIA 2017/2018
Main Page
Pages
Tutorials
Namespaces
Classes
Files
File List
File Members
eagle_ShiftExt.h
Go to the documentation of this file.
1
#ifndef EAGLE_EBOARD_HELPLIB_SHIFTEXT
2
#define EAGLE_EBOARD_HELPLIB_SHIFTEXT
3
6
long
store_bits
= 0L;
15
void
shiftSingle
(
optVAL_t
idx,
bool
val);
19
void
shiftAll
(
void
);
20
22
void
shiftSingle
(
optVAL_t
idx,
bool
val) {
23
bitWrite(
store_bits
,idx,val);
24
shiftAll
();
25
}
26
27
void
shiftAll
(
void
){
28
digitalWrite(
PIN_SHIFT_LAT
,LOW);
29
for
(
optVAL_t
c = 0; (c<32 && !
STOP
); c++){
30
digitalWrite(
PIN_SHIFT_CLK
,LOW);
31
shiftOut(
PIN_SHIFT_DAT
,
PIN_SHIFT_CLK
,MSBFIRST,bitRead(
store_bits
,c));
32
}
33
digitalWrite(
PIN_SHIFT_LAT
,LOW);
34
}
36
#endif
PIN_SHIFT_CLK
#define PIN_SHIFT_CLK
Definition:
eBoard.h:434
STOP
static bool STOP
Definition:
eBoard.h:186
PIN_SHIFT_LAT
#define PIN_SHIFT_LAT
Definition:
eBoard.h:446
store_bits
long store_bits
[SHIFT] Manipulate me to set Pins via bitSet operations
Definition:
eagle_ShiftExt.h:6
shiftAll
void shiftAll(void)
[SHIFT] Changes bits according to store_bits
shiftSingle
void shiftSingle(optVAL_t idx, bool val)
[SHIFT] Changes a single output Pin
optVAL_t
int optVAL_t
Definition:
eBoard.h:196
PIN_SHIFT_DAT
#define PIN_SHIFT_DAT
Definition:
eBoard.h:440
eBoard
source
eagle_ShiftExt.h
[WIP-BUILD]
EagleoutIce
19.04.2018 16:49:12