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 cc3000_hostdriver_mbedsocket by
Revision 21:fb34ac8d9af5, committed 2013-10-03
- 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);
