mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Corrected the return type of the digitalPotWrite in the SPI/DigitalPotControl example
Fixes #1063
This commit is contained in:
@ -60,7 +60,7 @@ void loop() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int digitalPotWrite(int address, int value) {
|
void digitalPotWrite(int address, int value) {
|
||||||
// take the SS pin low to select the chip:
|
// take the SS pin low to select the chip:
|
||||||
digitalWrite(slaveSelectPin,LOW);
|
digitalWrite(slaveSelectPin,LOW);
|
||||||
// send in the address and value via SPI:
|
// send in the address and value via SPI:
|
||||||
@ -68,4 +68,4 @@ int digitalPotWrite(int address, int value) {
|
|||||||
SPI.transfer(value);
|
SPI.transfer(value);
|
||||||
// take the SS pin high to de-select the chip:
|
// take the SS pin high to de-select the chip:
|
||||||
digitalWrite(slaveSelectPin,HIGH);
|
digitalWrite(slaveSelectPin,HIGH);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user