From 74731443686e5009fc243713eed670dca0c48b9a Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Wed, 14 Nov 2018 10:21:05 +0100 Subject: [PATCH] PR 364 Review Signed-off-by: Frederic.Pillon --- variants/ARMED_V1/ldscript.ld | 33 +++++++++++++---- variants/ARMED_V1/variant.cpp | 69 ++++++++++++++++------------------- variants/ARMED_V1/variant.h | 14 +++---- 3 files changed, 63 insertions(+), 53 deletions(-) diff --git a/variants/ARMED_V1/ldscript.ld b/variants/ARMED_V1/ldscript.ld index 9af717f7ca..aac1a52c5b 100644 --- a/variants/ARMED_V1/ldscript.ld +++ b/variants/ARMED_V1/ldscript.ld @@ -18,13 +18,32 @@ ** Distribution: The file is distributed as is, without any warranty ** of any kind. ** -** (c)Copyright Ac6. -** You may use this file as-is or modify it according to the needs of your -** project. Distribution of this file (unmodified or modified) is not -** permitted. Ac6 permit registered System Workbench for MCU users the -** rights to distribute the assembled, compiled & linked contents of this -** file as part of an application binary file, provided that it is built -** using the System Workbench for MCU toolchain. +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2014 Ac6

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ***************************************************************************** */ diff --git a/variants/ARMED_V1/variant.cpp b/variants/ARMED_V1/variant.cpp index b2938497fa..ae28b49b23 100644 --- a/variants/ARMED_V1/variant.cpp +++ b/variants/ARMED_V1/variant.cpp @@ -41,53 +41,53 @@ const PinName digitalPin[] = { PA_14, //D14 PA_15, //D15 PB_0, //D16 - PB_1, //D17 - PB_2, //D18 - PB_3, //D19 + PB_1, //D17 + PB_2, //D18 + PB_3, //D19 PB_4, //D20 - PB_5, //D21 + PB_5, //D21 PB_6, //D22 PB_7, //D23 PB_8, //D24 PB_9, //D25 - PB_10, //D26 - PB_11, //D27 - PB_12, //D28 - PB_13, //D29 - PB_14, //D30 - PB_15, //D31 - PC_0, //D32 - PC_1, //D33 - PC_2, //D34 - PC_3, //D35 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + PC_0, //D32/A0 + PC_1, //D33/A1 + PC_2, //D34/A2 + PC_3, //D35 PC_4, //D36 PC_5, //D37 PC_6, //D38 PC_7, //D39 PC_8, //D40 PC_9, //D41 - PC_10, //D42 - PC_11, //D43 - PC_12, //D44 - PC_13, //D45 - PC_14, //D46 - PC_15, //D47 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 PD_0, //D48 - PD_1, //D49 - PD_2, //D50 - PD_3, //D51 - PD_4, //D52 - PD_5, //D53 - PD_6, //D54 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 PD_7, //D55 - PD_8, //D56 - PD_9, //D57 + PD_8, //D56 + PD_9, //D57 PD_10, //D58 - PD_11, //D59 + PD_11, //D59 PD_12, //D60 PD_13, //D61 - PD_14, //D62 - PD_15, //D63 + PD_14, //D62 + PD_15, //D63 PE_0, //D64 PE_1, //D65 PE_2, //D66 @@ -103,12 +103,7 @@ const PinName digitalPin[] = { PE_12, //D76 PE_13, //D77 PE_14, //D78 - PE_15, //D79 -//Duplicated to have A0-A2 as F407 do not have Uno like connector -// and to be aligned with PinMap_ADC - PC_0,//D80/A0 = D32 - PC_1,//D81/A1 = D33 - PC_2 //D82/A2 = D34 + PE_15 //D79 }; #ifdef __cplusplus diff --git a/variants/ARMED_V1/variant.h b/variants/ARMED_V1/variant.h index ec123d2711..50c8a31c2d 100644 --- a/variants/ARMED_V1/variant.h +++ b/variants/ARMED_V1/variant.h @@ -65,9 +65,9 @@ extern const PinName digitalPin[]; #define PB13 29 //D29 #define PB14 30 //D30 #define PB15 31 //D31 -#define PC0 32 //D32 -#define PC1 33 //D33 -#define PC2 34 //D34 +#define PC0 32 //D32/A0 +#define PC1 33 //D33/A1 +#define PC2 34 //D34/A2 #define PC3 35 //D35 #define PC4 36 //D36 #define PC5 37 //D37 @@ -118,7 +118,7 @@ extern const PinName digitalPin[]; #define NUM_DIGITAL_PINS 83 // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS #define NUM_ANALOG_INPUTS 3 -#define NUM_ANALOG_FIRST 80 +#define NUM_ANALOG_FIRST 32 // PWM resolution #define PWM_RESOLUTION 8 @@ -129,9 +129,6 @@ extern const PinName digitalPin[]; #define LED_BUILTIN PB7 #define LED_HEARTBEAT LED_BUILTIN -// On-board user button -// #define USER_BTN 2 - // SPI Definitions #define PIN_SPI_SS PE7 #define PIN_SPI_MOSI PA7 @@ -178,8 +175,7 @@ extern const PinName digitalPin[]; // // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX // pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial // Require connections for ST-LINK VCP on U2 pin 12 and 13. - // See UM �6.1.3 ST-LINK/V2-A VCP configuration) +#define SERIAL_PORT_MONITOR Serial #define SERIAL_PORT_HARDWARE_OPEN Serial #endif