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

Commit bf75b7f

Browse files
committed
Update core based on HAL
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 4ce6db6 commit bf75b7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2780
-14255
lines changed

cores/arduino/Arduino.h

100755100644
Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,68 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20-
/*
21-
* Arduino srl
22-
* Firmware and Library Development Team
23-
*
24-
* Francesco Alessi (alfran) - francesco@arduino.org
25-
* 2016 Jun 9: Edited for Arduino STAR OTTO first release
26-
*/
27-
28-
2920
#ifndef Arduino_h
3021
#define Arduino_h
31-
#include "WProgram.h"
22+
23+
#include <stdint.h>
24+
#include <stdlib.h>
25+
#include <stdbool.h>
26+
#include <string.h>
27+
#include <math.h>
28+
29+
#include "binary.h"
30+
#include "itoa.h"
31+
32+
#ifdef __cplusplus
33+
extern "C"{
34+
#endif // __cplusplus
35+
36+
// Includes CMSIS
37+
#include <chip.h>
38+
39+
#include "wiring_constants.h"
40+
41+
#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L )
42+
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) )
43+
#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) )
44+
45+
void yield(void);
46+
47+
/* sketch */
48+
extern void setup( void ) ;
49+
extern void loop( void ) ;
50+
51+
/* Define attribute */
52+
#if defined ( __CC_ARM ) /* Keil uVision 4 */
53+
#define WEAK (__attribute__ ((weak)))
54+
#elif defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
55+
#define WEAK __weak
56+
#elif defined ( __GNUC__ ) /* GCC CS */
57+
#define WEAK __attribute__ ((weak))
3258
#endif
3359

34-
typedef uint8 boolean;
35-
typedef uint8 byte;
60+
#ifdef __cplusplus
61+
} // extern "C"
62+
#endif // __cplusplus
3663

37-
#include "variant.h"
38-
#include "Tone.h"
64+
#ifdef __cplusplus
3965
#include "WCharacter.h"
66+
#include "WString.h"
67+
#include "Tone.h"
4068
#include "WMath.h"
69+
#include "HardwareSerial.h"
70+
#include "wiring_pulse.h"
71+
#include "usb_serial.h"
72+
#endif // __cplusplus
73+
74+
75+
// Include board variant
76+
#include "variant.h"
77+
78+
#include "wiring.h"
79+
#include "wiring_digital.h"
80+
#include "wiring_analog.h"
81+
#include "wiring_shift.h"
82+
#include "WInterrupts.h"
83+
84+
#endif // Arduino_h

cores/arduino/Client.h

100755100644
File mode changed.

0 commit comments

Comments
 (0)