Skip to content

Fixed included headers #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cores/arduino/WInterrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "WInterrupts.h"
#include "Arduino.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/WInterrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef _WIRING_INTERRUPTS_
#define _WIRING_INTERRUPTS_

#include "Arduino.h"
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
Expand Down
14 changes: 0 additions & 14 deletions cores/arduino/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@
#include "usb_interface.h"
#endif //USBCON

/* Define attribute */
#if defined ( __GNUC__ ) /* GCC CS3 */
#define WEAK __attribute__ ((weak))
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
#define WEAK __weak
#endif

/* Define NO_INIT attribute */
#if defined ( __GNUC__ )
#define NO_INIT
#elif defined ( __ICCARM__ )
#define NO_INIT __no_init
#endif

void init( void ) ;

#endif /* _BOARD_H_ */
6 changes: 4 additions & 2 deletions cores/arduino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#ifndef _PINS_ARDUINO_H_
#define _PINS_ARDUINO_H_

// API compatibility
#include "PeripheralPins.h"
#include "pins_arduino_common.h"
#include "variant.h"

#ifdef __cplusplus
Expand All @@ -29,7 +30,8 @@ extern "C" {
* Libc porting layers
*/
#if defined ( __GNUC__ ) /* GCC CS3 */
# include <syscalls.h> /** RedHat Newlib minimal stub */
#include <syscalls.h> /** RedHat Newlib minimal stub */
#define WEAK __attribute__ ((weak))
#endif

#define NOT_AN_INTERRUPT NC // -1
Expand Down
50 changes: 50 additions & 0 deletions cores/arduino/pins_arduino_common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Common pins Arduino definition
*
* Copyright (C) 2017, STMicroelectronics - All Rights Reserved
* Author: Frederic Pillon for STMicroelectronics.
*
* License type: GPLv2
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef _PINS_ARDUINO_COMMON_H_
#define _PINS_ARDUINO_COMMON_H_

// Arduino digital pin alias
// GPIO port (A to K) * 16 pins: 176
enum {
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9,
D10, D11, D12, D13, D14, D15, D16, D17, D18, D19,
D20, D21, D22, D23, D24, D25, D26, D27, D28, D29,
D30, D31, D32, D33, D34, D35, D36, D37, D38, D39,
D40, D41, D42, D43, D44, D45, D46, D47, D48, D49,
D50, D51, D52, D53, D54, D55, D56, D57, D58, D59,
D60, D61, D62, D63, D64, D65, D66, D67, D68, D69,
D70, D71, D72, D73, D74, D75, D76, D77, D78, D79,
D80, D81, D82, D83, D84, D85, D86, D87, D88, D89,
D90, D91, D92, D93, D94, D95, D96, D97, D98, D99,
D100, D101, D102, D103, D104, D105, D106, D107, D108, D109,
D110, D111, D112, D113, D114, D115, D116, D117, D118, D119,
D120, D121, D122, D123, D124, D125, D126, D127, D128, D129,
D130, D131, D132, D133, D134, D135, D136, D137, D138, D139,
D140, D141, D142, D143, D144, D145, D146, D147, D148, D149,
D150, D151, D152, D153, D154, D155, D156, D157, D158, D159,
D160, D161, D162, D163, D164, D165, D166, D167, D168, D169,
D170, D171, D172, D173, D174, D175,
DMAX
};

#endif /*_PINS_ARDUINO_COMMON_H_*/

1 change: 0 additions & 1 deletion cores/arduino/stm32/analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"
#include "analog.h"
#include "timer.h"
#include "PinAF_STM32F1.h"
Expand Down
1 change: 0 additions & 1 deletion cores/arduino/stm32/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion cores/arduino/stm32/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"
#include "interrupt.h"

#ifdef __cplusplus
Expand Down
1 change: 0 additions & 1 deletion cores/arduino/stm32/spi_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"
#include "spi_com.h"
#include "PinAF_STM32F1.h"

Expand Down
1 change: 0 additions & 1 deletion cores/arduino/stm32/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"
#include "timer.h"
#include "digital_io.h"
#include "clock.h"
Expand Down
1 change: 0 additions & 1 deletion cores/arduino/stm32/twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
* @{
*/
#include "stm32_def.h"
#include "hw_config.h"
#include "twi.h"
#include "PinAF_STM32F1.h"

Expand Down
5 changes: 1 addition & 4 deletions cores/arduino/stm32/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,8 @@
/** @addtogroup STM32F4xx_System_Private_Includes
* @{
*/
#include "hw_config.h"
#include "uart.h"
#include "digital_io.h"
#include "interrupt.h"
#include "variant.h"
#include "Arduino.h"
#include "PinAF_STM32F1.h"

#ifdef __cplusplus
Expand Down
3 changes: 1 addition & 2 deletions cores/arduino/stm32/uart_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@
/** @addtogroup STM32F4xx_System_Private_Includes
* @{
*/
#include "hw_config.h"
#include "uart_emul.h"
#include "digital_io.h"
#include "interrupt.h"
#include "variant.h"
#include "Arduino.h"

#if defined(TIM1_BASE) && defined(UART_EMUL_RX) && defined(UART_EMUL_TX)
#ifdef __cplusplus
Expand Down
2 changes: 0 additions & 2 deletions cores/arduino/wiring.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,4 @@ extern "C"{
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) )
#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) )



#endif /* _WIRING_H_ */
24 changes: 0 additions & 24 deletions cores/arduino/wiring_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,6 @@ extern "C"{

#include <stdbool.h>

// Arduino digital pin alias
// GPIO port (A to K) * 16 pins: 176
enum {
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9,
D10, D11, D12, D13, D14, D15, D16, D17, D18, D19,
D20, D21, D22, D23, D24, D25, D26, D27, D28, D29,
D30, D31, D32, D33, D34, D35, D36, D37, D38, D39,
D40, D41, D42, D43, D44, D45, D46, D47, D48, D49,
D50, D51, D52, D53, D54, D55, D56, D57, D58, D59,
D60, D61, D62, D63, D64, D65, D66, D67, D68, D69,
D70, D71, D72, D73, D74, D75, D76, D77, D78, D79,
D80, D81, D82, D83, D84, D85, D86, D87, D88, D89,
D90, D91, D92, D93, D94, D95, D96, D97, D98, D99,
D100, D101, D102, D103, D104, D105, D106, D107, D108, D109,
D110, D111, D112, D113, D114, D115, D116, D117, D118, D119,
D120, D121, D122, D123, D124, D125, D126, D127, D128, D129,
D130, D131, D132, D133, D134, D135, D136, D137, D138, D139,
D140, D141, D142, D143, D144, D145, D146, D147, D148, D149,
D150, D151, D152, D153, D154, D155, D156, D157, D158, D159,
D160, D161, D162, D163, D164, D165, D166, D167, D168, D169,
D170, D171, D172, D173, D174, D175,
DEND
};

#define HIGH 0x1
#define LOW 0x0

Expand Down
2 changes: 1 addition & 1 deletion libraries/SPI/src/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef _SPI_H_INCLUDED
#define _SPI_H_INCLUDED

#include "variant.h"
#include "Arduino.h"
#include <stdio.h>

// SPI_HAS_TRANSACTION means SPI has
Expand Down
2 changes: 1 addition & 1 deletion libraries/Wire/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <inttypes.h>
#include "Stream.h"
#include "variant.h"
#include "Arduino.h"

#define BUFFER_LENGTH 32

Expand Down