Skip to content

Commit 6b7a8c0

Browse files
committed
Merge branch 'ide-1.5.x' into HEAD
2 parents 8e7a590 + 5de6192 commit 6b7a8c0

24 files changed

+118
-102
lines changed

build/shared/revisions.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARDUINO 1.5.7 BETA
1+
ARDUINO 1.5.7 BETA - 2014.07.07
22

33
[core]
44
* Upgraded AVR toolchain: gcc 4.8.1, avr-libc 1.8.0
@@ -13,6 +13,7 @@ ARDUINO 1.5.7 BETA
1313
* avr: Fix EXTERNAL_NUM_INTERRUPTS for atmega128rfa1 and atmega256rfr2 (Matthijs Kooijman)
1414
* sam: Fix to Wire::endTransmisson() return value (bluesign2k)
1515
* sam: Fix to Wire usage of TWI status register (bluesign2k)
16+
* avr: Fixed PROGMEM statements to be compatible with newer avr gcc (Scott Howard)
1617

1718
[ide]
1819
* Moved to appbundler for building releases for MacOSX. (Haavar Valeur)
@@ -36,7 +37,7 @@ ARDUINO 1.5.7 BETA
3637
* Improved speed of YunSerialTerminal
3738
* Fixed CRC of shutdown command on YunSerialTerminal example
3839
* Updates/Fix to various examples
39-
* avr: Added Wire.setClock(..) method (Kristian Sloth Lauszus)
40+
* Added Wire.setClock(..) method (Kristian Sloth Lauszus)
4041

4142
The following changes are included also in the (not yet released) Arduino IDE 1.0.6:
4243

@@ -61,12 +62,12 @@ The following changes are included also in the (not yet released) Arduino IDE 1.
6162
[firmware]
6263
* Wifishield: fixed paths on firmware upgrade scripts
6364

64-
ARDUINO 1.5.6-r2 BETA 2014.02.21
65+
ARDUINO 1.5.6-r2 BETA - 2014.02.21
6566

6667
[ide]
6768
* JSSC: Fixed NPE when RXCHAR event with no bytes (José Pereda)
6869

69-
ARDUINO 1.5.6 BETA 2014.02.20
70+
ARDUINO 1.5.6 BETA - 2014.02.20
7071

7172
[ide]
7273
* Implemented 1.5 library specification Rev.2
@@ -107,14 +108,14 @@ ARDUINO 1.5.6 BETA 2014.02.20
107108
* Make some operators in IPAddress const (Matthijs Kooijman)
108109
* Fix for compiling assembler files with newer gcc
109110

110-
ARDUINO 1.5.5-r2 BETA 2014.01.10
111+
ARDUINO 1.5.5-r2 BETA - 2014.01.10
111112

112113
* Signed drivers for Windows 8.1
113114
* Fixed Windows drivers signature (that prevented installation on
114115
some Windows 8.x OS). Now the signature is timestamped and should
115116
not expire.
116117

117-
ARDUINO 1.5.5 BETA 2013.11.28
118+
ARDUINO 1.5.5 BETA - 2013.11.28
118119

119120
NOTICE:
120121
The 1.5 library format is under heavy review on the Arduino Developers mailing list.
@@ -167,7 +168,7 @@ We suggest to delay the adoption of the new format until a stable 1.5.x is relea
167168
* avr: added variant file for Arduino Ethernet
168169
* Added SERIAL_* metadata in variants files (Paul Stoffregen)
169170

170-
ARDUINO 1.5.4 BETA 2013.09.10
171+
ARDUINO 1.5.4 BETA - 2013.09.10
171172

172173
[ide]
173174
* Revert to English locale if the system default is not available
@@ -183,7 +184,7 @@ ARDUINO 1.5.4 BETA 2013.09.10
183184
[core]
184185
* avr: fixed bug introduced with recent optimizations in HardwareSerial (atmega8 cpu) (darryl)
185186

186-
ARDUINO 1.5.3 BETA 2013.08.30
187+
ARDUINO 1.5.3 BETA - 2013.08.30
187188

188189
[ide]
189190
* Removed useless baud rates from serial monitor

