Skip to content

Commit dbbe2b3

Browse files
committed
0.03 latest core
1 parent 33554f5 commit dbbe2b3

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GameControllersSTM32
2-
version=0.0.2
2+
version=0.0.3
33
author=Alexander Pruss
44
maintainer=arpruss <[email protected]>
55
sentence=Support Nunchuck, GameCube controller and Game Port joysticks on STM32F1

src/GameControllers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ class NunchuckController : public GameController {
7676
unsigned scl;
7777
unsigned sda;
7878
#ifdef NUNCHUCK_SOFT_I2C
79-
TwoWire* wire;
79+
SoftWire* wire;
8080
#else
81-
HardWire* wire;
81+
TwoWire* wire;
8282
#endif
8383

8484

src/dwt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// ...header taken from stuff floating around the net...
22

33
#ifndef DWT_BASE
4-
#define DWT_BASE
54

65
#define SystemCoreClock F_CPU
76

src/nunchuck.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#include "GameControllers.h"
22
#include <string.h>
33

4-
#define NUNCHUCK_SOFT_I2C // currently, HardWire doesn't work well for hotplugging
5-
// Also, it probably won't well with SPI remap
6-
74
NunchuckController::NunchuckController(unsigned _scl, unsigned _sda) {
85
scl = _scl;
96
sda = _sda;
@@ -12,10 +9,10 @@ NunchuckController::NunchuckController(unsigned _scl, unsigned _sda) {
129
bool NunchuckController::begin() {
1310
if (wire == NULL) {
1411
#ifdef NUNCHUCK_SOFT_I2C
15-
wire = new TwoWire(scl, sda, SOFT_STANDARD);
12+
wire = new SoftWire(scl, sda, SOFT_STANDARD);
1613
#else
1714
#error Hardware I2C has trouble with hotplugging.
18-
wire = new HardWire(1, 0); // I2C_FAST_MODE);
15+
wire = new TwoWire(1, 0); // I2C_FAST_MODE);
1916
#endif
2017
wire->begin();
2118
}

0 commit comments

Comments
 (0)