Test version of BlueUSB stack. Includes SDP and RFCOMM. As Client it allows to connect to my fischertechnik TX Controller. As Server it echo\\\\\\\'s characters to Putty. PIN=1234
Dependencies: mbed myUSBHost AvailableMemory
Dependents: mbed_TANK_Kinect myBlueUSB_ros ftusbClass
Diff: Utils.h
- Revision:
- 13:327622e38551
- Parent:
- 12:57f7679dd651
diff -r 57f7679dd651 -r 327622e38551 Utils.h --- a/Utils.h Sun Jun 19 19:32:51 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -#ifndef UTILS_H -#define UTILS_H - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned long u32; - -void DelayMS(int ms); - -void printfBytes(const char* label,const u8* data, int len); -void printHex(const u8* d, int len); -//void printf(const BD_ADDR* addr); - -#ifndef min -#define min(_a,_b) ((_a) < (_b) ? (_a) : (_b)) -#endif - -inline int LE16(const u8* d) -{ - return d[0] | (d[1] << 8); -} - -inline u32 BE32(const u8* d) -{ - return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3]; -} - -inline void BE32(u32 n, u8* d) -{ - d[0] = (u8)(n >> 24); - d[1] = (u8)(n >> 16); - d[2] = (u8)(n >> 8); - d[3] = (u8)n; -} - -inline void BE16(u32 n, u8* d) -{ - d[0] = (u8)(n >> 8); - d[1] = (u8)n; -} - -#endif \ No newline at end of file