Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcffb347

Browse files
authored
Merge pull request#1007 from 3devo/astyle-indent-preproc-block
Astyle indent preproc block
2 parents3102bae +4ab0fc3 commitcffb347

File tree

394 files changed

+5399
-5398
lines changed

Some content is hidden

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

394 files changed

+5399
-5398
lines changed

‎CI/astyle/.astylerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ indent-classes
2020
indent-switches
2121
indent-cases
2222
indent-col1-comments
23+
indent-preproc-block
2324

2425
# Remove spaces in and around parentheses
2526
unpad-paren

‎cores/arduino/Arduino.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
+ __GNUC_PATCHLEVEL__)
2727
#endif
2828
#ifGCC_VERSION<60300
29-
#error "GCC version 6.3 or higher is required"
29+
#error "GCC version 6.3 or higher is required"
3030
#endif
3131

3232
#ifdef__IN_ECLIPSE__
33-
#include"SrcWrapper.h"
33+
#include"SrcWrapper.h"
3434
#endif
3535

3636
#include"wiring.h"

‎cores/arduino/HardwareSerial.cpp

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -28,81 +28,81 @@
2828

2929
#if defined(HAL_UART_MODULE_ENABLED) && !defined(HAL_UART_MODULE_ONLY)
3030
#if defined(HAVE_HWSERIAL1) || defined(HAVE_HWSERIAL2) || defined(HAVE_HWSERIAL3) ||\
31-
defined(HAVE_HWSERIAL4) || defined(HAVE_HWSERIAL5) || defined(HAVE_HWSERIAL6) ||\
32-
defined(HAVE_HWSERIAL7) || defined(HAVE_HWSERIAL8) || defined(HAVE_HWSERIAL9) ||\
33-
defined(HAVE_HWSERIAL10) || defined(HAVE_HWSERIALLP1)
34-
// SerialEvent functions are weak, so when the user doesn't define them,
35-
// the linker just sets their address to 0 (which is checked below).
36-
#if defined(HAVE_HWSERIAL1)
37-
HardwareSerialSerial1(USART1);
38-
voidserialEvent1() __attribute__((weak));
39-
#endif
40-
41-
#if defined(HAVE_HWSERIAL2)
42-
HardwareSerialSerial2(USART2);
43-
voidserialEvent2() __attribute__((weak));
44-
#endif
45-
46-
#if defined(HAVE_HWSERIAL3)
47-
HardwareSerialSerial3(USART3);
48-
voidserialEvent3() __attribute__((weak));
49-
#endif
50-
51-
#if defined(HAVE_HWSERIAL4)
52-
#if defined(USART4)
53-
HardwareSerialSerial4(USART4);
54-
#else
55-
HardwareSerialSerial4(UART4);
56-
#endif
57-
voidserialEvent4() __attribute__((weak));
58-
#endif
59-
60-
#if defined(HAVE_HWSERIAL5)
61-
#if defined(USART5)
62-
HardwareSerialSerial5(USART5);
63-
#else
64-
HardwareSerialSerial5(UART5);
65-
#endif
66-
voidserialEvent5() __attribute__((weak));
67-
#endif
68-
69-
#if defined(HAVE_HWSERIAL6)
70-
HardwareSerialSerial6(USART6);
71-
voidserialEvent6() __attribute__((weak));
72-
#endif
73-
74-
#if defined(HAVE_HWSERIAL7)
75-
#if defined(USART7)
76-
HardwareSerialSerial7(USART7);
77-
#else
78-
HardwareSerialSerial7(UART7);
79-
#endif
80-
voidserialEvent7() __attribute__((weak));
81-
#endif
82-
83-
#if defined(HAVE_HWSERIAL8)
84-
#if defined(USART8)
85-
HardwareSerialSerial8(USART8);
86-
#else
87-
HardwareSerialSerial8(UART8);
88-
#endif
89-
voidserialEvent8() __attribute__((weak));
90-
#endif
91-
92-
#if defined(HAVE_HWSERIAL9)
93-
HardwareSerialSerial9(UART9);
94-
voidserialEvent9() __attribute__((weak));
95-
#endif
96-
97-
#if defined(HAVE_HWSERIAL10)
98-
HardwareSerialSerial10(UART10);
99-
voidserialEvent10() __attribute__((weak));
100-
#endif
101-
102-
#if defined(HAVE_HWSERIALLP1)
103-
HardwareSerialSerialLP1(LPUART1);
104-
voidserialEventLP1() __attribute__((weak));
105-
#endif
31+
defined(HAVE_HWSERIAL4) || defined(HAVE_HWSERIAL5) || defined(HAVE_HWSERIAL6) ||\
32+
defined(HAVE_HWSERIAL7) || defined(HAVE_HWSERIAL8) || defined(HAVE_HWSERIAL9) ||\
33+
defined(HAVE_HWSERIAL10) || defined(HAVE_HWSERIALLP1)
34+
// SerialEvent functions are weak, so when the user doesn't define them,
35+
// the linker just sets their address to 0 (which is checked below).
36+
#ifdefined(HAVE_HWSERIAL1)
37+
HardwareSerial Serial1(USART1);
38+
voidserialEvent1() __attribute__((weak));
39+
#endif
40+
41+
#if defined(HAVE_HWSERIAL2)
42+
HardwareSerialSerial2(USART2);
43+
voidserialEvent2() __attribute__((weak));
44+
#endif
45+
46+
#if defined(HAVE_HWSERIAL3)
47+
HardwareSerialSerial3(USART3);
48+
voidserialEvent3() __attribute__((weak));
49+
#endif
50+
51+
#if defined(HAVE_HWSERIAL4)
52+
#if defined(USART4)
53+
HardwareSerialSerial4(USART4);
54+
#else
55+
HardwareSerialSerial4(UART4);
56+
#endif
57+
voidserialEvent4() __attribute__((weak));
58+
#endif
59+
60+
#if defined(HAVE_HWSERIAL5)
61+
#if defined(USART5)
62+
HardwareSerialSerial5(USART5);
63+
#else
64+
HardwareSerialSerial5(UART5);
65+
#endif
66+
voidserialEvent5() __attribute__((weak));
67+
#endif
68+
69+
#if defined(HAVE_HWSERIAL6)
70+
HardwareSerialSerial6(USART6);
71+
voidserialEvent6() __attribute__((weak));
72+
#endif
73+
74+
#if defined(HAVE_HWSERIAL7)
75+
#if defined(USART7)
76+
HardwareSerialSerial7(USART7);
77+
#else
78+
HardwareSerialSerial7(UART7);
79+
#endif
80+
voidserialEvent7() __attribute__((weak));
81+
#endif
82+
83+
#if defined(HAVE_HWSERIAL8)
84+
#if defined(USART8)
85+
HardwareSerialSerial8(USART8);
86+
#else
87+
HardwareSerialSerial8(UART8);
88+
#endif
89+
voidserialEvent8() __attribute__((weak));
90+
#endif
91+
92+
#if defined(HAVE_HWSERIAL9)
93+
HardwareSerialSerial9(UART9);
94+
voidserialEvent9() __attribute__((weak));
95+
#endif
96+
97+
#if defined(HAVE_HWSERIAL10)
98+
HardwareSerialSerial10(UART10);
99+
voidserialEvent10() __attribute__((weak));
100+
#endif
101+
102+
#if defined(HAVE_HWSERIALLP1)
103+
HardwareSerialSerialLP1(LPUART1);
104+
voidserialEventLP1() __attribute__((weak));
105+
#endif
106106
#endif// HAVE_HWSERIALx
107107

