Skip to content

Commit 1a1856c

Browse files
committedJun 14, 2015
License fix and cosmetic changes.
1 parent 8bf65ca commit 1a1856c

25 files changed

+87
-98
lines changed
 

‎boards.txt

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright (c) 2014-2015 Arduino LLC. All right reserved.
2+
#
3+
# This library is free software; you can redistribute it and/or
4+
# modify it under the terms of the GNU Lesser General Public
5+
# License as published by the Free Software Foundation; either
6+
# version 2.1 of the License, or (at your option) any later version.
7+
#
8+
# This library is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
# See the GNU Lesser General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Lesser General Public
14+
# License along with this library; if not, write to the Free Software
15+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16+
117
arduino_zero_edbg.name=Arduino Zero (Programming Port)
218
arduino_zero_edbg.vid.0=0x03eb
319
arduino_zero_edbg.pid.0=0x2157

‎cores/arduino/Arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Arduino.h - Main include file for the Arduino SDK
3-
Copyright (c) 2014 Arduino Team. All right reserved.
3+
Copyright (c) 2014 Arduino LLC. All right reserved.
44
55
This library is free software; you can redistribute it and/or
66
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/HardwareSerial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/Reset.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/Reset.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2012 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -16,8 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#ifndef RESET_H
20-
#define RESET_H
19+
#pragma once
2120

2221
#ifdef __cplusplus
2322
extern "C" {
@@ -30,5 +29,3 @@ void cancelReset();
3029
#ifdef __cplusplus
3130
}
3231
#endif
33-
34-
#endif

‎cores/arduino/Tone.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/Tone.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -16,8 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#ifndef _WIRING_TONE_
20-
#define _WIRING_TONE_
19+
#pragma once
2120

2221
#ifdef __cplusplus
2322

@@ -28,6 +27,4 @@ void noTone(uint32_t _pin);
2827

2928
void toneAccurateClock (uint32_t);
3029

31-
#endif /* __cplusplus */
32-
33-
#endif /* _WIRING_TONE_ */
30+
#endif

‎cores/arduino/Uart.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/Uart.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -16,8 +16,7 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#ifndef _SERCOM_UART_CLASS
20-
#define _SERCOM_UART_CLASS
19+
#pragma once
2120

2221
#include "HardwareSerial.h"
2322
#include "SERCOM.h"
@@ -56,5 +55,3 @@ class Uart : public HardwareSerial
5655
SercomUartCharSize extractCharSize(uint8_t config);
5756
SercomParityMode extractParity(uint8_t config);
5857
};
59-
60-
#endif

‎cores/arduino/WInterrupts.c

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -35,24 +35,13 @@ static struct
3535
/* Configure I/O interrupt sources */
3636
static void __initialize()
3737
{
38-
#if 0
39-
int i ;
40-
41-
for ( i = 0 ; i < EXTERNAL_NUM_INTERRUPTS ; i++ )
42-
{
43-
callbacksInt[i]._callback = NULL ;
44-
}
45-
#else
4638
memset( callbacksInt, 0, sizeof( callbacksInt ) ) ;
47-
#endif
4839

4940
NVIC_DisableIRQ( EIC_IRQn ) ;
5041
NVIC_ClearPendingIRQ( EIC_IRQn ) ;
5142
NVIC_SetPriority( EIC_IRQn, 0 ) ;
5243
NVIC_EnableIRQ( EIC_IRQn ) ;
5344

54-
55-
5645
// Enable GCLK for IEC (External Interrupt Controller)
5746
GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID( GCM_EIC )) ;
5847

‎cores/arduino/WVariant.h

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -16,15 +16,14 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#ifndef _VARIANTS_
20-
#define _VARIANTS_
19+
#pragma once
2120

2221
#include <stdint.h>
2322
#include "sam.h"
2423

2524
#ifdef __cplusplus
2625
extern "C" {
27-
#endif // __cplusplus
26+
#endif
2827

2928
/* Definitions and types for pins */
3029
typedef enum _EAnalogChannel
@@ -227,6 +226,4 @@ extern const PinDescription g_APinDescription[] ;
227226

228227
#ifdef __cplusplus
229228
} // extern "C"
230-
#endif // __cplusplus
231-
232-
#endif // _VARIANTS_
229+
#endif

