Skip to content

Commit 0b09736

Browse files
author
Federico Fissore
committed
Merge remote-tracking branch 'arduino/ide-1.5.x' into dev-ide-1.5.x-discovery
2 parents 23c5c58 + 300bb86 commit 0b09736

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

hardware/arduino/avr/cores/arduino/WString.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ String::String(unsigned long value, unsigned char base)
106106
*this = buf;
107107
}
108108

109-
String::String(float value, int decimalPlaces)
109+
String::String(float value, unsigned char decimalPlaces)
110110
{
111111
init();
112112
char buf[33];
113113
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
114114
}
115115

116-
String::String(double value, int decimalPlaces)
116+
String::String(double value, unsigned char decimalPlaces)
117117
{
118118
init();
119119
char buf[33];

hardware/arduino/avr/cores/arduino/WString.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class String
6969
explicit String(unsigned int, unsigned char base=10);
7070
explicit String(long, unsigned char base=10);
7171
explicit String(unsigned long, unsigned char base=10);
72-
explicit String(float, int decimalPlaces=2);
73-
explicit String(double, int decimalPlaces=2);
72+
explicit String(float, unsigned char decimalPlaces=2);
73+
explicit String(double, unsigned char decimalPlaces=2);
7474
~String(void);
7575

7676
// memory management
@@ -113,7 +113,7 @@ class String
113113
String & operator += (const String &rhs) {concat(rhs); return (*this);}
114114
String & operator += (const char *cstr) {concat(cstr); return (*this);}
115115
String & operator += (char c) {concat(c); return (*this);}
116-
String & operator += (unsigned char num) {concat(num); return (*this);}
116+
String & operator += (unsigned char num) {concat(num); return (*this);}
117117
String & operator += (int num) {concat(num); return (*this);}
118118
String & operator += (unsigned int num) {concat(num); return (*this);}
119119
String & operator += (long num) {concat(num); return (*this);}

libraries/SPI/arch/sam/SPI.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ void SPIClass::begin() {
3030
}
3131

3232
void SPIClass::begin(uint8_t _pin) {
33+
initCb();
34+
SPI_Configure(spi, id, SPI_MR_MSTR | SPI_MR_PS | SPI_MR_MODFDIS);
35+
SPI_Enable(spi);
36+
3337
uint32_t spiPin = BOARD_PIN_TO_SPI_PIN(_pin);
3438
PIO_Configure(
3539
g_APinDescription[spiPin].pPort,

0 commit comments

Comments
 (0)