NetBurner 3.5.8
PDF Version
Toggle main menu visibility
MOD5441X/include/pins.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
5
#ifndef _NB_PINS_H_
6
#define _NB_PINS_H_
7
8
#include <pinconstant.h>
9
#include <cpu_pins.h>
10
11
#define PINS
12
//namespace PINS
13
//{
28
//class PinIO
29
//{
30
// uint8_t connector, pinnum;
31
// PinIO(int j, int n)
32
// {
33
// connector = j;
34
// pinnum = n;
35
// };
36
//
37
// public:
38
// void set(BOOL = TRUE); // Set output high
39
// void clr() { set(FALSE); }; // Set output low
40
// BOOL toggle(); // Set output state to the opposite of current state
41
// BOOL read(); // Read hi/low state of input pin
42
// BOOL readBack(); // Read pin state without affecting direction
43
// void hiz() { read(); }; // Set output to tristate
44
// void drive(); // Turn output on (opposite of tristate)
45
// void function(int ft); // Set pin to special function
46
// int getFunction(); // Get the special function the pin is set to
47
// PinIO &operator=(BOOL b)
48
// {
49
// set(b);
50
// return *this;
51
// };
52
// PinIO &operator=(int i)
53
// {
54
// set(i);
55
// return *this;
56
// };
57
// operator int() { return read(); }; // Read and return int value
58
// operator BOOL() { return read(); }; // Read and return BOOL value
59
// operator bool() { return (read() != 0); }; // Read and return boolean value
60
// friend class PinIOJ1Array;
61
// friend class PinIOJ2Array;
62
//};
63
64
class
PinIOJ1Array
65
{
66
public
:
67
PinIO
operator[](
int
n);
// { return PinIO(1, n); };
68
};
69
70
class
PinIOJ2Array
71
{
72
public
:
73
PinIO
operator[](
int
n);
// { return PinIO(2, n); };
74
};
75
76
class
PinIOPinsArray
77
{
78
public
:
79
PinIO operator[](
int
n);
// { return PinIO(2, n); };
80
};
81
//} // namespace PINS
82
83
extern
PinIOJ1Array
J1;
84
extern
PinIOJ2Array J2;
85
extern
PinIOJ1Array
P0;
// SB700EX implementation only
86
extern
PinIOJ2Array P1;
// SB700EX implementation only
87
extern
PinIOPinsArray Pins;
88
89
class
FastIOJ1Array
90
{
91
public
:
92
FastIO operator[](
int
n);
// { return PinIO(1, n); };
93
};
94
95
class
FastIOJ2Array
96
{
97
public
:
98
FastIO operator[](
int
n);
// { return PinIO(2, n); };
99
};
100
class
FastIOPinsArray
101
{
102
public
:
103
FastIO operator[](
int
n);
// { return PinIO(2, n); };
104
};
105
//} // namespace PINS
106
107
extern
FastIOJ1Array Fast_J1;
108
extern
FastIOJ2Array Fast_J2;
109
extern
FastIOJ1Array Fast_P0;
// SB700EX implementation only
110
extern
FastIOJ2Array Fast_P1;
// SB700EX implementation only
111
extern
PinIOPinsArray Fast_Pins;
112
113
//typedef PINS::PinIO PinIO;
114
115
#endif
/* _NB_PINS_H_ */
PinIO
GPIO Pin Class.
Definition
coldfire/cpu/MCF5441X/include/cpu_pins.h:44
PinIOJ1Array
Definition
MOD5441X/include/pins.h:65
platform
MOD5441X
include
pins.h
Generated by
1.18.0