* See the comments at the top of main.c, main_full.c and main_low_power.c for\r
* more information.\r
*/\r
-#define configCREATE_LOW_POWER_DEMO 2\r
+#define configCREATE_LOW_POWER_DEMO 1\r
\r
/* Some configuration is dependent on the demo being built. */\r
#if( configCREATE_LOW_POWER_DEMO == 0 )\r
#define configUSE_MALLOC_FAILED_HOOK ( 0 )\r
#define configUSE_IDLE_HOOK ( 0 )\r
\r
- #define configENERGY_MODE ( sleepEM4 )\r
+ #define configENERGY_MODE ( sleepEM3 )\r
\r
#elif( configCREATE_LOW_POWER_DEMO == 2 )\r
\r
#define configTIMER_QUEUE_LENGTH ( 10 )\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE )\r
\r
-/* Interrupt nesting behaviour configuration. */\r
-#define configKERNEL_INTERRUPT_PRIORITY ( 255 )\r
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 191 ) /* equivalent to 0xa0, or priority 5. */\r
+/* Cortex-M specific definitions. */\r
+#ifdef __NVIC_PRIO_BITS\r
+ /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */\r
+ #define configPRIO_BITS __NVIC_PRIO_BITS\r
+#else\r
+ #define configPRIO_BITS 3 /* 7 priority levels */\r
+#endif\r
+\r
+/* The lowest interrupt priority that can be used in a call to a "set priority"\r
+function. */\r
+#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x07\r
+\r
+/* The highest interrupt priority that can be used by any interrupt service\r
+routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL\r
+INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER\r
+PRIORITY THAN THIS! (higher priorities are lower numeric values. */\r
+#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 0x05\r
+\r
+/* Interrupt priorities used by the kernel port layer itself. These are generic\r
+to all Cortex-M ports, and do not rely on any particular library functions. */\r
+#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
+/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!\r
+See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */\r
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
+\r
\r
/* Optional functions - most linkers will remove unused functions anyway. */\r
#define INCLUDE_vTaskPrioritySet ( 1 )\r