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.
Dependencies: FatFileSystem mbed
Utils.h
00001 00002 typedef unsigned char u8; 00003 typedef unsigned short u16; 00004 typedef unsigned long u32; 00005 00006 void DelayMS(int ms); 00007 int read_ana(void); 00008 void send_out(char *buf); 00009 void setup_rs232(void); 00010 void printfBytes(const char* label,const u8* data, int len); 00011 void printHex(const u8* d, int len); 00012 00013 #ifndef min 00014 #define min(_a,_b) ((_a) < (_b) ? (_a) : (_b)) 00015 #endif 00016 00017 inline int LE16(const u8* d) 00018 { 00019 return d[0] | (d[1] << 8); 00020 } 00021 00022 inline u32 BE32(const u8* d) 00023 { 00024 return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; 00025 } 00026 00027 inline void BE32(u32 n, u8* d) 00028 { 00029 d[0] = (u8)(n >> 24); 00030 d[1] = (u8)(n >> 16); 00031 d[2] = (u8)(n >> 8); 00032 d[3] = (u8)n; 00033 } 00034 00035 inline void BE16(u32 n, u8* d) 00036 { 00037 d[0] = (u8)(n >> 8); 00038 d[1] = (u8)n; 00039 } 00040 00041 inline const long ftoi(float x) { 00042 return (-(long)(x < 0)) + (long)x; 00043 }
Generated on Fri Jul 22 2022 08:49:43 by
1.7.2