File tree Expand file tree Collapse file tree 5 files changed +18
-8
lines changed Expand file tree Collapse file tree 5 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1- #include "fcntl.h"
1+ #include <fcntl.h>
2+ #include <unistd.h>
23
3- void main (void ) {
4+ int main (void ) {
45 int led [4 ];
56 int i ;
67
@@ -22,4 +23,5 @@ void main(void) {
2223 for (i = 0 ; i < 4 ; i ++ ) {
2324 close (led [i ]);
2425 }
26+ return 0 ;
2527}
Original file line number Diff line number Diff line change 1- #include "fcntl.h"
1+ #include <fcntl.h>
2+ #include <stdio.h>
3+ #include <stdlib.h>
4+ #include <unistd.h>
25
36int _Getch (void ) {
47 int ch ;
@@ -8,7 +11,7 @@ int _Getch(void) {
811 return ch ;
912}
1013
11- void main (void ) {
14+ int main (void ) {
1215 int buzzer = open ("/dev/rtbuzzer0" , O_WRONLY );
1316 int c = 1 ;
1417
@@ -63,4 +66,5 @@ void main(void) {
6366 }
6467 }
6568 close (buzzer );
69+ return 0 ;
6670}
Original file line number Diff line number Diff line change 1- #include "fcntl.h"
1+ #include <fcntl.h>
2+ #include <unistd.h>
23
34char get_SW0 (void ) {
45 char buf [2 ];
@@ -27,7 +28,7 @@ char get_SW2(void) {
2728 return buf [0 ];
2829}
2930
30- void main (void ) {
31+ int main (void ) {
3132 int state0 , state1 , state2 ;
3233 int LED0 , LED1 , LED2 , LED3 ;
3334
@@ -78,4 +79,5 @@ void main(void) {
7879 }
7980 }
8081 }
82+ return 0 ;
8183}
Original file line number Diff line number Diff line change 22#include <stdio.h>
33#include <unistd.h>
44
5- void main (void ) {
5+ int main (void ) {
66 int motoren = open ("/dev/rtmotoren0" , O_WRONLY );
77 int motor_l = open ("/dev/rtmotor_raw_l0" , O_WRONLY );
88 int motor_r = open ("/dev/rtmotor_raw_r0" , O_WRONLY );
@@ -44,4 +44,5 @@ void main(void) {
4444 close (motor_l );
4545 close (motor_r );
4646 close (motor );
47+ return 0 ;
4748}
Original file line number Diff line number Diff line change 22#include <stdio.h>
33#include <unistd.h>
44
5- void main (void ) {
5+ int main (void ) {
66 int buff_size = 256 ;
77 FILE * fp ;
88
@@ -16,4 +16,5 @@ void main(void) {
1616 fclose (fp );
1717 usleep (500 * 1000 );
1818 }
19+ return 0 ;
1920}
You can’t perform that action at this time.
0 commit comments