TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.
Diff: utils/Led_config.h
- Revision:
- 0:400d8e75a8d0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/utils/Led_config.h Sun Sep 06 15:19:36 2015 +0000 @@ -0,0 +1,124 @@ + + +#ifndef __LED_CONFIG_H__ +#define __LED_CONFIG_H__ + +typedef enum +{ + NO_LED, + led3 = 0x1, /* RED LED D7/GP9/Pin64 */ + led4 = 0x2, /* ORANGE LED D6/GP10/Pin1 */ + led5 = 0x3 /* GREEN LED D5/GP11/Pin2 */ + +} ledEnum; + + +typedef enum +{ + NO_LED_IND = NO_LED, + MCU_SENDING_DATA_IND = 4, + MCU_ASSOCIATED_IND, /* Device associated to an AP */ + MCU_IP_ALLOC_IND, /* Device acquired an IP */ + MCU_SERVER_INIT_IND, /* Device connected to remote server */ + MCU_CLIENT_CONNECTED_IND, /* Any client connects to device */ + MCU_ON_IND, /* Device SLHost invoked successfully */ + MCU_EXECUTE_SUCCESS_IND, /* Task executed sucessfully */ + MCU_EXECUTE_FAIL_IND, /* Task execution failed */ + MCU_RED_LED_GPIO = led3, /* GP09 for LED RED as per LP 3.0 */ + MCU_ORANGE_LED_GPIO = led4,/* GP10 for LED ORANGE as per LP 3.0 */ + MCU_GREEN_LED_GPIO = led5, /* GP11 for LED GREEN as per LP 3.0 */ + MCU_ALL_LED_IND = 12 +} ledNames; + +//***************************************************************************** +// +//! Turn LED On +//! +//! \param ledNum is the LED Number +//! +//! \return none +//! +//! \brief Turns a specific LED Off +// +//***************************************************************************** +void GPIO_IF_LedOn(char ledNum); + +//***************************************************************************** +// +//! Turn LED Off +//! +//! \param ledNum is the LED Number +//! +//! \return none +//! +//! \brief Turns a specific LED Off +// +//***************************************************************************** +void GPIO_IF_LedOff(char ledNum); + +//***************************************************************************** +// +//! \brief This function returns LED current Status +//! +//! \param[in] ucGPIONum is the GPIO to which the LED is connected +//! MCU_GREEN_LED_GPIO\MCU_ORANGE_LED_GPIO\MCU_RED_LED_GPIO +//! +//! +//! \return 1: LED ON, 0: LED OFF +// +//***************************************************************************** +unsigned char GPIO_IF_LedStatus(unsigned char ucGPIONum); + +//***************************************************************************** +// +//! Toggle the Led state +//! +//! \param ledNum is the LED Number +//! +//! \return none +//! +//! \brief Toggles a board LED +// +//***************************************************************************** +void GPIO_IF_LedToggle(unsigned char ucLedNum); + +//**************************************************************************** +// +//! Set a value to the specified GPIO pin +//! +//! \param ucPin is the GPIO pin to be set (0:39) +//! \param uiGPIOPort is the GPIO port address +//! \param ucGPIOPin is the GPIO pin of the specified port +//! \param ucGPIOValue is the value to be set +//! +//! This function +//! 1. Sets a value to the specified GPIO pin +//! +//! \return None. +// +//**************************************************************************** +void GPIO_IF_Set(unsigned char ucPin, + unsigned int uiGPIOPort, + unsigned char ucGPIOPin, + unsigned char ucGPIOValue); + +//**************************************************************************** +// +//! Set a value to the specified GPIO pin +//! +//! \param ucPin is the GPIO pin to be set (0:39) +//! \param uiGPIOPort is the GPIO port address +//! \param ucGPIOPin is the GPIO pin of the specified port +//! +//! This function +//! 1. Gets a value of the specified GPIO pin +//! +//! \return value of the GPIO pin +// +//**************************************************************************** +unsigned char +GPIO_IF_Get(unsigned char ucPin, + unsigned int uiGPIOPort, + unsigned char ucGPIOPin); + +#endif \ No newline at end of file