108108
// Constructors ////////////////////////////////////////////////////////////////

‎cores/arduino/HardwareSerial.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@
4141
// often work, but occasionally a race condition can occur that makes
4242
// Serial behave erratically. See https://github.com/arduino/Arduino/issues/2405
4343
#if !defined(SERIAL_TX_BUFFER_SIZE)
44-
#defineSERIAL_TX_BUFFER_SIZE64
44+
#defineSERIAL_TX_BUFFER_SIZE64
4545
#endif
4646
#if !defined(SERIAL_RX_BUFFER_SIZE)
47-
#defineSERIAL_RX_BUFFER_SIZE64
47+
#defineSERIAL_RX_BUFFER_SIZE64
4848
#endif
4949
#if (SERIAL_TX_BUFFER_SIZE>256)
50-
typedefuint16_ttx_buffer_index_t;
50+
typedefuint16_ttx_buffer_index_t;
5151
#else
52-
typedefuint8_ttx_buffer_index_t;
52+
typedefuint8_ttx_buffer_index_t;
5353
#endif
5454
#if (SERIAL_RX_BUFFER_SIZE>256)
55-
typedefuint16_trx_buffer_index_t;
55+
typedefuint16_trx_buffer_index_t;
5656
#else
57-
typedefuint8_trx_buffer_index_t;
57+
typedefuint8_trx_buffer_index_t;
5858
#endif
5959

