ubinos
bsp_ubik.h
1 /*
2  * Copyright (c) 2009 Sung Ho Park
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef UBINOS_BSP_UBIK_H_
8 #define UBINOS_BSP_UBIK_H_
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
23 #include <ubinos_config.h>
24 #include <ubinos/type.h>
25 
26 void bsp_ubik_entercrit(void);
27 void bsp_ubik_exitcrit(void);
28 
29 typedef void * bsp_mutex_pt;
30 int bsp_mutex_create(bsp_mutex_pt * bsp_mutex_p);
31 int bsp_mutex_delete(bsp_mutex_pt * bsp_mutex_p);
32 int bsp_mutex_lock(bsp_mutex_pt bsp_mutex);
33 int bsp_mutex_lock_timed(bsp_mutex_pt bsp_mutex, unsigned int tick);
34 int bsp_mutex_unlock(bsp_mutex_pt bsp_mutex);
35 
36 void * bsp_task_getcur();
37 int bsp_task_sleepms(unsigned int timems);
38 
39 int bsp_ubik_isrt(void);
40 int bsp_ubik_iscrit(void);
41 
42 void bsp_ubik_task_schedule_irq();
43 
44 void bsp_ubik_swisr(unsigned int swino);
45 
46 #if (UBINOS__BSP__CORTEX_MX == 1)
47 
48 void __attribute__((naked)) bsp_ubik_psv_handler(void);
49 void __attribute__((naked)) bsp_ubik_irq_handler(void);
50 
51 void bsp_ubik_swi_handler(void);
52 void bsp_ubik_tick_handler(void);
53 void bsp_ubik_irq_handler_c(unsigned int exceptiontype, unsigned int * prev_sp);
54 
55 #endif /* (UBINOS__BSP__CORTEX_MX == 1) */
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* UBINOS_BSP_UBIK_H_ */
ubinos basic data type