Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.

Dependencies:   mbed

Committer:
dflet
Date:
Tue Sep 15 16:45:04 2015 +0000
Revision:
22:f9b5e0b80bf2
Parent:
16:7e5aab2fabba
Removed some debug.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:50cedd586816 1 /*
dflet 0:50cedd586816 2 FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
dflet 0:50cedd586816 3 All rights reserved
dflet 0:50cedd586816 4
dflet 0:50cedd586816 5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
dflet 0:50cedd586816 6
dflet 0:50cedd586816 7 ***************************************************************************
dflet 0:50cedd586816 8 * *
dflet 0:50cedd586816 9 * FreeRTOS provides completely free yet professionally developed, *
dflet 0:50cedd586816 10 * robust, strictly quality controlled, supported, and cross *
dflet 0:50cedd586816 11 * platform software that has become a de facto standard. *
dflet 0:50cedd586816 12 * *
dflet 0:50cedd586816 13 * Help yourself get started quickly and support the FreeRTOS *
dflet 0:50cedd586816 14 * project by purchasing a FreeRTOS tutorial book, reference *
dflet 0:50cedd586816 15 * manual, or both from: http://www.FreeRTOS.org/Documentation *
dflet 0:50cedd586816 16 * *
dflet 0:50cedd586816 17 * Thank you! *
dflet 0:50cedd586816 18 * *
dflet 0:50cedd586816 19 ***************************************************************************
dflet 0:50cedd586816 20
dflet 0:50cedd586816 21 This file is part of the FreeRTOS distribution.
dflet 0:50cedd586816 22
dflet 0:50cedd586816 23 FreeRTOS is free software; you can redistribute it and/or modify it under
dflet 0:50cedd586816 24 the terms of the GNU General Public License (version 2) as published by the
dflet 0:50cedd586816 25 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
dflet 0:50cedd586816 26
dflet 0:50cedd586816 27 >>! NOTE: The modification to the GPL is included to allow you to distribute
dflet 0:50cedd586816 28 >>! a combined work that includes FreeRTOS without being obliged to provide
dflet 0:50cedd586816 29 >>! the source code for proprietary components outside of the FreeRTOS
dflet 0:50cedd586816 30 >>! kernel.
dflet 0:50cedd586816 31
dflet 0:50cedd586816 32 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
dflet 0:50cedd586816 33 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dflet 0:50cedd586816 34 FOR A PARTICULAR PURPOSE. Full license text is available from the following
dflet 0:50cedd586816 35 link: http://www.freertos.org/a00114.html
dflet 0:50cedd586816 36
dflet 0:50cedd586816 37 1 tab == 4 spaces!
dflet 0:50cedd586816 38
dflet 0:50cedd586816 39 ***************************************************************************
dflet 0:50cedd586816 40 * *
dflet 0:50cedd586816 41 * Having a problem? Start by reading the FAQ "My application does *
dflet 0:50cedd586816 42 * not run, what could be wrong?" *
dflet 0:50cedd586816 43 * *
dflet 0:50cedd586816 44 * http://www.FreeRTOS.org/FAQHelp.html *
dflet 0:50cedd586816 45 * *
dflet 0:50cedd586816 46 ***************************************************************************
dflet 0:50cedd586816 47
dflet 0:50cedd586816 48 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
dflet 0:50cedd586816 49 license and Real Time Engineers Ltd. contact details.
dflet 0:50cedd586816 50
dflet 0:50cedd586816 51 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
dflet 0:50cedd586816 52 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
dflet 0:50cedd586816 53 compatible FAT file system, and our tiny thread aware UDP/IP stack.
dflet 0:50cedd586816 54
dflet 0:50cedd586816 55 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
dflet 0:50cedd586816 56 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
dflet 0:50cedd586816 57 licenses offer ticketed support, indemnification and middleware.
dflet 0:50cedd586816 58
dflet 0:50cedd586816 59 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
dflet 0:50cedd586816 60 engineered and independently SIL3 certified version for use in safety and
dflet 0:50cedd586816 61 mission critical applications that require provable dependability.
dflet 0:50cedd586816 62
dflet 0:50cedd586816 63 1 tab == 4 spaces!
dflet 0:50cedd586816 64 */
dflet 0:50cedd586816 65
dflet 0:50cedd586816 66 #ifndef FREERTOS_CONFIG_H
dflet 0:50cedd586816 67 #define FREERTOS_CONFIG_H
dflet 0:50cedd586816 68
dflet 0:50cedd586816 69 /*-----------------------------------------------------------
dflet 0:50cedd586816 70 * Application specific definitions.
dflet 0:50cedd586816 71 *
dflet 0:50cedd586816 72 * These definitions should be adjusted for your particular hardware and
dflet 0:50cedd586816 73 * application requirements.
dflet 0:50cedd586816 74 *
dflet 0:50cedd586816 75 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
dflet 0:50cedd586816 76 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
dflet 0:50cedd586816 77 *----------------------------------------------------------*/
dflet 0:50cedd586816 78
dflet 0:50cedd586816 79 #include <stdint.h>
dflet 0:50cedd586816 80 extern uint32_t SystemCoreClock;
dflet 0:50cedd586816 81
dflet 0:50cedd586816 82 #define configUSE_PREEMPTION 1
dflet 0:50cedd586816 83 #define configUSE_IDLE_HOOK 0
dflet 0:50cedd586816 84 #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
dflet 0:50cedd586816 85 #define configUSE_TICK_HOOK 0
dflet 0:50cedd586816 86 #define configCPU_CLOCK_HZ ( ( unsigned long ) SystemCoreClock )
dflet 0:50cedd586816 87 #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
dflet 0:50cedd586816 88 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
dflet 16:7e5aab2fabba 89 #define configTOTAL_HEAP_SIZE ( ( size_t ) (36 * 1024) )
dflet 13:bf45f592c2b6 90 #define configMAX_TASK_NAME_LEN ( 24 )
dflet 0:50cedd586816 91 #define configUSE_TRACE_FACILITY 1
dflet 0:50cedd586816 92 #define configUSE_16_BIT_TICKS 0
dflet 0:50cedd586816 93 #define configIDLE_SHOULD_YIELD 1//0
dflet 0:50cedd586816 94 #define configUSE_MUTEXES 1
dflet 0:50cedd586816 95
dflet 0:50cedd586816 96 /* Co-routine definitions. */
dflet 0:50cedd586816 97 #define configUSE_CO_ROUTINES 0
dflet 0:50cedd586816 98 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
dflet 0:50cedd586816 99
dflet 0:50cedd586816 100 #define configUSE_COUNTING_SEMAPHORES 1//0
dflet 0:50cedd586816 101 #define configUSE_ALTERNATIVE_API 1//0
dflet 0:50cedd586816 102 #define configCHECK_FOR_STACK_OVERFLOW 0
dflet 0:50cedd586816 103 #define configUSE_RECURSIVE_MUTEXES 1
dflet 0:50cedd586816 104 #define configQUEUE_REGISTRY_SIZE 10
dflet 0:50cedd586816 105 #define configGENERATE_RUN_TIME_STATS 0
dflet 0:50cedd586816 106
dflet 0:50cedd586816 107 /* Timer related defines. */
dflet 0:50cedd586816 108 #define configUSE_TIMERS 0
dflet 0:50cedd586816 109 #define configTIMER_TASK_PRIORITY 2
dflet 0:50cedd586816 110 #define configTIMER_QUEUE_LENGTH 20
dflet 0:50cedd586816 111 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
dflet 0:50cedd586816 112 #define configUSE_MALLOC_FAILED_HOOK 0//1
dflet 0:50cedd586816 113 #define configENABLE_BACKWARD_COMPATIBILITY 1//0
dflet 0:50cedd586816 114
dflet 0:50cedd586816 115 /* Set the following definitions to 1 to include the API function, or zero
dflet 0:50cedd586816 116 to exclude the API function. */
dflet 0:50cedd586816 117
dflet 0:50cedd586816 118 #define INCLUDE_vTaskPrioritySet 1
dflet 0:50cedd586816 119 #define INCLUDE_uxTaskPriorityGet 1
dflet 0:50cedd586816 120 #define INCLUDE_vTaskDelete 1
dflet 0:50cedd586816 121 #define INCLUDE_vTaskCleanUpResources 1
dflet 0:50cedd586816 122 #define INCLUDE_vTaskSuspend 1
dflet 0:50cedd586816 123 #define INCLUDE_vTaskDelayUntil 1
dflet 0:50cedd586816 124 #define INCLUDE_vTaskDelay 1
dflet 0:50cedd586816 125 #define INCLUDE_uxTaskGetStackHighWaterMark 0
dflet 0:50cedd586816 126 #define INCLUDE_xTaskGetSchedulerState 1
dflet 0:50cedd586816 127 #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
dflet 0:50cedd586816 128 #define INCLUDE_xTaskGetIdleTaskHandle 1
dflet 0:50cedd586816 129 #define INCLUDE_pcTaskGetTaskName 1
dflet 0:50cedd586816 130 #define INCLUDE_eTaskGetState 1
dflet 0:50cedd586816 131 #define INCLUDE_xSemaphoreGetMutexHolder 0
dflet 0:50cedd586816 132
dflet 0:50cedd586816 133
dflet 0:50cedd586816 134 /* Use the system definition, if there is one */
dflet 0:50cedd586816 135 #ifdef __NVIC_PRIO_BITS
dflet 0:50cedd586816 136 #define configPRIO_BITS __NVIC_PRIO_BITS
dflet 0:50cedd586816 137 #else
dflet 0:50cedd586816 138 #if (THIS_BOARD == Seeed_Arch_Max)
dflet 0:50cedd586816 139 #define configPRIO_BITS 4 /* 15 priority levels */
dflet 0:50cedd586816 140 #else
dflet 0:50cedd586816 141 #define configPRIO_BITS 5 /* 32 priority levels */
dflet 0:50cedd586816 142 #endif
dflet 0:50cedd586816 143 #endif
dflet 0:50cedd586816 144
dflet 0:50cedd586816 145 #if (THIS_BOARD == Seeed_Arch_Max)
dflet 0:50cedd586816 146
dflet 0:50cedd586816 147 /* The lowest interrupt priority that can be used in a call to a "set priority"
dflet 0:50cedd586816 148 function. */
dflet 0:50cedd586816 149 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0xf
dflet 0:50cedd586816 150
dflet 0:50cedd586816 151 /* The highest interrupt priority that can be used by any interrupt service
dflet 0:50cedd586816 152 routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
dflet 0:50cedd586816 153 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
dflet 0:50cedd586816 154 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
dflet 0:50cedd586816 155 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
dflet 0:50cedd586816 156
dflet 0:50cedd586816 157 /* Interrupt priorities used by the kernel port layer itself. These are generic
dflet 0:50cedd586816 158 to all Cortex-M ports, and do not rely on any particular library functions. */
dflet 0:50cedd586816 159 #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
dflet 0:50cedd586816 160 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
dflet 0:50cedd586816 161 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
dflet 0:50cedd586816 162 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
dflet 0:50cedd586816 163 #else
dflet 0:50cedd586816 164
dflet 0:50cedd586816 165 /* Define to trap errors during development. */
dflet 0:50cedd586816 166 //void vAssertCalled( const char *pcFile, unsigned long ulLine );
dflet 0:50cedd586816 167 // #define configASSERT( x ) if( x == 0 ) vAssertCalled( __FILE__, __LINE__ );
dflet 0:50cedd586816 168
dflet 0:50cedd586816 169 /* The lowest priority. */
dflet 0:50cedd586816 170 #define configKERNEL_INTERRUPT_PRIORITY ( 31 << (8 - configPRIO_BITS) )
dflet 0:50cedd586816 171 /* Priority 5, or 160 as only the top three bits are implemented. */
dflet 0:50cedd586816 172 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
dflet 0:50cedd586816 173 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
dflet 0:50cedd586816 174 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )
dflet 0:50cedd586816 175 #endif
dflet 0:50cedd586816 176
dflet 0:50cedd586816 177 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
dflet 0:50cedd586816 178 standard names - or at least those used in the unmodified vector table. */
dflet 0:50cedd586816 179 #define vPortSVCHandler SVC_Handler
dflet 0:50cedd586816 180 #define xPortPendSVHandler PendSV_Handler
dflet 0:50cedd586816 181 #define xPortSysTickHandler SysTick_Handler
dflet 0:50cedd586816 182
dflet 0:50cedd586816 183
dflet 0:50cedd586816 184 #endif /* FREERTOS_CONFIG_H */