-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAMAOutputDataBus.h
53 lines (44 loc) · 964 Bytes
/
AMAOutputDataBus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __AMAbus__
#define __AMAbus__
#include <stdio.h>
#include <Arduino.h>
#include "AMADefines.h"
namespace AMACar
{
/*
* Represents a data bus
*/
class AMAOutputDataBus
{
/*
* Holds bus pins
*/
byte *busPins;
/*
* Number of pins in bus
*/
byte busSize;
public:
/*
* Default constructor
*/
AMAOutputDataBus(int pinsCount, int *busPins);
/*
* Set a value (bases 2, 8, 10, 16) value on databus
*/
void setValue(byte value);
/*
* Sets all pins to LOW
*/
void setAllLow();
/*
* Sets all pins to HIGH
*/
void setAllHigh();
/*
* Prints the state of the object on the serial monitor if debug mode is activated
*/
void printState();
};
}
#endif