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.
Dependencies: X_NUCLEO_IKS01A1 MLX90614 d7a_1x wizzi-utils
Fork of D7A_1x_demo_sensors_OS5 by
Diff: main.cpp
- Revision:
- 3:5f2917933ece
- Parent:
- 1:711fb7d8127b
- Child:
- 4:8ac150ec1532
--- a/main.cpp Wed Dec 21 15:09:27 2016 +0000 +++ b/main.cpp Fri Jan 06 15:36:42 2017 +0000 @@ -47,14 +47,15 @@ #define D7A_PIN_RTS (D13) #define D7A_PIN_CTS (D9) #define D7A_PIN_RESET (A3) - #define D7A_DEBUG_LED (NC) + #define DEBUG_LED (NC) + #define DEBUG_BUTTON (USER_BUTTON) #elif defined(TARGET_STM32L432KC) #define D7A_PIN_TX (D5) #define D7A_PIN_RX (D4) #define D7A_PIN_RTS (D11) #define D7A_PIN_CTS (D10) #define D7A_PIN_RESET (D12) - #define D7A_DEBUG_LED (D13) // LED1 + #define DEBUG_LED (D13) // LED1 #else #error "Please choose or add the right platform." #endif @@ -412,12 +413,9 @@ int main() { // Start & initialize - DBG_OPEN(D7A_DEBUG_LED); + DBG_OPEN(DEBUG_LED); PRINT("\r\n--- Starting new run ---\r\n"); - DigitalOut myled(D7A_DEBUG_LED); - myled = 1; - extern uint16_t const os_maxtaskrun; //IPRINT("Max user threads: %d\r\n", os_maxtaskrun-1-9); @@ -488,8 +486,8 @@ ASSERT(status == osOK, "Failed to start fm thread (err: %d)\r\n", status); // For button -#ifdef USER_BUTTON - DebouncedInterrupt user_interrupt(USER_BUTTON); +#ifdef DEBUG_BUTTON + DebouncedInterrupt user_interrupt(DEBUG_BUTTON); user_interrupt.attach(button_push_isr, IRQ_FALL, 200, true); Thread but_th(osPriorityNormal, 512, NULL); @@ -502,7 +500,6 @@ while(true) { // Wait to avoid beeing stuck in loop - Thread::wait(200); - myled = !myled; + Thread::wait(osWaitForever); } } \ No newline at end of file