‎cores/arduino/abi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2014 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/avr/dtostrf.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
dtostrf - Emulation for dtostrf function from avr-libc
3-
Copyright (c) 2014 Arduino. All rights reserved.
4-
Written by Cristian Maglie <c.maglie@bug.st>
3+
Copyright (c) 2015 Arduino LLC. All rights reserved.
4+
Written by Cristian Maglie <c.maglie@arduino.cc>
55
66
This library is free software; you can redistribute it and/or
77
modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,8 @@
1818
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1919
*/
2020

21+
#pragma once
22+
2123
#ifdef __cplusplus
2224
extern "C" {
2325
#endif

‎cores/arduino/delay.c

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
3+
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
This library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12+
See the GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
18+
119
#include "delay.h"
220
#include "Arduino.h"
321

‎cores/arduino/delay.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/hooks.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/itoa.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2014 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -20,11 +20,11 @@
2020
#include <string.h>
2121

2222
#ifdef __cplusplus
23-
extern "C"{
24-
#endif // __cplusplus
23+
extern "C" {
24+
#endif
2525

26-
#if 0
2726
/* reverse: reverse string s in place */
27+
/*
2828
static void reverse( char s[] )
2929
{
3030
int i, j ;
@@ -37,22 +37,24 @@ static void reverse( char s[] )
3737
s[j] = c ;
3838
}
3939
}
40+
*/
4041

4142
/* itoa: convert n to characters in s */
43+
/*
4244
extern void itoa( int n, char s[] )
4345
{
4446
int i, sign ;
4547
46-
if ( (sign = n) < 0 ) /* record sign */
48+
if ( (sign = n) < 0 ) // record sign
4749
{
48-
n = -n; /* make n positive */
50+
n = -n; // make n positive
4951
}
5052
5153
i = 0;
5254
do
53-
{ /* generate digits in reverse order */
54-
s[i++] = n % 10 + '0'; /* get next digit */
55-
} while ((n /= 10) > 0) ; /* delete it */
55+
{ // generate digits in reverse order
56+
s[i++] = n % 10 + '0'; // get next digit
57+
} while ((n /= 10) > 0) ; // delete it
5658
5759
if (sign < 0 )
5860
{
@@ -63,8 +65,7 @@ extern void itoa( int n, char s[] )
6365
6466
reverse( s ) ;
6567
}
66-
67-
#else
68+
*/
6869

6970
extern char* itoa( int value, char *string, int radix )
7071
{
@@ -163,8 +164,7 @@ extern char* ultoa( unsigned long value, char *string, int radix )
163164

164165
return string;
165166
}
166-
#endif /* 0 */
167167

168168
#ifdef __cplusplus
169169
} // extern "C"
170-
#endif // __cplusplus
170+
#endif

‎cores/arduino/itoa.h

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -16,27 +16,20 @@
1616
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
1818

19-
#ifndef _ITOA_
20-
#define _ITOA_
19+
#pragma once
2120

2221
#ifdef __cplusplus
2322
extern "C"{
24-
#endif // __cplusplus
23+
#endif
2524

26-
#if 0
27-
28-
extern void itoa( int n, char s[] ) ;
29-
30-
#else
25+
//extern void itoa( int n, char s[] ) ;
3126

3227
extern char* itoa( int value, char *string, int radix ) ;
3328
extern char* ltoa( long value, char *string, int radix ) ;
3429
extern char* utoa( unsigned long value, char *string, int radix ) ;
3530
extern char* ultoa( unsigned long value, char *string, int radix ) ;
36-
#endif /* 0 */
3731

3832
#ifdef __cplusplus
3933
} // extern "C"
40-
#endif // __cplusplus
34+
#endif
4135

42-
#endif // _ITOA_

‎cores/arduino/startup.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

‎cores/arduino/wiring.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public

0 commit comments

Comments
 (0)
Please sign in to comment.