FreeRTOS Tetris
projdefs.h
1 /*
2  FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
3  All rights reserved
4 
5  VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
6 
7  This file is part of the FreeRTOS distribution.
8 
9  FreeRTOS is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License (version 2) as published by the
11  Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
12 
13  ***************************************************************************
14  >>! NOTE: The modification to the GPL is included to allow you to !<<
15  >>! distribute a combined work that includes FreeRTOS without being !<<
16  >>! obliged to provide the source code for proprietary components !<<
17  >>! outside of the FreeRTOS kernel. !<<
18  ***************************************************************************
19 
20  FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22  FOR A PARTICULAR PURPOSE. Full license text is available on the following
23  link: http://www.freertos.org/a00114.html
24 
25  ***************************************************************************
26  * *
27  * FreeRTOS provides completely free yet professionally developed, *
28  * robust, strictly quality controlled, supported, and cross *
29  * platform software that is more than just the market leader, it *
30  * is the industry's de facto standard. *
31  * *
32  * Help yourself get started quickly while simultaneously helping *
33  * to support the FreeRTOS project by purchasing a FreeRTOS *
34  * tutorial book, reference manual, or both: *
35  * http://www.FreeRTOS.org/Documentation *
36  * *
37  ***************************************************************************
38 
39  http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40  the FAQ page "My application does not run, what could be wrong?". Have you
41  defined configASSERT()?
42 
43  http://www.FreeRTOS.org/support - In return for receiving this top quality
44  embedded software for free we request you assist our global community by
45  participating in the support forum.
46 
47  http://www.FreeRTOS.org/training - Investing in training allows your team to
48  be as productive as possible as early as possible. Now you can receive
49  FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50  Ltd, and the world's leading authority on the world's leading RTOS.
51 
52  http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53  including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54  compatible FAT file system, and our tiny thread aware UDP/IP stack.
55 
56  http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57  Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
58 
59  http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60  Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61  licenses offer ticketed support, indemnification and commercial middleware.
62 
63  http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64  engineered and independently SIL3 certified version for use in safety and
65  mission critical applications that require provable dependability.
66 
67  1 tab == 4 spaces!
68 */
69 
70 #ifndef PROJDEFS_H
71 #define PROJDEFS_H
72 
73 /*
74  * Defines the prototype to which task functions must conform. Defined in this
75  * file to ensure the type is known before portable.h is included.
76  */
77 typedef void (*TaskFunction_t)(void *);
78 
79 /* Converts a time in milliseconds to a time in ticks. This macro can be
80 overridden by a macro of the same name defined in FreeRTOSConfig.h in case the
81 definition here is not suitable for your application. */
82 #ifndef pdMS_TO_TICKS
83 #define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000 ) )
84 #endif
85 
86 #define pdFALSE ( ( BaseType_t ) 0 )
87 #define pdTRUE ( ( BaseType_t ) 1 )
88 
89 #define pdPASS ( pdTRUE )
90 #define pdFAIL ( pdFALSE )
91 #define errQUEUE_EMPTY ( ( BaseType_t ) 0 )
92 #define errQUEUE_FULL ( ( BaseType_t ) 0 )
93 
94 /* FreeRTOS error definitions. */
95 #define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 )
96 #define errQUEUE_BLOCKED ( -4 )
97 #define errQUEUE_YIELD ( -5 )
98 
99 /* Macros used for basic data corruption checks. */
100 #ifndef configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
101 #define configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES 0
102 #endif
103 
104 #if( configUSE_16_BIT_TICKS == 1 )
105 #define pdINTEGRITY_CHECK_VALUE 0x5a5a
106 #else
107 #define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5aUL
108 #endif
109 
110 /* The following errno values are used by FreeRTOS+ components, not FreeRTOS
111 itself. */
112 #define pdFREERTOS_ERRNO_NONE 0 /* No errors */
113 #define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */
114 #define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */
115 #define pdFREERTOS_ERRNO_EIO 5 /* I/O error */
116 #define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */
117 #define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */
118 #define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */
119 #define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */
120 #define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */
121 #define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */
122 #define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */
123 #define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */
124 #define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */
125 #define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */
126 #define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */
127 #define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */
128 #define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */
129 #define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */
130 #define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */
131 #define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */
132 #define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */
133 #define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */
134 #define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */
135 #define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */
136 #define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */
137 #define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */
138 #define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */
139 #define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
140 #define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */
141 #define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */
142 #define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */
143 #define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */
144 #define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */
145 #define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */
146 #define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */
147 #define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */
148 #define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */
149 #define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */
150 #define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */
151 #define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */
152 
153 /* The following endian values are used by FreeRTOS+ components, not FreeRTOS
154 itself. */
155 #define pdFREERTOS_LITTLE_ENDIAN 0
156 #define pdFREERTOS_BIG_ENDIAN 1
157 
158 #endif /* PROJDEFS_H */
159 
160 
161