sbgPlatform.h
Go to the documentation of this file.
1 
25 #ifndef SBG_PLATFORM_H
26 #define SBG_PLATFORM_H
27 
28 // System headers
29 #include <stdint.h>
30 
31 // Local headers
32 #include "sbgDefines.h"
33 #include "sbgDebug.h"
34 #include "sbgErrorCodes.h"
35 
36 //----------------------------------------------------------------------//
37 //- Add here any additional includes you want to share -//
38 //----------------------------------------------------------------------//
39 
40 #ifdef _WIN32
41 #include <direct.h>
42 #elif defined(__unix__)
43 #include <unistd.h>
44 #endif
45 
46 //----------------------------------------------------------------------//
47 //- Specific timing methods to reimplement for your platform -//
48 //----------------------------------------------------------------------//
49 
54 SBG_COMMON_LIB_API uint32_t sbgGetTime(void);
55 
60 SBG_COMMON_LIB_API void sbgSleep(uint32_t ms);
61 
62 //----------------------------------------------------------------------//
63 //- Specific logging methods to reimplement for your platform -//
64 //----------------------------------------------------------------------//
65 
77 SBG_COMMON_LIB_API void sbgPlatformDebugLogMsg(const char *pFileName, const char *pFunctionName, uint32_t line, const char *pCategory, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pFormat, ...);
78 
79 //----------------------------------------------------------------------//
80 //- Errors and warning managment -//
81 //----------------------------------------------------------------------//
82 
87 #define SBG_PLATFORM_ASSERT(expression) assert((expression))
88 
89 #endif /* SBG_PLATFORM_H */
#define SBG_COMMON_LIB_API
Definition: sbgDefines.h:58
Header file that defines all error codes for SBG Systems libraries.
SBG_COMMON_LIB_API void sbgSleep(uint32_t ms)
Definition: sbgPlatform.c:54
SBG_COMMON_LIB_API void sbgPlatformDebugLogMsg(const char *pFileName, const char *pFunctionName, uint32_t line, const char *pCategory, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pFormat,...)
Definition: sbgPlatform.c:80
SBG_COMMON_LIB_API uint32_t sbgGetTime(void)
Definition: sbgPlatform.c:24
Define and handle error logging for the SBG Systems common C library.
enum _SbgDebugLogType SbgDebugLogType
Header file that contains all common definitions.
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s): SBG Systems
autogenerated on Thu Oct 22 2020 03:47:22