SYS/BIOS  7.00
BIOS.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2021, Texas Instruments Incorporated - https://www.ti.com
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  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
159 /*
160  * ======== BIOS.h ========
161  */
162 
163 #ifndef ti_sysbios_BIOS__include
164 #define ti_sysbios_BIOS__include
165 
166 /* BIOS 6.x compatibility, use -Dxdc_std__include to disable */
167 #include <xdc/std.h>
168 
169 #include <stdbool.h>
170 #include <stddef.h>
171 #include <stdint.h>
172 
174 
175 #ifdef __cplusplus
176 extern "C" {
177 #endif
178 
179 /* Current version number */
180 #define ti_sysbios_BIOS_version (0x70000)
181 
194 };
196 
230 };
232 
236 #define BIOS_WAIT_FOREVER (~(0U))
237 
241 #define BIOS_NO_WAIT (0U)
242 
246 typedef void (*BIOS_StartupFuncPtr)(void);
247 
248 typedef void (*BIOS_StartFuncPtr)(void);
249 
250 typedef void (*BIOS_ExitFuncPtr)(int arg1);
251 
252 /* @cond NODOC */
253 typedef struct BIOS_Module_State BIOS_Module_State;
254 
255 struct BIOS_Module_State {
256  Types_FreqHz cpuFreq;
257  unsigned int rtsGateCount;
258  intptr_t rtsGateKey;
259  void * rtsGate;
260  BIOS_ThreadType threadType;
261  BIOS_ThreadType smpThreadType[4];
262  volatile BIOS_StartFuncPtr startFunc;
263  volatile BIOS_ExitFuncPtr exitFunc;
316  BIOS_RtsLockType rtsGateType;
317  uint16_t enables;
318  bool initDone;
319 };
332 extern const bool BIOS_smpEnabled;
333 
343 extern const bool BIOS_mpeEnabled;
364 extern const Types_FreqHz BIOS_cpuFreq;
365 
380 extern const bool BIOS_taskEnabled;
381 
393 extern const bool BIOS_swiEnabled;
394 
411 extern const bool BIOS_clockEnabled;
412 
419 extern const size_t BIOS_heapSize;
420 
429 extern const bool BIOS_heapTrackEnabled;
430 
439 extern const bool BIOS_setupSecureContext;
452 extern void BIOS_linkedWithIncorrectBootLibrary(void);
453 
454 /* init */
455 extern void BIOS_init(void);
456 /* @endcond */
457 
489 extern void BIOS_start(void);
490 
492 extern void BIOS_startFunc(void);
493 
494 extern void BIOS_exitFunc(int arg1);
510 extern void BIOS_exit(int stat);
511 
517 extern BIOS_ThreadType BIOS_getThreadType(void);
518 
529 extern BIOS_ThreadType BIOS_setThreadType(BIOS_ThreadType ttype);
537 extern void BIOS_setCpuFreq(Types_FreqHz *freq);
538 
544 extern void BIOS_getCpuFreq(Types_FreqHz *freq);
545 
547 extern void BIOS_startFunc(void);
548 extern void BIOS_atExitFunc(int stat);
549 extern void BIOS_exitFunc(int stat);
550 extern void BIOS_registerRTSLock(void);
551 extern void BIOS_removeRTSLock(void);
552 extern void BIOS_rtsLock(void);
553 extern void BIOS_rtsUnlock(void);
554 
555 extern BIOS_Module_State BIOS_Module_state;
556 #define BIOS_module (&(BIOS_Module_state))
557 
559 #ifdef __cplusplus
560 }
561 #endif
562 #endif /* ti_sysbios_BIOS__include */
Definition: BIOS.h:193
A single mutex is used to maintain re-entrancy.
Definition: BIOS.h:224
Basic constants and types.
BIOS_ThreadType
Current thread type definitions.
Definition: BIOS.h:189
const bool BIOS_clockEnabled
SYS/BIOS Clock services enable flag.
Swis are disabled and restored to maintain re-entrancy.
Definition: BIOS.h:220
void BIOS_start(void)
Start SYS/BIOS.
void BIOS_getCpuFreq(Types_FreqHz *freq)
Get CPU frequency in Hz.
const bool BIOS_taskEnabled
SYS/BIOS Task services enable flag.
void(* BIOS_ExitFuncPtr)(int arg1)
Definition: BIOS.h:250
void(* BIOS_StartupFuncPtr)(void)
User startup function type definition.
Definition: BIOS.h:246
No gate is added to the RTS library. In this case, the application needs to be careful to always seri...
Definition: BIOS.h:209
const bool BIOS_swiEnabled
SYS/BIOS Swi services enable flag.
void BIOS_setCpuFreq(Types_FreqHz *freq)
Set CPU Frequency in Hz.
Definition: BIOS.h:192
A single priority inheriting mutex is used to maintain re-entrancy.
Definition: BIOS.h:229
Definition: BIOS.h:190
const bool BIOS_heapTrackEnabled
Use HeapTrack with system default heap.
BIOS_ThreadType BIOS_getThreadType(void)
Get the current thread type.
Interrupts are disabled and restored to maintain re-entrancy. This is a very efficient lock but will ...
Definition: BIOS.h:216
const size_t BIOS_heapSize
Size of system heap, units are in MAUs.
const Types_FreqHz BIOS_cpuFreq
CPU frequency in Hz.
BIOS_RtsLockType
Type of Gate to use in the TI RTS library.
Definition: BIOS.h:202
Definition: BIOS.h:191
void(* BIOS_StartFuncPtr)(void)
Definition: BIOS.h:248
64-bit frequency struct (in Hz)
Definition: Types.h:98
void BIOS_exit(int stat)
Exit currently running SYS/BIOS executable.
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale