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.
Fork of 2016_Sp_momoi_taka by
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 00008 void printfBytes(const char* label,const u8* data, int len); 00009 void printHex(const u8* d, int len); 00010 00011 #ifndef min 00012 #define min(_a,_b) ((_a) < (_b) ? (_a) : (_b)) 00013 #endif 00014 00015 00016 inline int LE16(const u8* d) 00017 { 00018 return d[0] | (d[1] << 8); 00019 } 00020 00021 inline u32 BE32(const u8* d) 00022 { 00023 return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; 00024 } 00025 00026 inline void BE32(u32 n, u8* d) 00027 { 00028 d[0] = (u8)(n >> 24); 00029 d[1] = (u8)(n >> 16); 00030 d[2] = (u8)(n >> 8); 00031 d[3] = (u8)n; 00032 } 00033 00034 inline void BE16(u32 n, u8* d) 00035 { 00036 d[0] = (u8)(n >> 8); 00037 d[1] = (u8)n; 00038 }
Generated on Tue Jul 12 2022 21:01:02 by
 1.7.2
 1.7.2 
    