U.B.O.R
The [U]seless [B]ox [O]rganizing [R]obot. A FreeRTOS study project written in C which implements a multitasked control unit for a belt conveyor system with robotic sorting arms.
main.c
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * This program is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU General Public License
5  * as published by the Free Software Foundation; either version 2
6  * of the License, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16  * MA 02110-1301, USA.
17  *
18  *****************************************************************************/
19 //----- Header-Files ---------------------------------------------------------
20 #include <stdio.h>
21 #include <FreeRTOS.h>
22 #include <carme.h>
23 #include <carme_io1.h>
24 #include <carme_io2.h>
25 #include <task.h>
26 
27 #include "ucan.h"
28 #include "display.h"
29 #include "bcs.h"
30 #include "arm.h"
31 
36 int main(void)
37 {
38  /* initialize the IO libs */
39  CARME_IO1_Init();
40  CARME_IO2_Init();
41 
42  /* Call init functions */
43  ucan_init();
44  display_init();
45  bcs_init();
46  init_arm();
47 
48  /* Start scheduler */
49  vTaskStartScheduler();
50 
51  for (;;) {
52  // All work and no play makes jack a dull boy
53  }
54 
55  return 0;
56 }
void bcs_init()
Initializes the belt conveyer system and starts the belt tasks global.
Definition: bcs.c:398
bool ucan_init(void)
Initialize the hardware and call each init function global.
Definition: ucan.c:212
void display_init()
Initializes the display and starts the display task global.
Definition: display.c:199
int main(void)
Main function which calls the scheduler.
Definition: main.c:36
void init_arm()
Creates the arm tasks.
Definition: arm.c:323