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

Commit 4a7a600

Browse files
Extracting code main loop into a separate function to fit with the arduino concept of setup/loop
1 parent 99fb05d commit 4a7a600

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

‎examples/Envie_Video_Firefly/Envie_Video_Firefly.ino‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ void setup() {
55
}
66

77
void loop() {
8-
8+
anx7625_main();
99
}

‎libraries/ENVIE_Video_Firefly/src/ENVIE_Video_Firefly.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
#define ENVIE_VIDEO_FIREFLY_H_
33

44
void anx7625_setup(void);
5+
void anx7625_main();
56

67
#endif /* ENVIE_VIDEO_FIREFLY_H_ */

‎libraries/ENVIE_Video_Firefly/src/main.cpp‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,13 @@ void anx7625_setup(void)
9494
#endif
9595
g_poweron = 0;
9696
g_bDebug = 0;
97-
98-
while (1)
99-
{
100-
if (!g_bDebug)
101-
{
102-
PROC_Main();
103-
}
104-
cmd();
105-
}
10697
}
10798

99+
void anx7625_main()
100+
{
101+
if (!g_bDebug)
102+
{
103+
PROC_Main();
104+
}
105+
cmd();
106+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /