TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Committer:
dflet
Date:
Fri Sep 11 15:38:33 2015 +0000
Revision:
1:e448e81c416f
Parent:
0:400d8e75a8d0
Removed some debud.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:400d8e75a8d0 1 //*****************************************************************************
dflet 0:400d8e75a8d0 2 // Copyright (C) 2014 Texas Instruments Incorporated
dflet 0:400d8e75a8d0 3 //
dflet 0:400d8e75a8d0 4 // All rights reserved. Property of Texas Instruments Incorporated.
dflet 0:400d8e75a8d0 5 // Restricted rights to use, duplicate or disclose this code are
dflet 0:400d8e75a8d0 6 // granted through contract.
dflet 0:400d8e75a8d0 7 // The program may not be used without the written permission of
dflet 0:400d8e75a8d0 8 // Texas Instruments Incorporated or against the terms and conditions
dflet 0:400d8e75a8d0 9 // stipulated in the agreement under which this program has been supplied,
dflet 0:400d8e75a8d0 10 // and under no circumstances can it be used with non-TI connectivity device.
dflet 0:400d8e75a8d0 11 //
dflet 0:400d8e75a8d0 12 //*****************************************************************************
dflet 0:400d8e75a8d0 13
dflet 0:400d8e75a8d0 14 #ifndef _HTTP_HEADERS_H_
dflet 0:400d8e75a8d0 15 #define _HTTP_HEADERS_H_
dflet 0:400d8e75a8d0 16
dflet 0:400d8e75a8d0 17 #include "datatypes.h"
dflet 0:400d8e75a8d0 18 /**
dflet 0:400d8e75a8d0 19 * @defgroup HttpHeaders HTTP header strings
dflet 0:400d8e75a8d0 20 * This header file predefines various HTTP request and response header strings
dflet 0:400d8e75a8d0 21 *
dflet 0:400d8e75a8d0 22 * @{
dflet 0:400d8e75a8d0 23 */
dflet 0:400d8e75a8d0 24
dflet 0:400d8e75a8d0 25 char HTTP_HEADER_DELIMITER[] = "\r\n";
dflet 0:400d8e75a8d0 26
dflet 0:400d8e75a8d0 27 // HTTP method line strings
dflet 0:400d8e75a8d0 28 char HTTP_METHOD_GET[] = "get";
dflet 0:400d8e75a8d0 29 char HTTP_METHOD_POST[] = "post";
dflet 0:400d8e75a8d0 30 char HTTP_VERSION_1P1[] = "http/1.1";
dflet 0:400d8e75a8d0 31 char HTTP_VERSION_1P0[] = "http/1.0";
dflet 0:400d8e75a8d0 32
dflet 0:400d8e75a8d0 33 // HTTP request/response header line strings
dflet 0:400d8e75a8d0 34 char HTTP_CONTENT_TYPE[] = "content-type";
dflet 0:400d8e75a8d0 35 char HTTP_CONTENT_LENGTH[] = "content-length";
dflet 0:400d8e75a8d0 36 char HTTP_ACCEPT_ENCODING[] = "accept-encoding";
dflet 0:400d8e75a8d0 37 char HTTP_AUTHORIZATION[] = "authorization";
dflet 0:400d8e75a8d0 38 char HTTP_CONNECTION_CLOSE[] = "connection";
dflet 0:400d8e75a8d0 39 char HTTP_GZIP[] = "gzip";
dflet 0:400d8e75a8d0 40 char HTTP_CLOSE[] = "close";
dflet 0:400d8e75a8d0 41 char HTTP_LOCATION[] = "location";
dflet 0:400d8e75a8d0 42 char HTTP_CONTENT_ENCODING[] = "content-encoding";
dflet 0:400d8e75a8d0 43
dflet 0:400d8e75a8d0 44 // HTTP response status line strings
dflet 0:400d8e75a8d0 45 char HTTP_STATUS_OK_STR[] = "ok";
dflet 0:400d8e75a8d0 46 char HTTP_STATUS_REDIRECT_PERMANENT_STR[] = "moved permanently";
dflet 0:400d8e75a8d0 47 char HTTP_STATUS_REDIRECT_TEMPORARY_STR[] = "moved temporarily";
dflet 0:400d8e75a8d0 48 char HTTP_STATUS_ERROR_UNAUTHORIZED_STR[] = "unauthorized";
dflet 0:400d8e75a8d0 49 char HTTP_STATUS_ERROR_NOT_FOUND_STR[] = "not found";
dflet 0:400d8e75a8d0 50 char HTTP_STATUS_ERROR_NOT_ACCEPTED_STR[] = "not accepted";
dflet 0:400d8e75a8d0 51 char HTTP_STATUS_ERROR_INTERNAL_STR[] = "internal server error";
dflet 0:400d8e75a8d0 52
dflet 0:400d8e75a8d0 53 //WebSocket upgrade header line strings
dflet 0:400d8e75a8d0 54 char WS_HOST[] = "host";
dflet 0:400d8e75a8d0 55 char WS_UPGRADE[] = "upgrade";
dflet 0:400d8e75a8d0 56 char WS_CONNECTION[] = "connection";
dflet 0:400d8e75a8d0 57 char WS_VERSION_REQUEST[] = "sec-websocket-version";
dflet 0:400d8e75a8d0 58 char WS_KEY_REQUEST[] = "sec-websocket-key";
dflet 0:400d8e75a8d0 59 char WS_ORIGIN[] = "origin";
dflet 0:400d8e75a8d0 60 char WS_CACHE_CONTROL[] = "cache-control";
dflet 0:400d8e75a8d0 61 char WS_PRAGMA[] = "pragma";
dflet 0:400d8e75a8d0 62 char WS_EXTENSION[] = "sec-websocket-extensions";
dflet 0:400d8e75a8d0 63 char* WS_ORIGIN_NAME = NULL;
dflet 0:400d8e75a8d0 64
dflet 0:400d8e75a8d0 65 //WebSocket response line strings
dflet 0:400d8e75a8d0 66 char WS_WEBSOCKET[] = "websocket";
dflet 0:400d8e75a8d0 67 char WS_MAGIC_STRING[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
dflet 0:400d8e75a8d0 68 char WS_VERSION[] = "13";
dflet 0:400d8e75a8d0 69 char WS_ACCEPT[] = "Sec-websocket-accept";
dflet 0:400d8e75a8d0 70
dflet 0:400d8e75a8d0 71 ///Length of client generated key
dflet 0:400d8e75a8d0 72 #define WS_KEY_LENGTH 24
dflet 0:400d8e75a8d0 73 // The client generated key should be 16 bytes if base64 decoded
dflet 0:400d8e75a8d0 74 UINT8 WS_KEY[WS_KEY_LENGTH + 1];
dflet 0:400d8e75a8d0 75
dflet 0:400d8e75a8d0 76 /// @}
dflet 0:400d8e75a8d0 77 #endif //_HTTP_HEADERS_H_
dflet 0:400d8e75a8d0 78