6060
// A bool should be enough for this
@@ -78,12 +78,12 @@ typedef enum {
7878
//#define SERIAL_6N2 0x0A
7979

8080
#ifdef UART_WORDLENGTH_7B
81-
#defineSERIAL_7N10x04
82-
#defineSERIAL_7N20x0C
83-
#defineSERIAL_6E10x22
84-
#defineSERIAL_6E20x2A
85-
#defineSERIAL_6O10x32
86-
#defineSERIAL_6O20x3A
81+
#defineSERIAL_7N10x04
82+
#defineSERIAL_7N20x0C
83+
#defineSERIAL_6E10x22
84+
#defineSERIAL_6E20x2A
85+
#defineSERIAL_6O10x32
86+
#defineSERIAL_6O20x3A
8787
#endif
8888
#defineSERIAL_8N10x06
8989
#defineSERIAL_8N20x0E

‎cores/arduino/Print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include"Print.h"
3030

3131
#if defined (VIRTIO_LOG)
32-
#include"virtio_log.h"
32+
#include"virtio_log.h"
3333
#endif
3434

3535
// Public Methods //////////////////////////////////////////////////////////////

‎cores/arduino/Tone.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
#define_WIRING_TONE_
2121

2222
#ifdef__cplusplus
23-
/*
24-
* \brief Generate a tone to a pin.
25-
*
26-
* \param _pin
27-
* \param frequency Tone frequency (in hertz)
28-
* \param duration Tone duration (in milliseconds)
29-
*/
30-
externvoidtone(uint8_t_pin,unsignedintfrequency,unsigned longduration=0);
31-
32-
/*
33-
* \brief Stop tone generation on pin.
34-
*
35-
* \param _pin
36-
*/
37-
externvoidnoTone(uint8_t_pin,booldestruct= false);
23+
/*
24+
* \brief Generate a tone to a pin.
25+
*
26+
* \param _pin
27+
* \param frequency Tone frequency (in hertz)
28+
* \param duration Tone duration (in milliseconds)
29+
*/
30+
externvoidtone(uint8_t_pin,unsignedintfrequency,unsigned longduration=0);
31+
32+
/*
33+
* \brief Stop tone generation on pin.
34+
*
35+
* \param _pin
36+
*/
37+
externvoidnoTone(uint8_t_pin,booldestruct= false);
3838

3939
#endif
4040

‎cores/arduino/VirtIOSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include"core_debug.h"
2828

2929
#if !defined(VIRTIOSERIAL_NUM)
30-
#defineVIRTIOSERIAL_NUM1
30+
#defineVIRTIOSERIAL_NUM1
3131
#endif
3232

3333
VirtIOSerialObj_t *VirtIOSerial_Handle[VIRTIOSERIAL_NUM] = {NULL};

‎cores/arduino/WInterrupts.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include<stdint.h>
2323

2424
#ifdef __cplusplus
25-
#include<functional>
25+
#include<functional>
2626

27-
typedef std::function<void(void)>callback_function_t;
28-
voidattachInterrupt(uint32_t pin,callback_function_t callback,uint32_t mode);
27+
typedef std::function<void(void)>callback_function_t;
28+
voidattachInterrupt(uint32_t pin,callback_function_t callback,uint32_t mode);
2929

3030
#endif
3131

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp