Skip to content

Commit f9b0798

Browse files
committed
feat(core): first step of the migration: foundation (enums and types)
Signed-off-by: Aymane Bahssain <[email protected]>
1 parent fb39ccf commit f9b0798

Some content is hidden

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

46 files changed

+453
-4502
lines changed

cmake/boards_db.cmake

Lines changed: 132 additions & 132 deletions
Large diffs are not rendered by default.

cores/arduino/Arduino.h

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,37 @@
3333
#include "SrcWrapper.h"
3434
#endif
3535

36+
#include "api/ArduinoAPI.h"
3637
#include "wiring.h"
38+
#include "avr/dtostrf.h"
3739

3840
/* sketch */
3941

4042
#ifdef __cplusplus
4143
extern "C" {
4244
#endif // __cplusplus
43-
// Weak empty variant initialization function.
44-
// May be redefined by variant files.
45-
extern void initVariant() __attribute__((weak));
4645

47-
extern void setup(void) ;
48-
extern void loop(void) ;
4946

50-
void yield(void);
5147
#ifdef __cplusplus
5248
} // extern "C"
5349
#endif // __cplusplus
5450

5551
// Include pins variant
5652
#include "pins_arduino.h"
5753

54+
//EXTENDED
55+
56+
57+
58+
#ifdef __cplusplus
59+
typedef std::function<void(void)> callback_function_t;
60+
/*
61+
* \brief Stop tone generation on pin.
62+
*
63+
* \param _pin
64+
*/
65+
extern void noTone(uint8_t _pin, bool destruct);
66+
67+
#endif
68+
5869
#endif // Arduino_h

cores/arduino/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ target_link_libraries(core INTERFACE core_usage)
2020

2121
add_library(core_bin STATIC EXCLUDE_FROM_ALL
2222
abi.cpp
23+
api/CanMsg.cpp
24+
api/CanMsgRingbuffer.cpp
25+
api/Common.cpp
26+
api/IPAddress.cpp
27+
api/PluggableUSB.cpp
28+
api/Print.cpp
29+
api/Stream.cpp
30+
api/String.cpp
2331
avr/dtostrf.c
2432
board.c
2533
core_debug.c
2634
HardwareSerial.cpp
2735
hooks.c
28-
IPAddress.cpp
2936
itoa.c
3037
main.cpp
3138
pins_arduino.c
32-
Print.cpp
33-
RingBuffer.cpp
3439
stm32/startup_stm32yyxx.S
35-
Stream.cpp
3640
Tone.cpp
3741
WInterrupts.cpp
3842
wiring_analog.c
@@ -42,7 +46,6 @@ add_library(core_bin STATIC EXCLUDE_FROM_ALL
4246
wiring_time.c
4347
WMath.cpp
4448
WSerial.cpp
45-
WString.cpp
4649
)
4750
target_link_libraries(core_bin PUBLIC core_usage)
4851

cores/arduino/Client.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

cores/arduino/HardwareSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <inttypes.h>
2828

29-
#include "Stream.h"
29+
#include "Arduino.h"
3030
#include "uart.h"
3131

3232
// Define constants and variables for buffering incoming serial data. We're

cores/arduino/IPAddress.cpp

Lines changed: 0 additions & 115 deletions
This file was deleted.

cores/arduino/IPAddress.h

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)