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: C12832 GPS GSM mbed
Fork of myBlueUSB_localfix by
Utils.h
00001 #ifndef UTILS_H 00002 #define UTILS_H 00003 00004 typedef unsigned char u8; 00005 typedef unsigned short u16; 00006 typedef unsigned long u32; 00007 00008 void DelayMS(int ms); 00009 00010 void printfBytes(const char* label,const u8* data, int len); 00011 void printHex(const u8* d, int len); 00012 //void printf(const BD_ADDR* addr); 00013 00014 #ifndef min 00015 #define min(_a,_b) ((_a) < (_b) ? (_a) : (_b)) 00016 #endif 00017 00018 inline int LE16(const u8* d) 00019 { 00020 return d[0] | (d[1] << 8); 00021 } 00022 00023 inline u32 BE32(const u8* d) 00024 { 00025 return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; 00026 } 00027 00028 inline void BE32(u32 n, u8* d) 00029 { 00030 d[0] = (u8)(n >> 24); 00031 d[1] = (u8)(n >> 16); 00032 d[2] = (u8)(n >> 8); 00033 d[3] = (u8)n; 00034 } 00035 00036 inline void BE16(u32 n, u8* d) 00037 { 00038 d[0] = (u8)(n >> 8); 00039 d[1] = (u8)n; 00040 } 00041 00042 #endif
Generated on Wed Jul 13 2022 02:37:52 by
1.7.2
