cc3000 hostdriver with the mbed socket interface

Dependents:   cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more

Files at this revision

API Documentation at this revision

Comitter:
SolderSplashLabs
Date:
Thu Oct 03 20:22:45 2013 +0000
Parent:
18:7e22775eadb9
Child:
23:fed7f64dd520
Commit message:
Added HCI Command Logging;

Changed in this revision

cc3000.h Show annotated file Show diff for this revision Revisions of this file
cc3000_hci.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/cc3000.h	Wed Oct 02 21:57:28 2013 +0000
+++ b/cc3000.h	Thu Oct 03 20:22:45 2013 +0000
@@ -61,13 +61,17 @@
     #define DBG_SOCKET(x, ...) std::printf("[CC3000 : SOCKET] "x"\r\n", ##__VA_ARGS__);
 
     // DBG_HCI, prints a message for every recieved HCI event, quite a lot of debug
-    #define DBG_HCI(x, ...) std::printf("[CC3000 : HCI] "x"\r\n", ##__VA_ARGS__);
+    #define DBG_HCI(x, ...) std::printf("[CC3000 : HCI RX] "x"\r\n", ##__VA_ARGS__);
+    
+    // DBG_HCI_CMD, Prints commands that are sent
+    #define DBG_HCI_CMD(x, ...) std::printf("[CC3000 : HCI TX] "x"\r\n", ##__VA_ARGS__);
 
     // DBG_CC, General cc3000 debug messages
     #define DBG_CC(x, ...) std::printf("[CC3000] "x"\r\n", ##__VA_ARGS__);
 #else
     #define DBG_SOCKET(x, ...)
     #define DBG_HCI(x, ...)
+    #define DBG_HCI_CMD(x, ...)
     #define DBG_CC(x, ...)
 #endif
 
--- a/cc3000_hci.cpp	Wed Oct 02 21:57:28 2013 +0000
+++ b/cc3000_hci.cpp	Thu Oct 03 20:22:45 2013 +0000
@@ -53,6 +53,8 @@
 uint16_t  cc3000_hci::command_send(uint16_t op_code, uint8_t *buffer, uint8_t length) {
     unsigned char *stream;
 
+    DBG_HCI_CMD("Command Sent : 0x%04X", op_code);
+    
     stream = (buffer + SPI_HEADER_SIZE);
 
     UINT8_TO_STREAM(stream, HCI_TYPE_CMND);