diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-27 18:54:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-27 18:54:10 -0600 |
commit | 6a0e1afc60ec2d118bab9b43fbfd03218b2396d4 (patch) | |
tree | cfcd944886bdcf58ed96d7ebe98601ad6578d9e8 /nuttx/drivers/wireless/cc3000/spi.c | |
parent | 28936515c4366b3e2f7849dd4280f511785bf6ef (diff) | |
download | px4-nuttx-6a0e1afc60ec2d118bab9b43fbfd03218b2396d4.tar.gz px4-nuttx-6a0e1afc60ec2d118bab9b43fbfd03218b2396d4.tar.bz2 px4-nuttx-6a0e1afc60ec2d118bab9b43fbfd03218b2396d4.zip |
CC3000 driver updates from David Sidrane
Diffstat (limited to 'nuttx/drivers/wireless/cc3000/spi.c')
-rw-r--r-- | nuttx/drivers/wireless/cc3000/spi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nuttx/drivers/wireless/cc3000/spi.c b/nuttx/drivers/wireless/cc3000/spi.c index a5e190e3b..a0d3b82c8 100644 --- a/nuttx/drivers/wireless/cc3000/spi.c +++ b/nuttx/drivers/wireless/cc3000/spi.c @@ -72,7 +72,6 @@ static struct uint8_t rx_buffer[CC3000_RX_BUFFER_SIZE]; mqd_t queue; sem_t *done; - } spiconf; /***************************************************************************** @@ -195,7 +194,8 @@ static void *unsoliced_thread_func(void *parameter) while(spiconf.run) { memset(spiconf.rx_buffer,0,sizeof(spiconf.rx_buffer)); - nbytes = mq_receive(spiconf.queue, spiconf.rx_buffer, CC3000_RX_BUFFER_SIZE, 0); + nbytes = mq_receive(spiconf.queue, spiconf.rx_buffer, + CC3000_RX_BUFFER_SIZE, 0); if (nbytes > 0) { nlldbg("%d Processed\n",nbytes); @@ -240,12 +240,15 @@ void SpiOpen(gcSpiHandleRx pfRxHandler) pthread_attr_t attr; struct sched_param param; pthread_attr_init(&attr); + attr.stacksize = 292; param.sched_priority = SCHED_PRIORITY_DEFAULT-10; pthread_attr_setschedparam(&attr, ¶m); status = pthread_create(&spiconf.unsoliced_thread, &attr, unsoliced_thread_func, NULL); DEBUGASSERT(status == 0) } + + DEBUGASSERT(spiconf.cc3000fd); } /***************************************************************************** |