Web Camera for mbed-os. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE
Dependencies: HttpServer_snapshot_mbed-os LWIPBP3595Interface_STA_for_mbed-os RomRamBlockDevice mbed-rpc
Fork of GR-Boards_WebCamera by
このサンプルは 「GR-LYCHEE」ではじめる電子工作 で紹介しています。
出版時と内容が異ならないよう、各ライブラリはアップデートせずに使用してください。
このサンプルの最新バージョンは下記から入手できます。最新バージョンは本の内容と一部処理が異なります。
https://github.com/d-kato/GR-Boards_WebCamera
Diff: main.cpp
- Revision:
- 18:0461a79ced71
- Parent:
- 17:2648bcf3f2cc
- Child:
- 21:c7de71ccb5ca
--- a/main.cpp Fri Oct 28 06:33:08 2016 +0000 +++ b/main.cpp Thu Nov 10 03:15:42 2016 +0000 @@ -79,7 +79,9 @@ static uint8_t FrameBuffer_Video[VIDEO_BUFFER_STRIDE * VIDEO_BUFFER_HEIGHT]__attribute((section("NC_BSS"),aligned(16))); //16 bytes aligned!; #endif static volatile int32_t vsync_count = 0; +#if VIDEO_INPUT_METHOD == VIDEO_CVBS static volatile int32_t vfield_count = 1; +#endif #if defined(__ICCARM__) #pragma data_alignment=8 static uint8_t JpegBuffer[2][1024 * 50]@ ".mirrorram"; //8 bytes aligned!; @@ -104,11 +106,14 @@ static void IntCallbackFunc_Vfield(DisplayBase::int_type_t int_type) { //Interrupt callback function +#if VIDEO_INPUT_METHOD == VIDEO_CVBS if (vfield_count != 0) { vfield_count = 0; } else { vfield_count = 1; - +#else + { +#endif JPEG_Converter::bitmap_buff_info_t bitmap_buff_info; JPEG_Converter::encode_options_t encode_options; @@ -502,7 +507,6 @@ return -1; } #endif - #if (NETWORK_TYPE == 1) #if (SCAN_NETWORK == 1) scan_network(); @@ -510,13 +514,11 @@ network.set_credentials(WLAN_SSID, WLAN_PSK, WLAN_SECURITY); #endif #endif - if (network.connect() != 0) { printf("Network Connect Error \r\n"); return -1; } - - printf("MbsAC Address is %s\r\n", network.get_mac_address()); + printf("MAC Address is %s\r\n", network.get_mac_address()); printf("IP Address is %s\r\n", network.get_ip_address()); printf("NetMask is %s\r\n", network.get_netmask()); printf("Gateway Address is %s\r\n", network.get_gateway());