1 /*
2  * Copyright (C) 2022 HiHope Open Source Organization .
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  *
14  * limitations under the License.
15  */
16 
17 #ifndef __ROBOT_CONTROL_H__
18 #define __ROBOT_CONTROL_H__
19 
20 
21 #define     CAR_CONTROL_DEMO_TASK_STAK_SIZE   (1024*10)
22 #define     CAR_CONTROL_DEMO_TASK_PRIORITY    (25)
23 #define     DISTANCE_BETWEEN_CAR_AND_OBSTACLE (20)
24 #define     KEY_INTERRUPT_PROTECT_TIME        (30)
25 #define     CAR_TURN_LEFT                     (0)
26 #define     CAR_TURN_RIGHT                    (1)
27 #define     ADC_TEST_LENGTH                   (20)
28 
29 typedef enum {
30     CAR_STOP_STATUS = 0,
31     CAR_OBSTACLE_AVOIDANCE_STATUS,
32     CAR_TRACE_STATUS
33 } CarStatus;
34 
35 void switch_init(void);
36 void interrupt_monitor(void);
37 unsigned char GetCarStatus(void);
38 #endif
39