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:
3:7643714ec664
Removed some debug.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:50cedd586816 1
dflet 0:50cedd586816 2
dflet 0:50cedd586816 3 #ifndef __LED_CONFIG_H__
dflet 0:50cedd586816 4 #define __LED_CONFIG_H__
dflet 0:50cedd586816 5
dflet 0:50cedd586816 6 typedef enum
dflet 0:50cedd586816 7 {
dflet 0:50cedd586816 8 NO_LED,
dflet 0:50cedd586816 9 led3 = 0x1, /* RED LED D7/GP9/Pin64 */
dflet 0:50cedd586816 10 led4 = 0x2, /* ORANGE LED D6/GP10/Pin1 */
dflet 3:7643714ec664 11 led5 = 0x3 /* GREEN LED D5/GP11/Pin2 */
dflet 0:50cedd586816 12
dflet 0:50cedd586816 13 } ledEnum;
dflet 0:50cedd586816 14
dflet 0:50cedd586816 15
dflet 0:50cedd586816 16 typedef enum
dflet 0:50cedd586816 17 {
dflet 0:50cedd586816 18 NO_LED_IND = NO_LED,
dflet 3:7643714ec664 19 MCU_SENDING_DATA_IND = 4,
dflet 0:50cedd586816 20 MCU_ASSOCIATED_IND, /* Device associated to an AP */
dflet 0:50cedd586816 21 MCU_IP_ALLOC_IND, /* Device acquired an IP */
dflet 0:50cedd586816 22 MCU_SERVER_INIT_IND, /* Device connected to remote server */
dflet 0:50cedd586816 23 MCU_CLIENT_CONNECTED_IND, /* Any client connects to device */
dflet 0:50cedd586816 24 MCU_ON_IND, /* Device SLHost invoked successfully */
dflet 0:50cedd586816 25 MCU_EXECUTE_SUCCESS_IND, /* Task executed sucessfully */
dflet 0:50cedd586816 26 MCU_EXECUTE_FAIL_IND, /* Task execution failed */
dflet 3:7643714ec664 27 MCU_RED_LED_GPIO = led3, /* GP09 for LED RED as per LP 3.0 */
dflet 3:7643714ec664 28 MCU_ORANGE_LED_GPIO = led4,/* GP10 for LED ORANGE as per LP 3.0 */
dflet 3:7643714ec664 29 MCU_GREEN_LED_GPIO = led5, /* GP11 for LED GREEN as per LP 3.0 */
dflet 3:7643714ec664 30 MCU_ALL_LED_IND = 12
dflet 0:50cedd586816 31 } ledNames;
dflet 0:50cedd586816 32
dflet 0:50cedd586816 33 //*****************************************************************************
dflet 0:50cedd586816 34 //
dflet 0:50cedd586816 35 //! Turn LED On
dflet 0:50cedd586816 36 //!
dflet 0:50cedd586816 37 //! \param ledNum is the LED Number
dflet 0:50cedd586816 38 //!
dflet 0:50cedd586816 39 //! \return none
dflet 0:50cedd586816 40 //!
dflet 0:50cedd586816 41 //! \brief Turns a specific LED Off
dflet 0:50cedd586816 42 //
dflet 0:50cedd586816 43 //*****************************************************************************
dflet 0:50cedd586816 44 void GPIO_IF_LedOn(char ledNum);
dflet 0:50cedd586816 45
dflet 0:50cedd586816 46 //*****************************************************************************
dflet 0:50cedd586816 47 //
dflet 0:50cedd586816 48 //! Turn LED Off
dflet 0:50cedd586816 49 //!
dflet 0:50cedd586816 50 //! \param ledNum is the LED Number
dflet 0:50cedd586816 51 //!
dflet 0:50cedd586816 52 //! \return none
dflet 0:50cedd586816 53 //!
dflet 0:50cedd586816 54 //! \brief Turns a specific LED Off
dflet 0:50cedd586816 55 //
dflet 0:50cedd586816 56 //*****************************************************************************
dflet 0:50cedd586816 57 void GPIO_IF_LedOff(char ledNum);
dflet 0:50cedd586816 58
dflet 0:50cedd586816 59 //*****************************************************************************
dflet 0:50cedd586816 60 //
dflet 0:50cedd586816 61 //! \brief This function returns LED current Status
dflet 0:50cedd586816 62 //!
dflet 0:50cedd586816 63 //! \param[in] ucGPIONum is the GPIO to which the LED is connected
dflet 0:50cedd586816 64 //! MCU_GREEN_LED_GPIO\MCU_ORANGE_LED_GPIO\MCU_RED_LED_GPIO
dflet 0:50cedd586816 65 //!
dflet 0:50cedd586816 66 //!
dflet 0:50cedd586816 67 //! \return 1: LED ON, 0: LED OFF
dflet 0:50cedd586816 68 //
dflet 0:50cedd586816 69 //*****************************************************************************
dflet 0:50cedd586816 70 unsigned char GPIO_IF_LedStatus(unsigned char ucGPIONum);
dflet 0:50cedd586816 71
dflet 0:50cedd586816 72 //*****************************************************************************
dflet 0:50cedd586816 73 //
dflet 0:50cedd586816 74 //! Toggle the Led state
dflet 0:50cedd586816 75 //!
dflet 0:50cedd586816 76 //! \param ledNum is the LED Number
dflet 0:50cedd586816 77 //!
dflet 0:50cedd586816 78 //! \return none
dflet 0:50cedd586816 79 //!
dflet 0:50cedd586816 80 //! \brief Toggles a board LED
dflet 0:50cedd586816 81 //
dflet 0:50cedd586816 82 //*****************************************************************************
dflet 0:50cedd586816 83 void GPIO_IF_LedToggle(unsigned char ucLedNum);
dflet 0:50cedd586816 84
dflet 0:50cedd586816 85 //****************************************************************************
dflet 0:50cedd586816 86 //
dflet 0:50cedd586816 87 //! Set a value to the specified GPIO pin
dflet 0:50cedd586816 88 //!
dflet 0:50cedd586816 89 //! \param ucPin is the GPIO pin to be set (0:39)
dflet 0:50cedd586816 90 //! \param uiGPIOPort is the GPIO port address
dflet 0:50cedd586816 91 //! \param ucGPIOPin is the GPIO pin of the specified port
dflet 0:50cedd586816 92 //! \param ucGPIOValue is the value to be set
dflet 0:50cedd586816 93 //!
dflet 0:50cedd586816 94 //! This function
dflet 0:50cedd586816 95 //! 1. Sets a value to the specified GPIO pin
dflet 0:50cedd586816 96 //!
dflet 0:50cedd586816 97 //! \return None.
dflet 0:50cedd586816 98 //
dflet 0:50cedd586816 99 //****************************************************************************
dflet 0:50cedd586816 100 void GPIO_IF_Set(unsigned char ucPin,
dflet 0:50cedd586816 101 unsigned int uiGPIOPort,
dflet 0:50cedd586816 102 unsigned char ucGPIOPin,
dflet 0:50cedd586816 103 unsigned char ucGPIOValue);
dflet 0:50cedd586816 104
dflet 0:50cedd586816 105 //****************************************************************************
dflet 0:50cedd586816 106 //
dflet 0:50cedd586816 107 //! Set a value to the specified GPIO pin
dflet 0:50cedd586816 108 //!
dflet 0:50cedd586816 109 //! \param ucPin is the GPIO pin to be set (0:39)
dflet 0:50cedd586816 110 //! \param uiGPIOPort is the GPIO port address
dflet 0:50cedd586816 111 //! \param ucGPIOPin is the GPIO pin of the specified port
dflet 0:50cedd586816 112 //!
dflet 0:50cedd586816 113 //! This function
dflet 0:50cedd586816 114 //! 1. Gets a value of the specified GPIO pin
dflet 0:50cedd586816 115 //!
dflet 0:50cedd586816 116 //! \return value of the GPIO pin
dflet 0:50cedd586816 117 //
dflet 0:50cedd586816 118 //****************************************************************************
dflet 0:50cedd586816 119 unsigned char
dflet 0:50cedd586816 120 GPIO_IF_Get(unsigned char ucPin,
dflet 0:50cedd586816 121 unsigned int uiGPIOPort,
dflet 0:50cedd586816 122 unsigned char ucGPIOPin);
dflet 0:50cedd586816 123
dflet 0:50cedd586816 124 #endif