NetBurner 3.1
port_s.h
1 /*NB_REVISION*/
2 
3 #ifndef _PORT_S_H_
4 #define _PORT_S_H_
5 
6 /****************************************************************************
7  *
8  * Copyright (c) 2003 by HCC Embedded
9  *
10  * This software is copyrighted by and is the sole property of
11  * HCC. All rights, title, ownership, or other interests
12  * in the software remain the property of HCC. This
13  * software may only be used in accordance with the corresponding
14  * license agreement. Any unauthorized use, duplication, transmission,
15  * distribution, or disclosure of this software is expressly forbidden.
16  *
17  * This Copyright notice may not be removed or modified without prior
18  * written consent of HCC.
19  *
20  * HCC reserves the right to modify this software without notice.
21  *
22  * HCC Embedded
23  * Budapest 1132
24  * Victor Hugo Utca 11-15
25  * Hungary
26  *
27  * Tel: +36 (1) 450 1302
28  * Fax: +36 (1) 450 1303
29  * http: www.hcc-embedded.com
30  * email: info@hcc-embedded.com
31  *
32  ***************************************************************************/
33 
34 #include <file/udefs.h>
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 // Uses native NetBurner memcpy and memset functions
42 #define USE_NB_MEM_FUNCS
43 
44 #ifdef USE_NB_MEM_FUNCS
45 #include <string.h>
46 #endif
47 
48  extern unsigned short fs_getdate(void);
49  extern unsigned short fs_gettime(void);
50 
51  extern int fs_mutex_get(FS_MUTEX_TYPE *);
52  extern int fs_mutex_put(FS_MUTEX_TYPE *);
53  extern int fs_mutex_create(FS_MUTEX_TYPE *);
54  extern int fs_mutex_delete(FS_MUTEX_TYPE *);
55 
56  extern long fs_gettaskID(void);
57 
58 /* definitions for ctime */
59 #define F_CTIME_SEC_SHIFT 0
60 #define F_CTIME_SEC_MASK 0x001f /* 0-30 in 2seconds */
61 #define F_CTIME_MIN_SHIFT 5
62 #define F_CTIME_MIN_MASK 0x07e0 /* 0-59 */
63 #define F_CTIME_HOUR_SHIFT 11
64 #define F_CTIME_HOUR_MASK 0xf800 /* 0-23 */
65 
66 /* definitions for cdate */
67 #define F_CDATE_DAY_SHIFT 0
68 #define F_CDATE_DAY_MASK 0x001f /* 0-31 */
69 #define F_CDATE_MONTH_SHIFT 5
70 #define F_CDATE_MONTH_MASK 0x01e0 /* 1-12 */
71 #define F_CDATE_YEAR_SHIFT 9
72 #define F_CDATE_YEAR_MASK 0xfe00 /* 0-119 (1980+value) */
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 /****************************************************************************
79  *
80  * end of port_s.h
81  *
82  ***************************************************************************/
83 
84 #endif /* _PORT_S_H_ */