mirror of
https://github.com/pothos/arduino-n64-controller-library
synced 2024-11-23 17:22:21 -05:00
Remove unused constructors
This commit is contained in:
parent
80915bdb2d
commit
d670348f48
@ -23,16 +23,12 @@
|
|||||||
#define N64_PINB_LOW DDRB |= pincode
|
#define N64_PINB_LOW DDRB |= pincode
|
||||||
#define N64_PINB_QUERY (PINB & pincode)
|
#define N64_PINB_QUERY (PINB & pincode)
|
||||||
|
|
||||||
N64Controller::N64Controller() {
|
N64Controller::N64Controller(unsigned char serialPin) {
|
||||||
|
if(serialPin > 13)
|
||||||
|
serialPin = 2;
|
||||||
|
n64_PIN = serialPin;
|
||||||
}
|
}
|
||||||
|
|
||||||
N64Controller::N64Controller(int serialPin) {
|
|
||||||
n64_PIN = serialPin;
|
|
||||||
}
|
|
||||||
void N64Controller::begin(int serialPin) {
|
|
||||||
n64_PIN = serialPin;
|
|
||||||
begin();
|
|
||||||
}
|
|
||||||
void N64Controller::begin() {
|
void N64Controller::begin() {
|
||||||
// Communication with N64 controller controller on this pin
|
// Communication with N64 controller controller on this pin
|
||||||
// Don't remove these lines, we don't want to push +5V to the controller
|
// Don't remove these lines, we don't want to push +5V to the controller
|
||||||
|
@ -41,9 +41,7 @@
|
|||||||
|
|
||||||
class N64Controller {
|
class N64Controller {
|
||||||
public:
|
public:
|
||||||
N64Controller();
|
N64Controller(unsigned char serialPin); // first thing to call
|
||||||
N64Controller(int serialPin); // first thing to call
|
|
||||||
void begin(int serialPin);
|
|
||||||
void begin(); // second thing to call
|
void begin(); // second thing to call
|
||||||
void update(); // then update always and get button info
|
void update(); // then update always and get button info
|
||||||
// consider to have a delay instead of
|
// consider to have a delay instead of
|
||||||
@ -68,7 +66,7 @@ class N64Controller {
|
|||||||
void print_N64_status();
|
void print_N64_status();
|
||||||
private:
|
private:
|
||||||
void set_up();
|
void set_up();
|
||||||
int n64_PIN; // might also be set by constructor or begin()
|
char n64_PIN; // might also be set by constructor or begin()
|
||||||
char n64_pincode;
|
char n64_pincode;
|
||||||
bool n64_first_register; // PIN0-7: DDRD PIN8-13: DDRB
|
bool n64_first_register; // PIN0-7: DDRD PIN8-13: DDRB
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user