Skip to content

Commit 0790a81

Browse files
keybukCQ Bot Account
authored and
CQ Bot Account
committed
pw_sys_io: rename pw_sys_io_Init functions
Since pw_sys_io_Init() is not part of the pw_sys_io facade, and the backend-specific functions are only called from target-specific places, rename the backend-specific functions to include the backend as part of the name. Change-Id: I42c0eb5e8932ee73707db574847e2aed58517132 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66862 Commit-Queue: Scott James Remnant <keybuk@google.com> Pigweed-Auto-Submit: Scott James Remnant <keybuk@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
1 parent bc31369 commit 0790a81

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

pw_sys_io_arduino/public/pw_sys_io_arduino/init.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
PW_EXTERN_C_START
1919

2020
// The actual implement of PreMainInit() in sys_io_BACKEND.
21-
void pw_sys_io_Init();
21+
void pw_sys_io_arduino_Init();
2222

2323
PW_EXTERN_C_END

pw_sys_io_arduino/sys_io_arduino.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "pw_preprocessor/compiler.h"
2121
#include "pw_sys_io/sys_io.h"
2222

23-
extern "C" void pw_sys_io_Init() { Serial.begin(115200); }
23+
extern "C" void pw_sys_io_arduino_Init() { Serial.begin(115200); }
2424

2525
namespace pw::sys_io {
2626

pw_sys_io_baremetal_lm3s6965evb/public/pw_sys_io_baremetal_lm3s6965evb/init.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
PW_EXTERN_C_START
1919

2020
// The actual implement of PreMainInit() in sys_io_BACKEND.
21-
void pw_sys_io_Init();
21+
void pw_sys_io_lm3s6965evb_Init();
2222

2323
PW_EXTERN_C_END

pw_sys_io_baremetal_lm3s6965evb/sys_io_baremetal.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void SetBaudRate(uint32_t clock, uint32_t target_baud) {
6969

7070
} // namespace
7171

72-
extern "C" void pw_sys_io_Init() {
72+
extern "C" void pw_sys_io_lm3s6965evb_Init() {
7373
rcgc1 |= kRcgcUart0EnableMask;
7474
for (volatile int i = 0; i < 3; ++i) {
7575
// We must wait after enabling uart.

pw_sys_io_baremetal_stm32f429/public/pw_sys_io_baremetal_stm32f429/init.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
PW_EXTERN_C_START
1919

2020
// The actual implement of PreMainInit() in sys_io_BACKEND.
21-
void pw_sys_io_Init();
21+
void pw_sys_io_stm32f429_Init();
2222

2323
PW_EXTERN_C_END

pw_sys_io_baremetal_stm32f429/sys_io_baremetal.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ volatile UsartBlock& usart1 =
130130

131131
} // namespace
132132

133-
extern "C" void pw_sys_io_Init() {
133+
extern "C" void pw_sys_io_stm32f429_Init() {
134134
// Enable 'A' GIPO clocks.
135135
platform_rcc.ahb1_config |= kGpioAEnable;
136136

targets/arduino/init.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
// Arduino target specific init. For Pigweed, this calls pw_sys_io's init. User
2020
// projects may chose to provide something different if they need more pre-main
2121
// init functionality.
22-
extern "C" void pw_arduino_Init() { pw_sys_io_Init(); }
22+
extern "C" void pw_arduino_Init() { pw_sys_io_arduino_Init(); }

targets/lm3s6965evb_qemu/boot.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void pw_boot_PreStaticMemoryInit() {
3434

3535
void pw_boot_PreStaticConstructorInit() {}
3636

37-
void pw_boot_PreMainInit() { pw_sys_io_Init(); }
37+
void pw_boot_PreMainInit() { pw_sys_io_lm3s6965evb_Init(); }
3838

3939
PW_NO_RETURN void pw_boot_PostMain() {
4040
// QEMU requires a special command to tell the VM to shut down.

targets/stm32f429i_disc1/boot.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void pw_boot_PreStaticConstructorInit() {
5858
#endif // PW_MALLOC_ACTIVE
5959
}
6060

61-
void pw_boot_PreMainInit() { pw_sys_io_Init(); }
61+
void pw_boot_PreMainInit() { pw_sys_io_stm32f429_Init(); }
6262

6363
PW_NO_RETURN void pw_boot_PostMain() {
6464
// In case main() returns, just sit here until the device is reset.

0 commit comments

Comments
 (0)