Skip to content

Commit

Permalink
update spi, fix lcd error
Browse files Browse the repository at this point in the history
  • Loading branch information
ekettenburg committed Feb 13, 2016
1 parent 2c40bcd commit 822a2e4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions digistump-avr/libraries/DigisparkLCD/LiquidCrystal_I2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
#include <inttypes.h>
#include "Arduino.h"

#if defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny2313__) || defined(__AVR_ATtiny167__)
#include "TinyWireM.h" // include this if ATtiny85 or ATtiny2313
#else
#include <Wire.h> // original lib include
#endif
#include "TinyWireM.h" // include this if ATtiny85 or ATtiny2313


// When the display powers up, it is configured as follows:
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void loop() {
}

//Read from or write to register from the SCP1000:
unsigned int readRegister(byte thisRegister, int bytesToRead ) {
unsigned int readRegister(byte thisRegister, int bytesToRead) {
byte inByte = 0; // incoming byte from the SPI
unsigned int result = 0; // result to return
Serial.print(thisRegister, BIN);
Expand Down Expand Up @@ -117,7 +117,7 @@ unsigned int readRegister(byte thisRegister, int bytesToRead ) {
// take the chip select high to de-select:
digitalWrite(chipSelectPin, HIGH);
// return the result:
return(result);
return (result);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const int slaveSelectPin = 10;

void setup() {
// set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT);
pinMode(slaveSelectPin, OUTPUT);
// initialize SPI:
SPI.begin();
}
Expand Down
1 change: 1 addition & 0 deletions digistump-avr/libraries/SPI/library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ author=Arduino
maintainer=Arduino <[email protected]>
sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. For all Arduino boards, BUT Arduino DUE.
paragraph=
category=Communication
url=http://www.arduino.cc/en/Reference/SPI
architectures=avr

0 comments on commit 822a2e4

Please sign in to comment.