Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EasyCAT_LAB_simple EasyCAT_LAB_very_simple EasyCAT_LAB
osal.h
00001 /* 00002 * Licensed under the GNU General Public License version 2 with exceptions. See 00003 * LICENSE file in the project root for full license information 00004 */ 00005 00006 #ifndef _osal_ 00007 #define _osal_ 00008 00009 00010 #ifdef __cplusplus 00011 extern "C" 00012 { 00013 #endif 00014 00015 #include "osal_defs.h" 00016 #include <stdint.h> 00017 00018 /* General types */ 00019 #define TRUE 1 00020 #define FALSE 0 00021 00022 #define boolean uint8_t 00023 00024 #define uint8 uint8_t 00025 #define uint16 uint16_t 00026 #define uint32 uint32_t 00027 #define uint64 uint64_t 00028 #define int8 int8_t 00029 #define int16 int16_t 00030 #define int32 int32_t 00031 #define int64 int64_t 00032 00033 00034 00035 typedef struct 00036 { 00037 uint32 sec; //< Seconds elapsed since the Epoch (Jan 1, 1970) 00038 uint32 usec; //< Microseconds elapsed since last second boundary 00039 } ec_timet; 00040 00041 00042 typedef struct osal_timer 00043 { 00044 ec_timet stop_time; 00045 } osal_timert; 00046 00047 void osal_timer_start(osal_timert * self, uint32 timeout_us); 00048 boolean osal_timer_is_expired(osal_timert * self); 00049 int osal_usleep(uint32 usec); 00050 ec_timet osal_current_time(void); 00051 00052 #ifdef __cplusplus 00053 } 00054 #endif 00055 00056 #endif 00057
Generated on Tue Jul 12 2022 18:21:13 by
