ubinos
bsp.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 Sung Ho Park
3  Contact: ubinos.org@gmail.com
4 
5  This file is part of the itf_ubinos component of the Ubinos.
6 
7  GNU General Public License Usage
8  This file may be used under the terms of the GNU
9  General Public License version 3.0 as published by the Free Software
10  Foundation and appearing in the file license_gpl3.txt included in the
11  packaging of this file. Please review the following information to
12  ensure the GNU General Public License version 3.0 requirements will be
13  met: http://www.gnu.org/copyleft/gpl.html.
14 
15  GNU Lesser General Public License Usage
16  Alternatively, this file may be used under the terms of the GNU Lesser
17  General Public License version 2.1 as published by the Free Software
18  Foundation and appearing in the file license_lgpl.txt included in the
19  packaging of this file. Please review the following information to
20  ensure the GNU Lesser General Public License version 2.1 requirements
21  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22 
23  Commercial Usage
24  Alternatively, licensees holding valid commercial licenses may
25  use this file in accordance with the commercial license agreement
26  provided with the software or, alternatively, in accordance with the
27  terms contained in a written agreement between you and rightful owner.
28  */
29 
30 #ifndef UBINOS_BSP_H_
31 #define UBINOS_BSP_H_
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
51 #include <ubinos_config.h>
52 #include <ubinos/type.h>
53 
70 int appmain(int argc, char * argv[]);
71 
81 int bsp_comp_init(void);
82 
89 int bsp_isintr(void);
90 
102 int bsp_getcpuclockfreq(unsigned int * freq_p);
103 
115 int bsp_getcpuclockfreqk(unsigned int * freqk_p);
116 
128 int bsp_getmckfreq(unsigned int * freq_p);
129 
141 int bsp_getmckfreqk(unsigned int * freqk_p);
142 
157 int bsp_getcpuid(unsigned char * buf, int max);
158 
166 int bsp_getcpuidsize(void);
167 
173 void bsp_enableintr(void);
174 
178 void bsp_disableintr(void);
179 
183 void bsp_abortsystem(void);
184 
201 int bsp_getstacksize(int type, unsigned int * stacksize_p);
202 
219 int bsp_getmaxstackusage(int type, unsigned int * maxstackusage_p);
220 
227 void bsp_busywait(unsigned int count);
228 
235 void bsp_busywaitms(unsigned int timems);
236 
242 unsigned int bsp_getbusywaitcountperms(void);
243 
252 unsigned int bsp_timemstobwc(unsigned int timems);
253 
262 unsigned int bsp_bwctotimems(unsigned int count);
263 
264 #include <ubinos/bsp/arch.h>
265 #include <ubinos/bsp/dtty.h>
266 #include <ubinos/bsp/intr.h>
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif /* UBINOS_BSP_H_ */
bsp_abortsystem
void bsp_abortsystem(void)
bsp_enableintr
void bsp_enableintr(void)
bsp_comp_init
int bsp_comp_init(void)
bsp_disableintr
void bsp_disableintr(void)
appmain
int appmain(int argc, char *argv[])
bsp_getcpuclockfreqk
int bsp_getcpuclockfreqk(unsigned int *freqk_p)
type.h
ubinos basic data type
bsp_getcpuid
int bsp_getcpuid(unsigned char *buf, int max)
max
#define max(a, b)
Definition: ubiclib.h:257
bsp_getbusywaitcountperms
unsigned int bsp_getbusywaitcountperms(void)
bsp_getmckfreqk
int bsp_getmckfreqk(unsigned int *freqk_p)
bsp_busywait
void bsp_busywait(unsigned int count)
bsp_getmaxstackusage
int bsp_getmaxstackusage(int type, unsigned int *maxstackusage_p)
bsp_getcpuclockfreq
int bsp_getcpuclockfreq(unsigned int *freq_p)
bsp_timemstobwc
unsigned int bsp_timemstobwc(unsigned int timems)
bsp_bwctotimems
unsigned int bsp_bwctotimems(unsigned int count)
bsp_isintr
int bsp_isintr(void)
bsp_busywaitms
void bsp_busywaitms(unsigned int timems)
bsp_getcpuidsize
int bsp_getcpuidsize(void)
bsp_getmckfreq
int bsp_getmckfreq(unsigned int *freq_p)
bsp_getstacksize
int bsp_getstacksize(int type, unsigned int *stacksize_p)
dtty.h
BSP debug terminal API.
intr.h
BSP interrupt API.