cc3000 init code and rtos

Dependencies:   mbed-rtos mbed

Fork of rtos_basic by mbed official

Files at this revision

API Documentation at this revision

Comitter:
kruglov2a
Date:
Thu Dec 12 16:41:50 2013 +0000
Parent:
6:209f4db62daf
Commit message:
cc3000 host driver and mbed rtos

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Jun 04 16:01:32 2013 +0100
+++ b/main.cpp	Thu Dec 12 16:41:50 2013 +0000
@@ -1,21 +1,32 @@
 #include "mbed.h"
 #include "rtos.h"
  
-DigitalOut led1(LED1);
-DigitalOut led2(LED2);
+DigitalOut led1(P0_1);
+Serial pc(p19, p20);
  
-void led2_thread(void const *args) {
+void led1_thread(void const *args) {
     while (true) {
-        led2 = !led2;
+        led1 = !led1;
         Thread::wait(1000);
     }
 }
  
+ 
 int main() {
-    Thread thread(led2_thread);
+
+
+    pc.baud(115200);
+    
+    NVIC_SetPriority(SSP1_IRQn, 0x0);
+    NVIC_SetPriority(PIN_INT0_IRQn, 0x1);
+    // SysTick set to lower priority than Wi-Fi SPI bus interrupt
+    NVIC_SetPriority(SysTick_IRQn, 0x2);
+    
+    Thread thread(led1_thread);
     
     while (true) {
-        led1 = !led1;
+        
+        pc.printf("main Thread\r\n");
         Thread::wait(500);
     }
 }
--- a/mbed-rtos.lib	Tue Jun 04 16:01:32 2013 +0100
+++ b/mbed-rtos.lib	Thu Dec 12 16:41:50 2013 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed-rtos/
\ No newline at end of file
+https://mbed.org/users/mbed_official/code/mbed-rtos/#29007aef10a4
--- a/mbed.bld	Tue Jun 04 16:01:32 2013 +0100
+++ b/mbed.bld	Thu Dec 12 16:41:50 2013 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/1efda918f0ba
\ No newline at end of file