Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 8a101b8

Browse files
Merge pull request #18 from arduino-org/development
Release 1.0.0
2 parents 0fca939 + 15e4a10 commit 8a101b8

File tree

22 files changed

+444
-642
lines changed

22 files changed

+444
-642
lines changed

cores/arduino/Arduino.h

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

420
/*
521
* Arduino srl

cores/arduino/HardwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
/* UART handler declaration */
4545
UART_HandleTypeDef UartHandle;
4646

47-
HardwareSerial Serial0(UART4_dev);
47+
HardwareSerial Serial(UART4_dev);//Serial0(UART4_dev);
4848
HardwareSerial Serial1(USART3_dev);
4949
HardwareSerial Serial2(USART2_dev);
5050
HardwareSerial Serial3(USART6_dev);

cores/arduino/HardwareSerial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class HardwareSerial : public Stream {
7979
uint8 rx_pin;
8080
};
8181

82-
extern HardwareSerial Serial0;
82+
extern HardwareSerial Serial;//Serial0;
8383
extern HardwareSerial Serial1;
8484
extern HardwareSerial Serial2;
8585
extern HardwareSerial Serial3;

cores/arduino/SPI.h

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
* published by the Free Software Foundation.
1212
*/
1313

14+
/*
15+
* Arduino srl - www.arduino.org
16+
* 2016 Jun 9: Edited Francesco Alessi (alfran) - [email protected]
17+
*/
18+
1419
#ifndef _SPI_H_INCLUDED
1520
#define _SPI_H_INCLUDED
1621

cores/arduino/WCharacter.h

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#ifndef Character_h
2121
#define Character_h
22-
//ciao
2322
#include <ctype.h>
2423

2524
// WCharacter.h prototypes

cores/arduino/dac.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void dac_init(const dac_dev *dev, uint32 flags) {
7979
* DAC_CH1: Select channel 1
8080
* DAC_CH2: Select channel 2
8181
* @param status Status:
82-
* 1: enable buffer
82+
* 1: enable buffer
8383
* 0: disable buffer
8484
*/
8585
void dac_enable_buffer(const dac_dev *dev, uint32 flags, int status) {
@@ -124,7 +124,6 @@ void dac_write_channel(const dac_dev *dev, uint8 channel, uint16 val) {
124124
* @brief Enable a DAC channel
125125
* @param dev DAC device
126126
* @param channel channel to enable, either 1 or 2
127-
* @sideeffect May change pin mode of PA4 or PA5
128127
*/
129128
void dac_enable_channel(const dac_dev *dev, uint8 channel) {
130129
/*

cores/arduino/delay.h

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright (c) 2014 Arduino. 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
/**
220
* @file delay.h
321
* @brief Delay implementation
@@ -41,4 +59,3 @@ static inline void delay_ns100(uint32 us) {
4159
: "r0");
4260
}
4361
#endif
44-

cores/arduino/rcc.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void InitMCO1()
223223
gpio_set_mode(GPIOA_dev, 8, GPIO_MODE_AF | GPIO_OTYPE_PP | GPIO_OSPEED_100MHZ);
224224
}
225225

226-
void SetupClock() // to be setted properly
226+
void SetupClock()
227227
{
228228

229229
RCC_ClkInitTypeDef RCC_ClkInitStruct;
@@ -302,9 +302,6 @@ void SetupClock() // to be setted properly
302302
rcc_dev_clk_speed_table[RCC_APB1] = (SystemCoreClock/4);
303303
}
304304

305-
// alfran ----- end
306-
307-
308305
void rcc_clk_init(rcc_sysclk_src sysclk_src,
309306
rcc_pllsrc pll_src,
310307
rcc_pll_multiplier pll_mul) {

cores/arduino/usb_serial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extern __IO uint32_t UserRxBufPtrIn;
5757
extern __IO uint32_t UserRxBufPtrOut;
5858
__IO uint32_t usbEnableBlockingTx;
5959

60-
USBSerial Serial;
60+
//USBSerial Serial;
6161
USBSerial SerialUSB;
6262

6363

cores/arduino/usb_serial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class USBSerial : public Stream {
7171

7272
};
7373

74-
extern USBSerial Serial;
74+
//extern USBSerial Serial;
7575
extern USBSerial SerialUSB;
7676

7777
#endif

libraries/Audio/example/SimpleAudioPlayer/SimpleAudioPlayer.ino

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
void setup() {
2424
// initialize serial communication at 9600 bits per second:
25-
Serial.begin(115200);
26-
delay(15000);
25+
SerialUSB.begin(115200);
26+
while(!SerialUSB);
2727

2828
/* Test begin() method */
2929
while (SD.begin(SD_DETECT_PIN) != TRUE)
@@ -38,21 +38,21 @@ void loop() {
3838
const int S = 1024; // Number of samples to read in block
3939
uint32_t buffer[S];
4040
int duration;
41-
delay(5000); // delay for console
41+
delay(1000); // delay for console
4242

4343
File myFile = SD.open("test.wav");
4444
if (!myFile.available()) {
4545
// if the file didn't open, print an error and stop
46-
Serial.println("error opening test.wav");
46+
SerialUSB.println("error opening test.wav");
4747
while (true);
4848
} else {
49-
Serial.println("test.wav open OK");
49+
SerialUSB.println("test.wav open OK");
5050
}
5151

5252
myFile.read((void*) &WaveFormat, sizeof(WaveFormat));
5353

5454
delay(1000);
55-
Serial.println("STARTUP AUDIO\r\n");
55+
SerialUSB.println("STARTUP AUDIO\r\n");
5656
delay(1000);
5757
Audio.begin(WaveFormat.SampleRate, 100);
5858

@@ -68,7 +68,7 @@ void loop() {
6868
// Every 100 block print a '.'
6969
count++;
7070
if (count == 1000) {
71-
Serial.print(".");
71+
SerialUSB.print(".");
7272
count = 0;
7373
}
7474
// read from the file into buffer
@@ -78,11 +78,11 @@ void loop() {
7878
Audio.write(buffer, sizeof(buffer));
7979
}
8080
/* reaching end of file */
81-
Serial.println("End of file. Thank you for listening!");
81+
SerialUSB.println("End of file. Thank you for listening!");
8282
Audio.end();
8383
myFile.close();
8484

8585
delay(5000);
86-
Serial.println("Restart Playing");
86+
SerialUSB.println("Restart Playing");
8787

8888
}

libraries/Audio/example/SimpleAudioPlayerWithDebug/SimpleAudioPlayerWithDebug.ino

-161
This file was deleted.

0 commit comments

Comments
 (0)