hardware/arduino/sam/libraries/Wire/Wire.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ static inline bool TWI_STATUS_NACK(uint32_t status) {
9595
TwoWire::TwoWire(Twi *_twi, void(*_beginCb)(void)) :
9696
twi(_twi), rxBufferIndex(0), rxBufferLength(0), txAddress(0),
9797
txBufferLength(0), srvBufferIndex(0), srvBufferLength(0), status(
98-
UNINITIALIZED), onBeginCallback(_beginCb) {
99-
// Empty
98+
UNINITIALIZED), onBeginCallback(_beginCb), twiClock(TWI_CLOCK) {
10099
}
101100

102101
void TwoWire::begin(void) {
@@ -106,7 +105,7 @@ void TwoWire::begin(void) {
106105
// Disable PDC channel
107106
twi->TWI_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS;
108107

109-
TWI_ConfigureMaster(twi, TWI_CLOCK, VARIANT_MCK);
108+
TWI_ConfigureMaster(twi, twiClock, VARIANT_MCK);
110109
status = MASTER_IDLE;
111110
}
112111

@@ -127,6 +126,11 @@ void TwoWire::begin(int address) {
127126
begin((uint8_t) address);
128127
}
129128

129+
void TwoWire::setClock(uint32_t frequency) {
130+
twiClock = frequency;
131+
TWI_SetClock(twi, twiClock, VARIANT_MCK);
132+
}
133+
130134
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop) {
131135
if (quantity > BUFFER_LENGTH)
132136
quantity = BUFFER_LENGTH;

hardware/arduino/sam/libraries/Wire/Wire.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class TwoWire : public Stream {
3535
void begin();
3636
void begin(uint8_t);
3737
void begin(int);
38+
void setClock(uint32_t);
3839
void beginTransmission(uint8_t);
3940
void beginTransmission(int);
4041
uint8_t endTransmission(void);
@@ -100,6 +101,7 @@ class TwoWire : public Stream {
100101

101102
// TWI clock frequency
102103
static const uint32_t TWI_CLOCK = 100000;
104+
uint32_t twiClock;
103105

104106
// Timeouts (
105107
static const uint32_t RECV_TIMEOUT = 100000;

hardware/arduino/sam/libraries/Wire/keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#######################################
1212

1313
begin KEYWORD2
14+
setClock KEYWORD2
1415
beginTransmission KEYWORD2
1516
endTransmission KEYWORD2
1617
requestFrom KEYWORD2

hardware/arduino/sam/system/libsam/include/twi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767

6868
extern void TWI_ConfigureMaster(Twi *pTwi, uint32_t twck, uint32_t mck);
6969

70+
extern void TWI_SetClock( Twi *pTwi, uint32_t dwTwCk, uint32_t dwMCk );
71+
7072
extern void TWI_ConfigureSlave(Twi *pTwi, uint8_t slaveAddress);
7173

7274
extern void TWI_Stop(Twi *pTwi);

hardware/arduino/sam/system/libsam/source/twi.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@
9696
*/
9797
void TWI_ConfigureMaster( Twi* pTwi, uint32_t dwTwCk, uint32_t dwMCk )
9898
{
99-
uint32_t dwCkDiv = 0 ;
100-
uint32_t dwClDiv ;
101-
uint32_t dwOk = 0 ;
102-
10399
assert( pTwi ) ;
104100

105101
/* SVEN: TWI Slave Mode Enabled */
@@ -115,6 +111,19 @@ void TWI_ConfigureMaster( Twi* pTwi, uint32_t dwTwCk, uint32_t dwMCk )
115111
/* Set master mode */
116112
pTwi->TWI_CR = TWI_CR_MSEN ;
117113

114+
/* Configure clock */
115+
TWI_SetClock(pTwi, dwTwCk, dwMCk);
116+
}
117+
118+
119+
void TWI_SetClock( Twi *pTwi, uint32_t dwTwCk, uint32_t dwMCk )
120+
{
121+
assert( pTwi ) ;
122+
123+
uint32_t dwCkDiv = 0 ;
124+
uint32_t dwClDiv ;
125+
uint32_t dwOk = 0 ;
126+
118127
/* Configure clock */
119128
while ( !dwOk )
120129
{
@@ -137,6 +146,7 @@ void TWI_ConfigureMaster( Twi* pTwi, uint32_t dwTwCk, uint32_t dwMCk )
137146
pTwi->TWI_CWGR = (dwCkDiv << 16) | (dwClDiv << 8) | dwClDiv ;
138147
}
139148

149+
140150
/**
141151
* \brief Configures a TWI peripheral to operate in slave mode.
142152
* \param pTwi Pointer to an Twi instance.
Binary file not shown.

hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a.txt

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pmc.o:
7272
00000000 T pmc_switch_udpck_to_upllck
7373

7474
pwmc.o:
75-
00000000 r C.9.8049
75+
00000000 r C.9.8054
7676
00000000 t FindClockConfiguration
7777
00000000 T PWMC_ConfigureChannel
7878
00000000 T PWMC_ConfigureChannelExt
@@ -100,14 +100,14 @@ pwmc.o:
100100
00000000 T PWMC_SetSyncChannelUpdateUnlock
101101
00000000 T PWMC_WriteBuffer
102102
U __assert_func
103-
00000000 r __func__.6631
104-
00000000 r __func__.6642
105-
00000000 r __func__.6657
106-
00000000 r __func__.6668
107-
00000000 r __func__.6679
108-
00000000 r __func__.6686
109-
00000000 r __func__.6770
110-
00000000 r __func__.6776
103+
00000000 r __func__.6635
104+
00000000 r __func__.6646
105+
00000000 r __func__.6661
106+
00000000 r __func__.6672
107+
00000000 r __func__.6683
108+
00000000 r __func__.6690
109+
00000000 r __func__.6774
110+
00000000 r __func__.6780
111111

112112
rtc.o:
113113
00000000 T RTC_ClearSCCR
@@ -123,9 +123,9 @@ rtc.o:
123123
00000000 T RTC_SetTime
124124
00000000 T RTC_SetTimeAlarm
125125
U __assert_func
126-
00000000 r __func__.6628
127-
00000000 r __func__.6637
128-
00000000 r __func__.6642
126+
00000000 r __func__.6632
127+
00000000 r __func__.6641
128+
00000000 r __func__.6646
129129

130130
rtt.o:
131131
00000000 T RTT_EnableIT
@@ -134,8 +134,8 @@ rtt.o:
134134
00000000 T RTT_SetAlarm
135135
00000000 T RTT_SetPrescaler
136136
U __assert_func
137-
00000000 r __func__.6635
138-
00000000 r __func__.6643
137+
00000000 r __func__.6639
138+
00000000 r __func__.6647
139139

140140
spi.o:
141141
00000000 T SPI_Configure
@@ -161,9 +161,9 @@ tc.o:
161161
00000000 T TC_Start
162162
00000000 T TC_Stop
163163
U __assert_func
164-
00000000 r __func__.6630
165-
00000000 r __func__.6636
166-
00000000 r __func__.6642
164+
00000000 r __func__.6634
165+
00000000 r __func__.6640
166+
00000000 r __func__.6646
167167

168168
timetick.o:
169169
00000000 T GetTickCount
@@ -184,24 +184,26 @@ twi.o:
184184
00000000 T TWI_GetStatus
185185
00000000 T TWI_ReadByte
186186
00000000 T TWI_SendSTOPCondition
187+
00000000 T TWI_SetClock
187188
00000000 T TWI_StartRead
188189
00000000 T TWI_StartWrite
189190
00000000 T TWI_Stop
190191
00000000 T TWI_TransferComplete
191192
00000000 T TWI_WriteByte
192193
U __assert_func
193-
00000000 r __func__.7003
194-
00000000 r __func__.7018
195-
00000000 r __func__.7022
196-
00000000 r __func__.7029
197-
00000000 r __func__.7033
198-
00000000 r __func__.7038
199-
00000000 r __func__.7046
200-
00000000 r __func__.7060
201-
00000000 r __func__.7065
202-
00000000 r __func__.7069
203-
00000000 r __func__.7074
204-
00000000 r __func__.7078
194+
00000000 r __func__.7004
195+
00000000 r __func__.7010
196+
00000000 r __func__.7028
197+
00000000 r __func__.7032
198+
00000000 r __func__.7039
199+
00000000 r __func__.7043
200+
00000000 r __func__.7048
201+
00000000 r __func__.7056
202+
00000000 r __func__.7070
203+
00000000 r __func__.7075
204+
00000000 r __func__.7079
205+
00000000 r __func__.7084
206+
00000000 r __func__.7088
205207

206208
usart.o:
207209
00000000 T USART_Configure
@@ -220,7 +222,7 @@ usart.o:
220222
00000000 T USART_Write
221223
00000000 T USART_WriteBuffer
222224
U __assert_func
223-
00000000 r __func__.6924
225+
00000000 r __func__.6928
224226

225227
wdt.o:
226228
00000000 T WDT_Disable
@@ -298,7 +300,7 @@ startup_sam3xa.o:
298300
U main
299301

300302
adc.o:
301-
00000000 r C.0.8141
303+
00000000 r C.0.8146
302304
00000000 T adc_configure_power_save
303305
00000000 T adc_configure_sequence
304306
00000000 T adc_configure_timing
@@ -488,7 +490,7 @@ efc.o:
488490
00000000 T efc_set_flash_access_mode
489491
00000000 T efc_set_wait_state
490492
0000006c T efc_write_fmr
491-
00000000 b iap_perform_command.6905
493+
00000000 b iap_perform_command.6909
492494

493495
gpbr.o:
494496
00000000 T gpbr_read

libraries/GSM/src/GSM3ShieldV1AccessProvider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#define __TOUTMODEMCONFIGURATION__ 5000//equivalent to 30000 because of time in interrupt routine.
77
#define __TOUTAT__ 1000
88

9-
char _command_AT[] PROGMEM = "AT";
10-
char _command_CGREG[] PROGMEM = "AT+CGREG?";
9+
const char _command_AT[] PROGMEM = "AT";
10+
const char _command_CGREG[] PROGMEM = "AT+CGREG?";
1111

1212

1313
GSM3ShieldV1AccessProvider::GSM3ShieldV1AccessProvider(bool debug)

libraries/GSM/src/GSM3ShieldV1BaseProvider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int GSM3ShieldV1BaseProvider::ready()
1212
return theGSM3ShieldV1ModemCore.getCommandError();
1313
};
1414

15-
void GSM3ShieldV1BaseProvider::prepareAuxLocate(PROGMEM prog_char str[], char auxLocate[])
15+
void GSM3ShieldV1BaseProvider::prepareAuxLocate(PGM_P str, char auxLocate[])
1616
{
1717
int i=0;
1818
char c;

libraries/GSM/src/GSM3ShieldV1BaseProvider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class GSM3ShieldV1BaseProvider
5454
@param str PROGMEN
5555
@param auxLocate Buffer where to locate strings
5656
*/
57-
void prepareAuxLocate(PROGMEM prog_char str[], char auxLocate[]);
57+
void prepareAuxLocate(PGM_P str, char auxLocate[]);
5858

5959
/** Manages modem response
6060
@param from Initial byte of buffer
@@ -70,4 +70,4 @@ class GSM3ShieldV1BaseProvider
7070

7171
};
7272

73-
#endif
73+
#endif

libraries/GSM/src/GSM3ShieldV1DataNetworkProvider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include <GSM3ShieldV1DataNetworkProvider.h>
22
#include <Arduino.h>
33

4-
char _command_CGATT[] PROGMEM = "AT+CGATT=";
5-
char _command_SEPARATOR[] PROGMEM = "\",\"";
4+
const char _command_CGATT[] PROGMEM = "AT+CGATT=";
5+
const char _command_SEPARATOR[] PROGMEM = "\",\"";
66

77
//Attach GPRS main function.
88
GSM3_NetworkStatus_t GSM3ShieldV1DataNetworkProvider::attachGPRS(char* apn, char* user_name, char* password, bool synchronous)

libraries/GSM/src/GSM3ShieldV1ModemCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void GSM3ShieldV1ModemCore::closeCommand(int code)
7575
}
7676

7777
//Generic command (stored in flash).
78-
void GSM3ShieldV1ModemCore::genericCommand_rq(PROGMEM prog_char str[], bool addCR)
78+
void GSM3ShieldV1ModemCore::genericCommand_rq(PGM_P str, bool addCR)
7979
{
8080
theBuffer().flush();
8181
writePGM(str, addCR);
@@ -157,7 +157,7 @@ void GSM3ShieldV1ModemCore::openCommand(GSM3ShieldV1BaseProvider* provider, GSM3
157157

158158
};
159159

160-
size_t GSM3ShieldV1ModemCore::writePGM(PROGMEM prog_char str[], bool CR)
160+
size_t GSM3ShieldV1ModemCore::writePGM(PGM_P str, bool CR)
161161
{
162162
int i=0;
163163
char c;

0 commit comments

Comments
 (0)