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.
Led_config.h
00001 00002 00003 #ifndef __LED_CONFIG_H__ 00004 #define __LED_CONFIG_H__ 00005 00006 typedef enum 00007 { 00008 NO_LED, 00009 led3 = 0x1, /* RED LED D7/GP9/Pin64 */ 00010 led4 = 0x2, /* ORANGE LED D6/GP10/Pin1 */ 00011 led5 = 0x3 /* GREEN LED D5/GP11/Pin2 */ 00012 00013 } ledEnum; 00014 00015 00016 typedef enum 00017 { 00018 NO_LED_IND = NO_LED, 00019 MCU_SENDING_DATA_IND = 4, 00020 MCU_ASSOCIATED_IND, /* Device associated to an AP */ 00021 MCU_IP_ALLOC_IND, /* Device acquired an IP */ 00022 MCU_SERVER_INIT_IND, /* Device connected to remote server */ 00023 MCU_CLIENT_CONNECTED_IND, /* Any client connects to device */ 00024 MCU_ON_IND, /* Device SLHost invoked successfully */ 00025 MCU_EXECUTE_SUCCESS_IND, /* Task executed sucessfully */ 00026 MCU_EXECUTE_FAIL_IND, /* Task execution failed */ 00027 MCU_RED_LED_GPIO = led3, /* GP09 for LED RED as per LP 3.0 */ 00028 MCU_ORANGE_LED_GPIO = led4,/* GP10 for LED ORANGE as per LP 3.0 */ 00029 MCU_GREEN_LED_GPIO = led5, /* GP11 for LED GREEN as per LP 3.0 */ 00030 MCU_ALL_LED_IND = 12 00031 } ledNames; 00032 00033 //***************************************************************************** 00034 // 00035 //! Turn LED On 00036 //! 00037 //! \param ledNum is the LED Number 00038 //! 00039 //! \return none 00040 //! 00041 //! \brief Turns a specific LED Off 00042 // 00043 //***************************************************************************** 00044 void GPIO_IF_LedOn(char ledNum); 00045 00046 //***************************************************************************** 00047 // 00048 //! Turn LED Off 00049 //! 00050 //! \param ledNum is the LED Number 00051 //! 00052 //! \return none 00053 //! 00054 //! \brief Turns a specific LED Off 00055 // 00056 //***************************************************************************** 00057 void GPIO_IF_LedOff(char ledNum); 00058 00059 //***************************************************************************** 00060 // 00061 //! \brief This function returns LED current Status 00062 //! 00063 //! \param[in] ucGPIONum is the GPIO to which the LED is connected 00064 //! MCU_GREEN_LED_GPIO\MCU_ORANGE_LED_GPIO\MCU_RED_LED_GPIO 00065 //! 00066 //! 00067 //! \return 1: LED ON, 0: LED OFF 00068 // 00069 //***************************************************************************** 00070 unsigned char GPIO_IF_LedStatus(unsigned char ucGPIONum); 00071 00072 //***************************************************************************** 00073 // 00074 //! Toggle the Led state 00075 //! 00076 //! \param ledNum is the LED Number 00077 //! 00078 //! \return none 00079 //! 00080 //! \brief Toggles a board LED 00081 // 00082 //***************************************************************************** 00083 void GPIO_IF_LedToggle(unsigned char ucLedNum); 00084 00085 //**************************************************************************** 00086 // 00087 //! Set a value to the specified GPIO pin 00088 //! 00089 //! \param ucPin is the GPIO pin to be set (0:39) 00090 //! \param uiGPIOPort is the GPIO port address 00091 //! \param ucGPIOPin is the GPIO pin of the specified port 00092 //! \param ucGPIOValue is the value to be set 00093 //! 00094 //! This function 00095 //! 1. Sets a value to the specified GPIO pin 00096 //! 00097 //! \return None. 00098 // 00099 //**************************************************************************** 00100 void GPIO_IF_Set(unsigned char ucPin, 00101 unsigned int uiGPIOPort, 00102 unsigned char ucGPIOPin, 00103 unsigned char ucGPIOValue); 00104 00105 //**************************************************************************** 00106 // 00107 //! Set a value to the specified GPIO pin 00108 //! 00109 //! \param ucPin is the GPIO pin to be set (0:39) 00110 //! \param uiGPIOPort is the GPIO port address 00111 //! \param ucGPIOPin is the GPIO pin of the specified port 00112 //! 00113 //! This function 00114 //! 1. Gets a value of the specified GPIO pin 00115 //! 00116 //! \return value of the GPIO pin 00117 // 00118 //**************************************************************************** 00119 unsigned char 00120 GPIO_IF_Get(unsigned char ucPin, 00121 unsigned int uiGPIOPort, 00122 unsigned char ucGPIOPin); 00123 00124 #endif
Generated on Tue Jul 12 2022 22:22:38 by 1.7.2