diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-23 09:07:32 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-23 09:07:32 -0600 |
commit | 956003a63a2abff830bbcf00d6c735976afae521 (patch) | |
tree | 861d3006b4d45e952a9d9f39b66027b949af98f8 /nuttx/drivers/wireless/cc3000/socket.c | |
parent | 262fe457162a5c2c1329be901b18b6e2be58b3ee (diff) | |
download | px4-nuttx-956003a63a2abff830bbcf00d6c735976afae521.tar.gz px4-nuttx-956003a63a2abff830bbcf00d6c735976afae521.tar.bz2 px4-nuttx-956003a63a2abff830bbcf00d6c735976afae521.zip |
CC3000 driver updates from David Sidrane
Diffstat (limited to 'nuttx/drivers/wireless/cc3000/socket.c')
-rw-r--r-- | nuttx/drivers/wireless/cc3000/socket.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nuttx/drivers/wireless/cc3000/socket.c b/nuttx/drivers/wireless/cc3000/socket.c index a8858b0c6..ce2fcdd5e 100644 --- a/nuttx/drivers/wireless/cc3000/socket.c +++ b/nuttx/drivers/wireless/cc3000/socket.c @@ -38,6 +38,8 @@ #include <stdio.h> #include <string.h> +#include <unistd.h> +#include <debug.h> #include <stdlib.h> #include <nuttx/wireless/cc3000/hci.h> #include <nuttx/wireless/cc3000/include/sys/socket.h> @@ -139,7 +141,14 @@ int HostFlowControlConsumeBuff(int sd) { return -1; } - } while (0 == tSLInformation.usNumberOfFreeBuffers); + + /* We must yield here for the the Event to get processed that returns + * the buffers + */ + + usleep(100000); + } + while (0 == tSLInformation.usNumberOfFreeBuffers); tSLInformation.usNumberOfFreeBuffers--; @@ -1213,8 +1222,9 @@ int sendto(long sd, const void *buf, long len, long flags, const sockaddr *to, int mdnsAdvertiser(uint16_t mdnsEnabled, char * deviceServiceName, uint16_t deviceServiceNameLength) { + uint8_t *pTxBuffer; + uint8_t *pArgs; int ret; - uint8_t *pTxBuffer, *pArgs; if (deviceServiceNameLength > MDNS_DEVICE_SERVICE_MAX_LENGTH) { |