pico]OS  1.1.0
pos_nano.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2012, Dennis Kuschel.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * 3. The name of the author may not be used to endorse or promote
15  * products derived from this software without specific prior written
16  * permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
19  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
22  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28  * OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  */
31 
32 
42 #ifndef _POS_NANO_H
43 #define _POS_NANO_H
44 
45 #ifndef DOX
46 #define DOX 0
47 #endif
48 
49 
50 
51 /*---------------------------------------------------------------------------
52  * NANO LAYER INSTALLATION
53  *-------------------------------------------------------------------------*/
54 
55 /* include configuration files */
56 #ifndef _PICOOS_H
57 #include <port.h>
58 #include <poscfg.h>
59 #endif
60 #include <noscfg.h>
61 
62 
63 #ifndef NOSCFG_FEATURE_REGISTRY
64 #define NOSCFG_FEATURE_REGISTRY 0
65 #endif
66 
67 #ifndef NOSCFG_FEATURE_USE_STDARG
68 #define NOSCFG_FEATURE_USE_STDARG 0
69 #endif
70 
71 #if POSCFG_TASKSTACKTYPE==0
72 #define NOS_NEEDTASKEXITHOOK
73 #else
74 #if NOSCFG_FEATURE_REGISTRY!=0
75 #define NOS_NEEDTASKEXITHOOK
76 #endif
77 #endif
78 
79 #ifdef NOS_NEEDTASKEXITHOOK
80 
81 /* define hook */
82 #ifdef POSCFG_TASKEXIT_HOOK
83 #undef POSCFG_TASKEXIT_HOOK
84 #endif
85 #define POSCFG_TASKEXIT_HOOK 1
86 
87 /* set additional task data for the nano layer */
88 #define NOS_TASKDATA void *nosstkroot;
89 
90 #endif /* NOS_NEEDTASKEXITHOOK */
91 
92 /* include pico]OS header if not yet done */
93 #ifndef _PICOOS_H
94 #include <picoos.h>
95 #endif
96 
97 
98 
99 /*---------------------------------------------------------------------------
100  * CONFIGURATION
101  *-------------------------------------------------------------------------*/
102 
103 #ifndef NOSCFG_FEATURE_MEMALLOC
104 #error NOSCFG_FEATURE_MEMALLOC not defined
105 #endif
106 #ifndef NOSCFG_FEATURE_CONIN
107 #error NOSCFG_FEATURE_CONIN not defined
108 #endif
109 #ifndef NOSCFG_FEATURE_CONOUT
110 #error NOSCFG_FEATURE_CONOUT not defined
111 #endif
112 #ifndef NOSCFG_CONOUT_HANDSHAKE
113 #error NOSCFG_CONOUT_HANDSHAKE not defined
114 #endif
115 #ifndef NOSCFG_CONOUT_FIFOSIZE
116 #error NOSCFG_CONOUT_FIFOSIZE not defined
117 #endif
118 #ifndef NOSCFG_FEATURE_PRINTF
119 #error NOSCFG_FEATURE_PRINTF not defined
120 #endif
121 #ifndef NOSCFG_FEATURE_SPRINTF
122 #error NOSCFG_FEATURE_SPRINTF not defined
123 #endif
124 #ifndef NOSCFG_FEATURE_TASKCREATE
125 #error NOSCFG_FEATURE_TASKCREATE not defined
126 #endif
127 #ifndef NOSCFG_DEFAULT_STACKSIZE
128 #error NOSCFG_DEFAULT_STACKSIZE not defined in the port configuration file
129 #endif
130 #ifndef NOSCFG_STACK_GROWS_UP
131 #error NOSCFG_STACK_GROWS_UP not defined in the port configuration file
132 #endif
133 #ifndef NOSCFG_MEM_MANAGE_MODE
134 #error NOSCFG_MEM_MANAGE_MODE not defined
135 #endif
136 #ifndef NOSCFG_FEATURE_MEMSET
137 #error NOSCFG_FEATURE_MEMSET not defined
138 #endif
139 #ifndef NOSCFG_FEATURE_MEMCOPY
140 #error NOSCFG_FEATURE_MEMCOPY not defined
141 #endif
142 #ifndef NOSCFG_STKMEM_RESERVE
143 #error NOSCFG_STKMEM_RESERVE not defined
144 #endif
145 #if NOSCFG_MEM_MANAGER_TYPE == 2
146 #ifndef NOSCFG_MEM_USER_MALLOC
147 #error NOSCFG_MEM_USER_MALLOC not defined
148 #endif
149 #ifndef NOSCFG_MEM_USER_REALLOC
150 #error NOSCFG_MEM_USER_REALLOC not defined
151 #endif
152 #ifndef NOSCFG_MEM_USER_FREE
153 #error NOSCFG_MEM_USER_FREE not defined
154 #endif
155 #endif
156 #ifndef NOSCFG_FEATURE_BOTTOMHALF
157 #error NOSCFG_FEATURE_BOTTOMHALF not defined
158 #endif
159 #if NOSCFG_FEATURE_BOTTOMHALF != 0
160 #ifndef NOS_MAX_BOTTOMHALFS
161 #error NOS_MAX_BOTTOMHALFS not defined
162 #endif
163 #if (NOS_MAX_BOTTOMHALFS == 0) || (NOS_MAX_BOTTOMHALFS > MVAR_BITS)
164 #error NOS_MAX_BOTTOMHALFS must be in the range 1 .. MVAR_BITS
165 #endif
166 #endif
167 #ifndef NOSCFG_FEATURE_CPUUSAGE
168 #error NOSCFG_FEATURE_CPUUSAGE not defined
169 #endif
170 
171 #if NOSCFG_FEATURE_REGISTRY
172 #ifndef NOSCFG_FEATURE_REGQUERY
173 #error NOSCFG_FEATURE_REGQUERY
174 #endif
175 #ifndef NOSCFG_FEATURE_USERREG
176 #error NOSCFG_FEATURE_USERREG
177 #endif
178 #ifndef NOS_MAX_REGKEYLEN
179 #error NOS_MAX_REGKEYLEN
180 #endif
181 #if NOS_MAX_REGKEYLEN < 4
182 #error NOS_MAX_REGKEYLEN must be at least 4
183 #endif
184 #ifndef NOS_REGKEY_PREALLOC
185 #error NOS_REGKEY_PREALLOC
186 #endif
187 #else /* NOSCFG_FEATURE_REGISTRY */
188 #ifdef NOSCFG_FEATURE_USERREG
189 #undef NOSCFG_FEATURE_USERREG
190 #endif
191 #define NOSCFG_FEATURE_USERREG 0
192 #ifdef NOSCFG_FEATURE_REGQUERY
193 #undef NOSCFG_FEATURE_REGQUERY
194 #endif
195 #define NOSCFG_FEATURE_REGQUERY 0
196 #endif /* NOSCFG_FEATURE_REGISTRY */
197 
198 #ifndef NOSCFG_FEATURE_SEMAPHORES
199 #define NOSCFG_FEATURE_SEMAPHORES 0
200 #endif
201 
202 #if NOSCFG_FEATURE_SEMAPHORES != 0 && POSCFG_FEATURE_SEMAPHORES == 0
203 #error NOSCFG_FEATURE_SEMAPHORES enabled, but pico]OS semaphores disabled
204 #endif
205 
206 #ifndef NOSCFG_FEATURE_MUTEXES
207 #define NOSCFG_FEATURE_MUTEXES 0
208 #endif
209 #if NOSCFG_FEATURE_MUTEXES != 0 && POSCFG_FEATURE_MUTEXES == 0
210 #error NOSCFG_FEATURE_MUTEXES enabled, but pico]OS mutexes disabled
211 #endif
212 
213 #ifndef NOSCFG_FEATURE_MSGBOXES
214 #define NOSCFG_FEATURE_MSGBOXES 0
215 #endif
216 #if NOSCFG_FEATURE_MSGBOXES != 0 && POSCFG_FEATURE_MSGBOXES == 0
217 #error NOSCFG_FEATURE_MSGBOXES enabled, but pico]OS message boxes disabled
218 #endif
219 
220 #ifndef NOSCFG_FEATURE_FLAGS
221 #define NOSCFG_FEATURE_FLAGS 0
222 #endif
223 #if NOSCFG_FEATURE_FLAGS != 0 && POSCFG_FEATURE_FLAGS == 0
224 #error NOSCFG_FEATURE_FLAGS enabled, but pico]OS flag functions disabled
225 #endif
226 
227 #ifndef NOSCFG_FEATURE_TIMER
228 #define NOSCFG_FEATURE_TIMER 0
229 #endif
230 #if NOSCFG_FEATURE_TIMER != 0 && POSCFG_FEATURE_TIMER == 0
231 #error NOSCFG_FEATURE_TIMER enabled, but pico]OS timer functions disabled
232 #endif
233 
234 #ifndef NOSCFG_MEM_OVWR_STANDARD
235 #define NOSCFG_MEM_OVWR_STANDARD 1
236 #endif
237 #ifndef NOSCFG_FEATURE_REALLOC
238 #define NOSCFG_FEATURE_REALLOC 0
239 #endif
240 
241 
242 
243 /*---------------------------------------------------------------------------
244  * DATA TYPES
245  *-------------------------------------------------------------------------*/
246 
247 #if DOX!=0 || NOSCFG_FEATURE_BOTTOMHALF != 0
248 
255 typedef void (*NOSBHFUNC_t)(void* arg, UVAR_t bh);
256 #endif
257 
258 
259 
260 /*---------------------------------------------------------------------------
261  * MEMORY MANAGEMENT
262  *-------------------------------------------------------------------------*/
263 
276 #ifdef _N_MEM_C
277 #define NANOEXT
278 #else
279 #define NANOEXT extern
280 #endif
281 
282 #if DOX!=0 || NOSCFG_FEATURE_MEMALLOC != 0
283 
297 NANOEXT void* POSCALL nosMemAlloc(UINT_t size);
298 
307 NANOEXT void POSCALL nosMemFree(void *p);
308 
309 
310 #if DOX!=0 || NOSCFG_FEATURE_REALLOC != 0
311 
327 NANOEXT void POSCALL *nosMemRealloc(void *memblock, UINT_t size);
328 #endif
329 
330 /* overwrite standard memory allocation functions */
331 #ifndef NANOINTERNAL
332 #if NOSCFG_MEM_OVWR_STANDARD != 0
333 #ifdef malloc
334 #undef malloc
335 #endif
336 #ifdef calloc
337 #undef calloc
338 #endif
339 #ifdef free
340 #undef free
341 #endif
342 #define malloc nosMemAlloc
343 #define calloc (not_supported)
344 #define free nosMemFree
345 #endif /* NOSCFG_MEM_OVWR_STANDARD */
346 #else /* NANOINTERNAL */
347 /* internal malloc/free, used by OS core and platform ports */
348 #if NOSCFG_MEM_MANAGER_TYPE == 0
349 #define NOS_MEM_ALLOC(x) malloc((size_t)(x))
350 #define NOS_MEM_REALLOC(p,x) realloc(p, (size_t)(x))
351 #define NOS_MEM_FREE(x) free(x)
352 #elif NOSCFG_MEM_MANAGER_TYPE == 1
353 void* nos_malloc(UINT_t size);
354 void* nos_realloc(void* ptr, UINT_t size);
355 void nos_free(void *mp);
356 #define NOS_MEM_ALLOC(x) nos_malloc(x)
357 #define NOS_MEM_REALLOC(p,x) nos_realloc(p, x)
358 #define NOS_MEM_FREE(x) nos_free(x)
359 #elif NOSCFG_MEM_MANAGER_TYPE == 2
360 #define NOS_MEM_ALLOC(x) NOSCFG_MEM_USER_MALLOC(x)
361 #define NOS_MEM_REALLOC(p,x) NOSCFG_MEM_USER_REALLOC(p,x)
362 #define NOS_MEM_FREE(x) NOSCFG_MEM_USER_FREE(x)
363 #endif
364 #endif /* NANOINTERNAL */
365 
366 #endif /* NOSCFG_FEATURE_MEMALLOC */
367 
368 #if DOX!=0 || NOSCFG_FEATURE_MEMSET != 0
369 
381 NANOEXT void POSCALL nosMemSet(void *buf, char val, UINT_t count);
382 
383 #if NOSCFG_MEM_OVWR_STANDARD != 0
384 #ifdef memset
385 #undef memset
386 #endif
387 #define memset nosMemSet
388 #endif
389 
390 #endif /* NOSCFG_FEATURE_MEMSET */
391 
392 #if DOX!=0 || NOSCFG_FEATURE_MEMCOPY != 0
393 
405 NANOEXT void POSCALL nosMemCopy(void *dst, void *src, UINT_t count);
406 
407 #if NOSCFG_MEM_OVWR_STANDARD != 0
408 #ifdef memcpy
409 #undef memcpy
410 #endif
411 #define memcpy nosMemCopy
412 #endif
413 
414 #endif /* NOSCFG_FEATURE_MEMCOPY */
415 #undef NANOEXT
416 
420 /*---------------------------------------------------------------------------
421  * CONSOLE INPUT / OUTPUT
422  *-------------------------------------------------------------------------*/
423 
444 #ifdef _N_CONIO_C
445 #define NANOEXT
446 #else
447 #define NANOEXT extern
448 #endif
449 
450 #if DOX!=0 || NOSCFG_FEATURE_CONIN != 0
451 
463 NANOEXT void POSCALL c_nos_keyinput(UVAR_t key);
464 
474 NANOEXT char POSCALL nosKeyGet(void);
475 
485 NANOEXT UVAR_t POSCALL nosKeyPressed(void);
486 
487 #endif /* NOSCFG_FEATURE_CONIN */
488 
489 
490 #if DOX!=0 || NOSCFG_FEATURE_CONOUT != 0
491 
512 NANOEXT UVAR_t POSCALL p_putchar(char c);
513 #endif
514 
515 
516 #if DOX!=0 || NOSCFG_CONOUT_HANDSHAKE != 0
517 
538 NANOEXT void POSCALL c_nos_putcharReady(void);
539 #endif
540 
541 
542 #if DOX!=0 || NOSCFG_FEATURE_CONOUT != 0
543 
552 NANOEXT void POSCALL nosPrintChar(char c);
553 
563 NANOEXT void POSCALL nosPrint(const char *s);
564 
565 #endif
566 
567 #if NOSCFG_FEATURE_CONOUT == 0
568 #if NOSCFG_FEATURE_PRINTF != 0
569 #undef NOSCFG_FEATURE_PRINTF
570 #define NOSCFG_FEATURE_PRINTF 0
571 #endif
572 #endif
573 
574 #if (NOSCFG_FEATURE_PRINTF != 0 || NOSCFG_FEATURE_SPRINTF != 0)
575 #if NOSCFG_FEATURE_USE_STDARG == 0
576 typedef void* NOSARG_t;
577 #else
578 #include <stdarg.h>
579 #endif
580 #endif
581 
582 
583 #if DOX!=0 || ((NOSCFG_FEATURE_CONOUT != 0)&&(NOSCFG_FEATURE_PRINTF != 0))
584 
585 #if NOSCFG_FEATURE_USE_STDARG == 0
586 NANOEXT void POSCALL n_printFormattedN(const char *fmt, NOSARG_t args);
587 #else
588 NANOEXT void POSCALL n_printFormattedN(const char *fmt, va_list args);
589 NANOEXT void POSCALL n_printFormatted(const char *fmt, ...);
590 #endif
591 
592 #if DOX
593 
609 NANOEXT void POSCALL nosPrintf1(const char *fmt, arg a1);
610 
611 #else /* DOX!=0 */
612 #if NOSCFG_FEATURE_USE_STDARG == 0
613 #define nosPrintf1(fmt, a1) \
614  do { \
615  NOSARG_t args[1]; args[0] = (NOSARG_t)(a1); \
616  n_printFormattedN(fmt, args); \
617  } while(0);
618 
619 #define nosPrintf2(fmt, a1, a2) \
620  do { \
621  NOSARG_t args[2]; args[0] = (NOSARG_t)(a1); \
622  args[1] = (NOSARG_t)(a2); \
623  n_printFormattedN(fmt, args); \
624  } while(0);
625 
626 #define nosPrintf3(fmt, a1, a2, a3) \
627  do { \
628  NOSARG_t args[3]; args[0] = (NOSARG_t)(a1); \
629  args[1] = (NOSARG_t)(a2); args[2] = (NOSARG_t)(a3); \
630  n_printFormattedN(fmt, args); \
631  } while(0);
632 
633 #define nosPrintf4(fmt, a1, a2, a3, a4) \
634  do { \
635  NOSARG_t args[4]; \
636  args[0] = (NOSARG_t)(a1); args[1] = (NOSARG_t)(a2); \
637  args[2] = (NOSARG_t)(a3); args[3] = (NOSARG_t)(a4); \
638  n_printFormattedN(fmt, args); \
639  } while(0);
640 
641 #define nosPrintf5(fmt, a1, a2, a3, a4, a5) \
642  do { \
643  NOSARG_t args[5]; args[0] = (NOSARG_t)(a1); \
644  args[1] = (NOSARG_t)(a2); args[2] = (NOSARG_t)(a3); \
645  args[3] = (NOSARG_t)(a4); args[4] = (NOSARG_t)(a5); \
646  n_printFormattedN(fmt, args); \
647  } while(0);
648 
649 #define nosPrintf6(fmt, a1, a2, a3, a4, a5, a6) \
650  do { \
651  NOSARG_t args[6]; \
652  args[0] = (NOSARG_t)(a1); args[1] = (NOSARG_t)(a2); \
653  args[2] = (NOSARG_t)(a3); args[3] = (NOSARG_t)(a4); \
654  args[4] = (NOSARG_t)(a5); args[5] = (NOSARG_t)(a6); \
655  n_printFormattedN(fmt, args); \
656  } while(0);
657 #else
658 
659 #define nosPrintf n_printFormatted
660 #define nosPrintf1(fmt, a1) n_printFormatted(fmt, a1)
661 #define nosPrintf2(fmt, a1, a2) n_printFormatted(fmt, a1, a2)
662 #define nosPrintf3(fmt, a1, a2, a3) n_printFormatted(fmt, a1, a2, a3)
663 #define nosPrintf4(fmt, a1, a2, a3, a4) n_printFormatted(fmt, a1, a2, a3, a4)
664 #define nosPrintf5(fmt, a1, a2, a3, a4, a5) n_printFormatted(fmt, a1, a2, a3, a4, a5)
665 #define nosPrintf6(fmt, a1, a2, a3, a4, a5, a6) n_printFormatted(fmt, a1, a2, a3, a4, a5, a6)
666 
667 #endif /* NOSCFG_FEATURE_USE_STDARG == 0 */
668 #endif /* DOX!=0 */
669 #endif /* NOSCFG_FEATURE_PRINTF */
670 
671 
672 #if DOX!=0 || NOSCFG_FEATURE_SPRINTF != 0
673 #if DOX
674 
690 NANOEXT void POSCALL nosSPrintf1(char *buf, const char *fmt, arg a1);
691 
692 #else /* DOX!=0 */
693 
694 #if NOSCFG_FEATURE_USE_STDARG == 0
695 NANOEXT void POSCALL n_sprintFormattedN(char *buf, const char *fmt,
696  NOSARG_t args);
697 #else
698 NANOEXT void POSCALL n_sprintFormattedN(char *buf, const char *fmt, va_list args);
699 NANOEXT void POSCALL n_sprintFormatted(char *buf, const char *fmt, ...);
700 #endif
701 
702 #if NOSCFG_FEATURE_USE_STDARG == 0
703 #define nosSPrintf1(buf, fmt, a1) \
704  do { \
705  NOSARG_t args[1]; args[0] = (NOSARG_t)(a1); \
706  n_sprintFormattedN(buf, fmt, args); \
707  } while(0);
708 
709 #define nosSPrintf2(buf, fmt, a1, a2) \
710  do { \
711  NOSARG_t args[2]; args[0] = (NOSARG_t)(a1); \
712  args[1] = (NOSARG_t)(a2); \
713  n_sprintFormattedN(buf, fmt, args); \
714  } while(0);
715 
716 #define nosSPrintf3(buf, fmt, a1, a2, a3) \
717  do { \
718  NOSARG_t args[3]; args[0] = (NOSARG_t)(a1); \
719  args[1] = (NOSARG_t)(a2); args[2] = (NOSARG_t)(a3); \
720  n_sprintFormattedN(buf, fmt, args); \
721  } while(0);
722 
723 #define nosSPrintf4(buf, fmt, a1, a2, a3, a4) \
724  do { \
725  NOSARG_t args[4]; \
726  args[0] = (NOSARG_t)(a1); args[1] = (NOSARG_t)(a2); \
727  args[2] = (NOSARG_t)(a3); args[3] = (NOSARG_t)(a4); \
728  n_sprintFormattedN(buf, fmt, args); \
729  } while(0);
730 
731 #define nosSPrintf5(buf, fmt, a1, a2, a3, a4, a5) \
732  do { \
733  NOSARG_t args[5]; args[0] = (NOSARG_t)(a1); \
734  args[1] = (NOSARG_t)(a2); args[2] = (NOSARG_t)(a3); \
735  args[3] = (NOSARG_t)(a4); args[4] = (NOSARG_t)(a5); \
736  n_sprintFormattedN(buf, fmt, args); \
737  } while(0);
738 
739 #define nosSPrintf6(buf, fmt, a1, a2, a3, a4, a5, a6) \
740  do { \
741  NOSARG_t args[6]; \
742  args[0] = (NOSARG_t)(a1); args[1] = (NOSARG_t)(a2); \
743  args[2] = (NOSARG_t)(a3); args[3] = (NOSARG_t)(a4); \
744  args[4] = (NOSARG_t)(a5); args[5] = (NOSARG_t)(a6); \
745  n_sprintFormattedN(buf, fmt, args); \
746  } while(0);
747 
748 #else
749 
750 #define nosSPrintf n_sprintFormatted
751 #define nosSPrintf1(buf, fmt, a1) n_sprintFormatted(buf, fmt, a1)
752 #define nosSPrintf2(buf, fmt, a1, a2) n_sprintFormatted(buf, fmt, a1, a2)
753 #define nosSPrintf3(buf, fmt, a1, a2, a3) n_sprintFormatted(buf, fmt, a1, a2, a3)
754 #define nosSPrintf4(buf, fmt, a1, a2, a3, a4) n_sprintFormatted(buf, fmt, a1, a2, a3, a4)
755 #define nosSPrintf5(buf, fmt, a1, a2, a3, a4, a5) n_sprintFormatted(buf, fmt, a1, a2, a3, a4, a5)
756 #define nosSPrintf6(buf, fmt, a1, a2, a3, a4, a5, a6) n_sprintFormatted(buf, fmt, a1, a2, a3, a4, a5, a6)
757 
758 #endif /* NOSCFG_FEATURE_USE_STDARG == 0 */
759 #endif /* DOX!=0 */
760 #endif /* NOSCFG_FEATURE_SPRINTF */
761 #undef NANOEXT
762 
766 /*---------------------------------------------------------------------------
767  * BOTTOM HALFS
768  *-------------------------------------------------------------------------*/
769 
788 #ifdef _N_BHALF_C
789 #define NANOEXT
790 #else
791 #define NANOEXT extern
792 #endif
793 
794 #if DOX!=0 || NOSCFG_FEATURE_BOTTOMHALF != 0
795 
814 NANOEXT VAR_t POSCALL nosBottomHalfRegister(UVAR_t number, NOSBHFUNC_t func,
815  void *arg);
816 
826 #define nosBottomHalfUnregister(number) \
827  nosBottomHalfRegister(number, NULL, NULL)
828 
841 NANOEXT void POSCALL nosBottomHalfStart(UVAR_t number);
842 
843 #endif /* NOSCFG_FEATURE_BOTTOMHALF */
844 #undef NANOEXT
845 
849 /*---------------------------------------------------------------------------
850  * REGISTRY
851  *-------------------------------------------------------------------------*/
852 
873 #ifdef _N_REG_C
874 #define NANOEXT
875 #else
876 #define NANOEXT extern
877 #endif
878 
879 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
880 
882 typedef void* NOSGENERICHANDLE_t;
883 
886 typedef void* NOSREGQHANDLE_t;
887 
888 /* Generic registry key value type.
889  It is on the developer how he uses the type. */
890 typedef union {
891  void* voidptr;
892  int integer;
893 } KEYVALUE_t;
894 
896 typedef enum {
898 #if DOX!=0 || NOSCFG_FEATURE_SEMAPHORES != 0
900 #endif
901 #if DOX!=0 || NOSCFG_FEATURE_MUTEXES != 0
903 #endif
904 #if DOX!=0 || NOSCFG_FEATURE_FLAGS != 0
906 #endif
907 #if DOX!=0 || NOSCFG_FEATURE_TIMER != 0
909 #endif
910 #if DOX!=0 || NOSCFG_FEATURE_USERREG != 0
912 #endif
915 } NOSREGTYPE_t;
916 #define MIN_REGTYPE REGTYPE_TASK
917 #define MAX_REGTYPE (REGTYPE_SEARCHALL-1)
918 
919 
935 NANOEXT NOSGENERICHANDLE_t POSCALL nosGetHandleByName(
936  NOSREGTYPE_t objtype, const char *objname);
937 
938 
959  char *buffer, VAR_t bufsize,
960  NOSREGTYPE_t what);
961 
962 #if DOX!=0 || NOSCFG_FEATURE_USERREG != 0
963 
980 NANOEXT VAR_t POSCALL nosRegSet(const char *keyname, KEYVALUE_t keyvalue);
981 
995 NANOEXT VAR_t POSCALL nosRegGet(const char *keyname, KEYVALUE_t *keyvalue);
996 
1005 NANOEXT VAR_t POSCALL nosRegDel(const char *keyname);
1006 #endif
1007 
1008 #if DOX!=0 || NOSCFG_FEATURE_REGQUERY != 0
1009 
1029 NANOEXT NOSREGQHANDLE_t POSCALL nosRegQueryBegin(NOSREGTYPE_t type);
1030 
1050 NANOEXT VAR_t POSCALL nosRegQueryElem(NOSREGQHANDLE_t qh,
1051  NOSGENERICHANDLE_t *genh,
1052  char* namebuf, VAR_t bufsize);
1053 
1064 NANOEXT void POSCALL nosRegQueryEnd(NOSREGQHANDLE_t qh);
1065 #endif
1066 
1067 #endif /* NOSCFG_FEATURE_REGISTRY */
1068 #undef NANOEXT
1069 
1073 /*---------------------------------------------------------------------------
1074  * CPU USAGE
1075  *-------------------------------------------------------------------------*/
1076 
1077 #if (DOX!=0) || (NOSCFG_FEATURE_CPUUSAGE != 0)
1078 
1092 UVAR_t POSCALL nosCpuUsage(void);
1093 #endif
1094 
1098 /*---------------------------------------------------------------------------
1099  * ABSTRACTED FUNCTIONS
1100  *-------------------------------------------------------------------------*/
1101 
1102 #ifdef _N_CORE_C
1103 #define NANOEXT
1104 #else
1105 #define NANOEXT extern
1106 #endif
1107 
1126 
1127 
1128 #if (DOX!=0) || (NOSCFG_FEATURE_TASKCREATE != 0)
1129 
1152 NANOEXT NOSTASK_t POSCALL nosTaskCreate(POSTASKFUNC_t funcptr,
1153  void *funcarg,
1154  VAR_t priority,
1155  UINT_t stacksize,
1156  const char* name);
1157 
1158 
1159 #if (DOX!=0) || (POSCFG_FEATURE_YIELD != 0)
1160 
1170 #if DOX
1171 NANOEXT void POSCALL nosTaskYield(void);
1172 #else
1173 #define nosTaskYield() posTaskYield()
1174 #endif
1175 #endif
1176 
1177 #if (DOX!=0) || (POSCFG_FEATURE_SLEEP != 0)
1178 
1194 #if DOX
1195 NANOEXT void POSCALL nosTaskSleep(UINT_t ticks);
1196 #else
1197 #define nosTaskSleep(ticks) posTaskSleep(ticks)
1198 #endif
1199 #endif
1200 
1201 #if (DOX!=0) || (POSCFG_FEATURE_EXIT != 0)
1202 
1211 #if DOX
1212 NANOEXT void POSCALL nosTaskExit(void);
1213 #else
1214 #define nosTaskExit() posTaskExit()
1215 #endif
1216 #endif
1217 
1218 #if (DOX!=0) || (POSCFG_FEATURE_GETTASK != 0)
1219 
1229 #if DOX
1230 NANOEXT NOSTASK_t POSCALL nosTaskGetCurrent(void);
1231 #else
1232 #define nosTaskGetCurrent() (NOSTASK_t)posTaskGetCurrent()
1233 #endif
1234 #endif
1235 
1236 #if (DOX!=0) || (POSCFG_FEATURE_TASKUNUSED != 0)
1237 
1252 #if DOX
1253 NANOEXT VAR_t POSCALL nosTaskUnused(NOSTASK_t taskhandle);
1254 #else
1255 #define nosTaskUnused(th) posTaskUnused((POSTASK_t)(th))
1256 #endif
1257 #endif
1258 
1259 #if (DOX!=0) || (POSCFG_FEATURE_SETPRIORITY != 0)
1260 
1275 #if DOX
1276 NANOEXT VAR_t POSCALL nosTaskSetPriority(NOSTASK_t taskhandle,
1277  VAR_t priority);
1278 #else
1279 #define nosTaskSetPriority(th, prio) posTaskSetPriority((POSTASK_t)(th),prio)
1280 #endif
1281 #endif
1282 
1283 #if (DOX!=0) || (POSCFG_FEATURE_GETPRIORITY != 0)
1284 
1295 #if DOX
1296 NANOEXT VAR_t POSCALL nosTaskGetPriority(NOSTASK_t taskhandle);
1297 #else
1298 #define nosTaskGetPriority(th) posTaskGetPriority((POSTASK_t)(th))
1299 #endif
1300 #endif
1301 
1302 #if (DOX!=0) || (POSCFG_FEATURE_INHIBITSCHED != 0)
1303 
1316 #if DOX
1317 NANOEXT void POSCALL nosTaskSchedLock(void);
1318 #else
1319 #define nosTaskSchedLock() posTaskSchedLock()
1320 #endif
1321 
1333 #if DOX
1334 NANOEXT void POSCALL nosTaskSchedUnlock(void);
1335 #else
1336 #define nosTaskSchedUnlock() posTaskSchedUnlock()
1337 #endif
1338 #endif
1339 
1340 #if (DOX!=0) || (POSCFG_TASKCB_USERSPACE > 0)
1341 
1351 #if DOX
1352 NANOEXT void* POSCALL nosTaskGetUserspace(void);
1353 #else
1354 #define nosTaskGetUserspace() posTaskGetUserspace()
1355 #endif
1356 #endif
1357 
1358 #if (DOX!=0) || (POSCFG_FEATURE_IDLETASKHOOK != 0)
1359 
1381 #if DOX
1382 NANOEXT NOSIDLEFUNC_t POSCALL nosInstallIdleTaskHook(NOSIDLEFUNC_t idlefunc);
1383 #else
1384 #define nosInstallIdleTaskHook(ifunc) posInstallIdleTaskHook(ifunc)
1385 #endif
1386 #endif
1387 
1388 #endif
1389 
1397 #if DOX!=0 || NOSCFG_FEATURE_SEMAPHORES != 0
1398 
1401 
1426 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1427 NANOEXT NOSSEMA_t POSCALL nosSemaCreate(INT_t initcount, UVAR_t options,
1428  const char *name);
1429 #else
1430 #define nosSemaCreate(i, o, n) (NOSSEMA_t) posSemaCreate(i);
1431 #endif
1432 
1433 #if DOX!=0 || POSCFG_FEATURE_SEMADESTROY != 0
1434 
1446 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1447 NANOEXT void POSCALL nosSemaDestroy(NOSSEMA_t sema);
1448 #else
1449 #define nosSemaDestroy(sema) posSemaDestroy((POSSEMA_t)(sema))
1450 #endif
1451 #endif
1452 
1453 #if DOX
1454 
1467 NANOEXT VAR_t POSCALL nosSemaSignal(NOSSEMA_t sema);
1468 #else
1469 #define nosSemaSignal(sem) posSemaSignal((POSSEMA_t)(sem))
1470 #endif
1471 
1472 #if DOX
1473 
1487 NANOEXT VAR_t POSCALL nosSemaGet(NOSSEMA_t sema);
1488 #else
1489 #define nosSemaGet(sem) posSemaGet((POSSEMA_t)(sem))
1490 #endif
1491 
1492 #if DOX
1493 
1515 NANOEXT VAR_t POSCALL nosSemaWait(NOSSEMA_t sema, UINT_t timeoutticks);
1516 #else
1517 #if POSCFG_FEATURE_SEMAWAIT
1518 #define nosSemaWait(sem, to) posSemaWait((POSSEMA_t)(sem), to)
1519 #endif
1520 #endif
1521 
1522 #endif /* POSCFG_FEATURE_SEMAPHORES */
1523 
1531 #if DOX!=0 || NOSCFG_FEATURE_MUTEXES != 0
1532 
1535 
1557 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1558 NANOEXT NOSMUTEX_t POSCALL nosMutexCreate(UVAR_t options, const char *name);
1559 #else
1560 #define nosMutexCreate(opt, name) (NOSMUTEX_t) posMutexCreate()
1561 #endif
1562 
1563 #if DOX!=0 || POSCFG_FEATURE_MUTEXDESTROY != 0
1564 
1576 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1577 NANOEXT void POSCALL nosMutexDestroy(NOSMUTEX_t mutex);
1578 #else
1579 #define nosMutexDestroy(mutex) posMutexDestroy((POSMUTEX_t)(mutex))
1580 #endif
1581 #endif
1582 
1583 #if DOX!=0 || POSCFG_FEATURE_MUTEXTRYLOCK != 0
1584 
1601 #if DOX
1602 NANOEXT VAR_t POSCALL nosMutexTryLock(NOSMUTEX_t mutex);
1603 #else
1604 #define nosMutexTryLock(mutex) posMutexTryLock((POSMUTEX_t)(mutex))
1605 #endif
1606 #endif
1607 
1622 #if DOX
1623 NANOEXT VAR_t POSCALL nosMutexLock(NOSMUTEX_t mutex);
1624 #else
1625 #define nosMutexLock(mutex) posMutexLock((POSMUTEX_t)(mutex))
1626 #endif
1627 
1640 #if DOX
1641 NANOEXT VAR_t POSCALL nosMutexUnlock(NOSMUTEX_t mutex);
1642 #else
1643 #define nosMutexUnlock(mutex) posMutexUnlock((POSMUTEX_t)(mutex))
1644 #endif
1645 
1646 #endif /* NOSCFG_FEATURE_MUTEXES */
1647 
1657 #if DOX!=0 || NOSCFG_FEATURE_MSGBOXES != 0
1658 
1680 NANOEXT void* POSCALL nosMessageAlloc(UINT_t msgSize);
1681 
1691 NANOEXT void POSCALL nosMessageFree(void *buf);
1692 
1705 NANOEXT VAR_t POSCALL nosMessageSend(void *buf, NOSTASK_t taskhandle);
1706 
1721 #if DOX
1722 NANOEXT void* POSCALL nosMessageGet(void);
1723 #else
1724 #define nosMessageGet() posMessageGet()
1725 #endif
1726 
1727 #if DOX!=0 || POSCFG_FEATURE_MSGWAIT != 0
1728 
1752 #if DOX
1753 NANOEXT void* POSCALL nosMessageWait(UINT_t timeoutticks);
1754 #else
1755 #define nosMessageWait(to) posMessageWait(to)
1756 #endif
1757 #endif
1758 
1773 #if DOX
1774 NANOEXT VAR_t POSCALL nosMessageAvailable(void);
1775 #else
1776 #define nosMessageAvailable() posMessageAvailable()
1777 #endif
1778 
1779 #endif /* NOSCFG_FEATURE_MSGBOXES */
1780 
1789 #if DOX!=0 || NOSCFG_FEATURE_FLAGS != 0
1790 
1793 
1818 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1819 NANOEXT NOSFLAG_t POSCALL nosFlagCreate(const char* name);
1820 #else
1821 #define nosFlagCreate(name) (NOSFLAG_t) posFlagCreate()
1822 #endif
1823 
1824 #if DOX!=0 || POSCFG_FEATURE_FLAGDESTROY != 0
1825 
1837 #if (DOX!=0) || (NOSCFG_FEATURE_REGISTRY != 0)
1838 NANOEXT void POSCALL nosFlagDestroy(NOSFLAG_t flg);
1839 #else
1840 #define nosFlagDestroy(flg) posFlagDestroy((POSFLAG_t)(flg))
1841 #endif
1842 #endif
1843 
1858 #if DOX
1859 NANOEXT VAR_t POSCALL nosFlagSet(NOSFLAG_t flg, UVAR_t flgnum);
1860 #else
1861 #define nosFlagSet(flg, num) posFlagSet((POSFLAG_t)(flg), num)
1862 #endif
1863 
1880 #if DOX
1881 NANOEXT VAR_t POSCALL nosFlagGet(NOSFLAG_t flg, UVAR_t mode);
1882 #else
1883 #define nosFlagGet(flg, mode) posFlagGet((POSFLAG_t)(flg), mode)
1884 #endif
1885 
1886 #if DOX!=0 || POSCFG_FEATURE_FLAGWAIT != 0
1887 
1908 #if DOX
1909 NANOEXT VAR_t POSCALL nosFlagWait(NOSFLAG_t flg, UINT_t timeoutticks);
1910 #else
1911 #define nosFlagWait(flg, to) posFlagWait((POSFLAG_t)(flg), to)
1912 #endif
1913 #endif
1914 
1915 #define NOSFLAG_MODE_GETSINGLE POSFLAG_MODE_GETSINGLE
1916 #define NOSFLAG_MODE_GETMASK POSFLAG_MODE_GETMASK
1917 
1918 #endif /* NOSCFG_FEATURE_FLAGS */
1919 
1932 #if DOX!=0 || NOSCFG_FEATURE_TIMER != 0
1933 
1936 
1959 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
1960 NANOEXT NOSTIMER_t POSCALL nosTimerCreate(const char *name);
1961 #else
1962 #define nosTimerCreate(name) (NOSTIMER_t) posTimerCreate()
1963 #endif
1964 
1984 #if DOX
1985 NANOEXT VAR_t POSCALL nosTimerSet(NOSTIMER_t tmr, NOSSEMA_t sema,
1986  UINT_t waitticks, UINT_t periodticks);
1987 #else
1988 #define nosTimerSet(t, s, w, p) \
1989  posTimerSet((POSTIMER_t)(t), (POSSEMA_t)(s), w, p)
1990 #endif
1991 
2005 #if DOX
2006 NANOEXT VAR_t POSCALL nosTimerStart(NOSTIMER_t tmr);
2007 #else
2008 #define nosTimerStart(tmr) posTimerStart((POSTIMER_t)(tmr))
2009 #endif
2010 
2023 #if DOX
2024 NANOEXT VAR_t POSCALL nosTimerStop(NOSTIMER_t tmr);
2025 #else
2026 #define nosTimerStop(tmr) posTimerStop((POSTIMER_t)(tmr))
2027 #endif
2028 
2029 #if DOX!=0 || POSCFG_FEATURE_TIMERDESTROY != 0
2030 
2042 #if DOX!=0 || NOSCFG_FEATURE_REGISTRY != 0
2043 NANOEXT void POSCALL nosTimerDestroy(NOSTIMER_t tmr);
2044 #else
2045 #define nosTimerDestroy(tmr) posTimerDestroy((POSTIMER_t)(tmr))
2046 #endif
2047 #endif
2048 
2049 #if DOX!=0 || POSCFG_FEATURE_TIMERFIRED != 0
2050 
2064 #if DOX
2065 NANOEXT VAR_t POSCALL nosTimerFired(NOSTIMER_t tmr);
2066 #else
2067 #define nosTimerFired(tmr) posTimerFired((POSTIMER_t)(tmr))
2068 #endif
2069 #endif
2070 
2071 #endif /* NOSCFG_FEATURE_TIMER */
2072 
2074 #undef NANOEXT
2075 
2079 /*---------------------------------------------------------------------------
2080  * INITIALIZATION
2081  *-------------------------------------------------------------------------*/
2082 
2088 #ifdef _N_CORE_C
2089 #define NANOEXT
2090 #else
2091 #define NANOEXT extern
2092 #endif
2093 
2114 NANOEXT void POSCALL nosInit(POSTASKFUNC_t firstfunc,
2115  void *funcarg, VAR_t priority,
2116  UINT_t taskStackSize, UINT_t idleStackSize);
2117 
2118 #ifndef _N_CORE_C
2119 #ifndef _POSCORE_C
2120 #define posInit _Please_use_nosInit_instead_of_posInit_
2121 #endif
2122 #endif
2123 #undef NANOEXT
2124 
2126 #endif /* _POS_NANO_H */
2127 
void(* POSIDLEFUNC_t)(void)
Idle task function pointer.
Definition: picoos.h:849
struct POSTIMER * POSTIMER_t
Handle to a timer object.
Definition: picoos.h:885
NANOEXT NOSFLAG_t POSCALL nosFlagCreate(const char *name)
NANOEXT VAR_t POSCALL nosMutexUnlock(NOSMUTEX_t mutex)
NANOEXT VAR_t POSCALL nosFlagWait(NOSFLAG_t flg, UINT_t timeoutticks)
pico]OS main include file
NANOEXT void POSCALL nosRegQueryEnd(NOSREGQHANDLE_t qh)
POSMUTEX_t NOSMUTEX_t
Definition: pos_nano.h:1534
POSSEMA_t NOSSEMA_t
Definition: pos_nano.h:1400
POSTASK_t NOSTASK_t
Definition: pos_nano.h:1125
NANOEXT void POSCALL nosBottomHalfStart(UVAR_t number)
Definition: pos_nano.h:899
NANOEXT VAR_t POSCALL nosTaskUnused(NOSTASK_t taskhandle)
NANOEXT NOSGENERICHANDLE_t POSCALL nosGetHandleByName(NOSREGTYPE_t objtype, const char *objname)
NANOEXT void *POSCALL nosMessageAlloc(UINT_t msgSize)
NANOEXT void POSCALL nosMemCopy(void *dst, void *src, UINT_t count)
NANOEXT void POSCALL nosPrint(const char *s)
const char * name
Name of this task (ASCII string)
Definition: picoos.h:3157
NANOEXT VAR_t POSCALL nosTimerFired(NOSTIMER_t tmr)
NANOEXT char POSCALL nosKeyGet(void)
NANOEXT NOSTASK_t POSCALL nosTaskCreate(POSTASKFUNC_t funcptr, void *funcarg, VAR_t priority, UINT_t stacksize, const char *name)
POSFLAG_t NOSFLAG_t
Definition: pos_nano.h:1792
Definition: pos_nano.h:905
Definition: pos_nano.h:913
NANOEXT NOSSEMA_t POSCALL nosSemaCreate(INT_t initcount, UVAR_t options, const char *name)
NANOEXT VAR_t POSCALL nosFlagSet(NOSFLAG_t flg, UVAR_t flgnum)
Definition: pos_nano.h:902
NANOEXT void POSCALL nosTaskSleep(UINT_t ticks)
NANOEXT VAR_t POSCALL nosRegDel(const char *keyname)
NANOEXT VAR_t POSCALL nosSemaGet(NOSSEMA_t sema)
pico]OS nano layer configuration file
pico]OS configuration file
NANOEXT void POSCALL c_nos_putcharReady(void)
NANOEXT void POSCALL nosTaskYield(void)
struct POSMUTEX * POSMUTEX_t
Handle to a mutex object.
Definition: picoos.h:875
NANOEXT VAR_t POSCALL nosTimerStop(NOSTIMER_t tmr)
NANOEXT VAR_t POSCALL nosGetNameByHandle(NOSGENERICHANDLE_t handle, char *buffer, VAR_t bufsize, NOSREGTYPE_t what)
Definition: pos_nano.h:911
NANOEXT VAR_t POSCALL nosMessageSend(void *buf, NOSTASK_t taskhandle)
struct POSFLAG * POSFLAG_t
Handle to a flag object.
Definition: picoos.h:880
POSIDLEFUNC_t NOSIDLEFUNC_t
Definition: pos_nano.h:1360
void * NOSREGQHANDLE_t
Definition: pos_nano.h:886
void(* POSTASKFUNC_t)(void *arg)
Generic function pointer.
Definition: picoos.h:837
NANOEXT void *POSCALL nosMemAlloc(UINT_t size)
void * NOSGENERICHANDLE_t
Definition: pos_nano.h:882
NANOEXT VAR_t POSCALL nosMutexLock(NOSMUTEX_t mutex)
NANOEXT UVAR_t POSCALL p_putchar(char c)
NANOEXT VAR_t POSCALL nosFlagGet(NOSFLAG_t flg, UVAR_t mode)
unsigned MINT_t UINT_t
Unsigned integer.
Definition: picoos.h:802
NANOEXT void POSCALL nosMemSet(void *buf, char val, UINT_t count)
UVAR_t POSCALL nosCpuUsage(void)
NANOEXT void POSCALL nosMemFree(void *p)
NANOEXT NOSIDLEFUNC_t POSCALL nosInstallIdleTaskHook(NOSIDLEFUNC_t idlefunc)
NANOEXT void *POSCALL nosMessageWait(UINT_t timeoutticks)
NANOEXT void POSCALL nosSemaDestroy(NOSSEMA_t sema)
NANOEXT void POSCALL nosFlagDestroy(NOSFLAG_t flg)
NANOEXT VAR_t POSCALL nosTimerStart(NOSTIMER_t tmr)
NANOEXT VAR_t POSCALL nosTimerSet(NOSTIMER_t tmr, NOSSEMA_t sema, UINT_t waitticks, UINT_t periodticks)
NANOEXT VAR_t POSCALL nosSemaWait(NOSSEMA_t sema, UINT_t timeoutticks)
NANOEXT void POSCALL nosTaskSchedUnlock(void)
NANOEXT void POSCALL * nosMemRealloc(void *memblock, UINT_t size)
signed MVAR_t VAR_t
Signed machine variable type. This variable type is the fastest for the target architecture.
Definition: picoos.h:770
NANOEXT VAR_t POSCALL nosTaskSetPriority(NOSTASK_t taskhandle, VAR_t priority)
POSTASKFUNC_t func
First function that ran in the task context.
Definition: picoos.h:3155
NANOEXT void *POSCALL nosTaskGetUserspace(void)
unsigned MVAR_t UVAR_t
Unsigned machine variable type. This variable type is the fastest for the target architecture.
Definition: picoos.h:777
POSTIMER_t NOSTIMER_t
Definition: pos_nano.h:1935
NANOEXT VAR_t POSCALL nosSemaSignal(NOSSEMA_t sema)
NANOEXT VAR_t POSCALL nosRegGet(const char *keyname, KEYVALUE_t *keyvalue)
NANOEXT NOSTIMER_t POSCALL nosTimerCreate(const char *name)
port configuration file
signed MINT_t INT_t
Signed integer.
Definition: picoos.h:791
NANOEXT void POSCALL nosSPrintf1(char *buf, const char *fmt, arg a1)
NOSREGTYPE_t
Definition: pos_nano.h:896
Definition: pos_nano.h:908
NANOEXT VAR_t POSCALL nosMutexTryLock(NOSMUTEX_t mutex)
NANOEXT VAR_t POSCALL nosBottomHalfRegister(UVAR_t number, NOSBHFUNC_t func, void *arg)
struct POSTASK * POSTASK_t
Task environment structure.
Definition: picoos.h:942
NANOEXT void POSCALL nosTimerDestroy(NOSTIMER_t tmr)
NANOEXT void POSCALL nosMessageFree(void *buf)
NANOEXT void POSCALL nosMutexDestroy(NOSMUTEX_t mutex)
POSTASK_t handle
Handle value of the pico]OS task.
Definition: picoos.h:3153
struct POSSEMA * POSSEMA_t
Handle to a semaphore object.
Definition: picoos.h:870
NANOEXT void POSCALL nosPrintf1(const char *fmt, arg a1)
NANOEXT void *POSCALL nosMessageGet(void)
NANOEXT void POSCALL nosTaskSchedLock(void)
NANOEXT NOSREGQHANDLE_t POSCALL nosRegQueryBegin(NOSREGTYPE_t type)
NANOEXT void POSCALL nosPrintChar(char c)
NANOEXT VAR_t POSCALL nosMessageAvailable(void)
NANOEXT NOSTASK_t POSCALL nosTaskGetCurrent(void)
NANOEXT VAR_t POSCALL nosTaskGetPriority(NOSTASK_t taskhandle)
NANOEXT VAR_t POSCALL nosRegSet(const char *keyname, KEYVALUE_t keyvalue)
void(* NOSBHFUNC_t)(void *arg, UVAR_t bh)
Definition: pos_nano.h:255
NANOEXT UVAR_t POSCALL nosKeyPressed(void)
NANOEXT VAR_t POSCALL nosRegQueryElem(NOSREGQHANDLE_t qh, NOSGENERICHANDLE_t *genh, char *namebuf, VAR_t bufsize)
NANOEXT NOSMUTEX_t POSCALL nosMutexCreate(UVAR_t options, const char *name)
NANOEXT void POSCALL c_nos_keyinput(UVAR_t key)
Definition: pos_nano.h:897
NANOEXT void POSCALL nosTaskExit(void)
NANOEXT void POSCALL nosInit(POSTASKFUNC_t firstfunc, void *funcarg, VAR_t priority, UINT_t taskStackSize, UINT_t idleStackSize)