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.
Diff: camera_app/camera_app.cpp
- Revision:
- 3:7643714ec664
- Parent:
- 2:b92db44a29b4
- Child:
- 4:c27adffcfec2
--- a/camera_app/camera_app.cpp Fri Jun 26 16:49:04 2015 +0000 +++ b/camera_app/camera_app.cpp Fri Jun 26 22:53:54 2015 +0000 @@ -54,6 +54,7 @@ #include "mt9d111.h" #include "i2cconfig.h" #include "cli_uart.h" +#include "Led_config.h" using namespace mbed_cc3100; @@ -358,15 +359,20 @@ // Perform Image Capture // Uart_Write((uint8_t*)"CaptureImage Start\n\r"); + + HAL_NVIC_EnableIRQ(DMA2_Stream1_IRQn); + HAL_NVIC_EnableIRQ(DCMI_IRQn); HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, (uint32_t)p_buffer, sizeof(g_image.g_image_buffer)); /* Wait for frame */ while ((DCMI->CR & DCMI_CR_CAPTURE) != 0) { - + GPIO_IF_LedToggle(MCU_RED_LED_GPIO); } + HAL_NVIC_DisableIRQ(DCMI_IRQn); + HAL_NVIC_DisableIRQ(DMA2_Stream1_IRQn); g_frame_end = 1; - Uart_Write((uint8_t*)"CaptureImage Complete\n\r"); + Uart_Write((uint8_t*)"\n\rCaptureImage Complete\n\r"); /* The frame is finished, but DMA still waiting for data because we set max frame size so we need to abort the DMA transfer here */