├── test ├── lib │ └── gtest-1.7.0 │ │ ├── build-aux │ │ └── .keep │ │ ├── .gitignore │ │ ├── xcode │ │ ├── Config │ │ │ ├── TestTarget.xcconfig │ │ │ ├── FrameworkTarget.xcconfig │ │ │ ├── StaticLibraryTarget.xcconfig │ │ │ ├── DebugProject.xcconfig │ │ │ ├── ReleaseProject.xcconfig │ │ │ └── General.xcconfig │ │ ├── Samples │ │ │ └── FrameworkSample │ │ │ │ ├── Info.plist │ │ │ │ ├── widget.h │ │ │ │ ├── widget.cc │ │ │ │ ├── runtests.sh │ │ │ │ └── widget_test.cc │ │ ├── Resources │ │ │ └── Info.plist │ │ └── Scripts │ │ │ └── runtests.sh │ │ ├── docs │ │ ├── V1_5_Documentation.md │ │ ├── Documentation.md │ │ ├── V1_6_Documentation.md │ │ ├── V1_7_Documentation.md │ │ ├── Samples.md │ │ ├── V1_6_Samples.md │ │ └── V1_7_Samples.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── test │ │ ├── production.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_uninitialized_test_.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest_help_test_.cc │ │ ├── production.h │ │ ├── gtest_all_test.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest-param-test_test.h │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest_uninitialized_test.py │ │ ├── gtest-param-test2_test.cc │ │ ├── gtest_color_test_.cc │ │ └── gtest_throw_on_failure_test_.cc │ │ ├── src │ │ ├── gtest_main.cc │ │ └── gtest-all.cc │ │ ├── codegear │ │ ├── gtest_all.cc │ │ ├── gtest_link.cc │ │ └── gtest.groupproj │ │ ├── scripts │ │ ├── test │ │ │ └── Makefile │ │ ├── upload_gtest.py │ │ └── common.py │ │ ├── samples │ │ ├── sample4_unittest.cc │ │ ├── sample1.h │ │ ├── sample4.cc │ │ ├── sample4.h │ │ ├── sample2.cc │ │ ├── sample1.cc │ │ └── sample2.h │ │ ├── include │ │ └── gtest │ │ │ ├── internal │ │ │ └── custom │ │ │ │ ├── gtest.h │ │ │ │ ├── gtest-printers.h │ │ │ │ └── gtest-port.h │ │ │ └── gtest_prod.h │ │ ├── msvc │ │ ├── gtest.sln │ │ └── gtest-md.sln │ │ ├── configure.ac │ │ └── make │ │ └── Makefile ├── fake │ ├── Arduino.cpp │ ├── OV7670Simulator.cpp │ ├── Wire.h │ ├── Arduino.h │ ├── Wire.cpp │ └── OV7670Simulator.h └── src │ └── camera │ └── base │ ├── TestCameraOV7670.cpp │ └── TestCameraOV7670Registers.cpp ├── LiveOV7670.png ├── pcb ├── livecam │ ├── gerber │ │ ├── livecam-NPTH.drl │ │ ├── livecam-Edge_Cuts.gm1 │ │ └── livecam-PTH.drl │ ├── LibMod │ │ └── Indrek │ │ │ ├── DcDcConverter.dcm │ │ │ ├── tft_1.8inch.dcm │ │ │ ├── DcDcConverter.lib │ │ │ ├── tft_1.8inch.lib │ │ │ ├── camera_ov7670.lib │ │ │ └── DcDc5VUp.pretty │ │ │ └── DcDc5VUp.kicad_mod │ ├── LiveCam_1_0_gerber.zip │ ├── fp-lib-table │ └── sym-lib-table └── kaamera_ja_ekraan │ ├── LibMod │ ├── Indrek │ │ ├── camera_ov7670.bck │ │ ├── camera_ov7670.dcm │ │ ├── tft_1.8inch.bck │ │ ├── tft_1.8inch.dcm │ │ ├── levelshifter_4ch.bck │ │ ├── levelshifter_4ch.dcm │ │ ├── tft_1.8inch.bak │ │ ├── tft_1.8inch.lib │ │ ├── levelshifter_4ch.bak │ │ ├── levelshifter_4ch.lib │ │ ├── camera_ov7670.bak │ │ ├── camera_ov7670.lib │ │ └── LevelShifter_4ch.pretty │ │ │ └── LevelShifter_2x6_10.16mm.kicad_mod │ └── YJ_arduino │ │ └── arduino.lib │ ├── kaamera_ja_ekraan-cache.dcm │ ├── fp-lib-table │ ├── gerber │ ├── kaamera_ja_ekraan-Edge.Cuts.gm1 │ ├── kaamera_ja_ekraan.drl │ ├── kaamera_ja_ekraan-F.SilkS.gto │ ├── kaamera_ja_ekraan-F.Mask.gts │ └── kaamera_ja_ekraan-B.Mask.gbs │ ├── kaamera_ja_ekraan-rescue.lib │ └── kaamera_ja_ekraan.pro ├── doc ├── components │ ├── IMG_0485.jpg │ ├── IMG_0488.jpg │ └── IMG_0489.jpg ├── laser_test │ ├── IMG_1658.jpg │ ├── IMG_1659.jpg │ ├── IMG_1660.jpg │ ├── IMG_1666.jpg │ ├── IMG_1667.jpg │ └── IMG_1668.jpg └── low_light_examples │ ├── IMG_0248.JPG │ ├── IMG_0249.JPG │ └── IMG_0252.JPG ├── .gitignore ├── src ├── lib │ ├── LiveOV7670Library │ │ ├── readme.txt │ │ ├── CameraOV7670RegistersBayerRGB.cpp │ │ ├── CameraOV7670RegistersYUV422.cpp │ │ ├── CameraOV7670RegistersRGB565.cpp │ │ ├── CameraOV7670RegistersVGA.cpp │ │ ├── BufferedCameraOV7670_QQVGA_10hz_Grayscale.h │ │ ├── CameraOV7670RegistersQQVGA.cpp │ │ ├── CameraOV7670RegistersQVGA.cpp │ │ ├── BufferedCameraOV7670_80x120_10hz_Grayscale.h │ │ ├── CameraOV7670Registers.h │ │ ├── BufferedCameraOV7670_QQVGA.h │ │ ├── BufferedCameraOV7670_QVGA.h │ │ └── CameraOV7670.cpp │ ├── Adafruit_GFX_Library │ │ ├── library.properties │ │ ├── library.json │ │ ├── .library.json │ │ ├── gfxfont.h │ │ ├── license.txt │ │ └── README.md │ └── readme.txt ├── LiveOV7670 │ ├── LiveOV7670.ino │ └── setup.h └── platformio.ini ├── PlatformIO_CLion_init.txt ├── CMakeLists.txt └── README.md /test/lib/gtest-1.7.0/build-aux/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/.gitignore: -------------------------------------------------------------------------------- 1 | # python 2 | *.pyc 3 | -------------------------------------------------------------------------------- /LiveOV7670.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/LiveOV7670.png -------------------------------------------------------------------------------- /pcb/livecam/gerber/livecam-NPTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,TZ 3 | % 4 | G90 5 | G05 6 | T0 7 | M30 8 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/DcDcConverter.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/tft_1.8inch.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/camera_ov7670.bck: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/camera_ov7670.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/tft_1.8inch.bck: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/tft_1.8inch.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/kaamera_ja_ekraan-cache.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /doc/components/IMG_0485.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/components/IMG_0485.jpg -------------------------------------------------------------------------------- /doc/components/IMG_0488.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/components/IMG_0488.jpg -------------------------------------------------------------------------------- /doc/components/IMG_0489.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/components/IMG_0489.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1658.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1658.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1659.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1659.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1660.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1660.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1666.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1666.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1667.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1667.jpg -------------------------------------------------------------------------------- /doc/laser_test/IMG_1668.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/laser_test/IMG_1668.jpg -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/levelshifter_4ch.bck: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/levelshifter_4ch.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /doc/low_light_examples/IMG_0248.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/low_light_examples/IMG_0248.JPG -------------------------------------------------------------------------------- /doc/low_light_examples/IMG_0249.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/low_light_examples/IMG_0249.JPG -------------------------------------------------------------------------------- /doc/low_light_examples/IMG_0252.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/doc/low_light_examples/IMG_0252.JPG -------------------------------------------------------------------------------- /pcb/livecam/LiveCam_1_0_gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shivasiddharth/LiveOV7670/master/pcb/livecam/LiveCam_1_0_gerber.zip -------------------------------------------------------------------------------- /pcb/livecam/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name DcDc5VUp)(type KiCad)(uri ${KIPRJMOD}/LibMod/Indrek/DcDc5VUp.pretty)(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | # ignore files generated by "platformio init" 4 | src/.idea 5 | src/.pioenvs 6 | src/.gitignore 7 | src/.travis.yml 8 | src/CMakeLists.txt 9 | src/CMakeListsPrivate.txt 10 | /cmake-build-debug/ 11 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name arduino)(type Legacy)(uri "$(KIPRJMOD)\\LibMod\\YJ_arduino\\arduino.mod")(options "")(descr "")) 3 | (lib (name LevelShifter_4ch)(type KiCad)(uri "$(KIPRJMOD)\\LibMod\\Indrek\\LevelShifter_4ch.pretty")(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/TestTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TestTarget.xcconfig 3 | // 4 | // These are Test target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | 7 | PRODUCT_NAME = $(TARGET_NAME) 8 | HEADER_SEARCH_PATHS = ../include 9 | -------------------------------------------------------------------------------- /test/fake/Arduino.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 29.10.2016. 3 | // 4 | 5 | 6 | #include "Arduino.h" 7 | 8 | 9 | 10 | uint8_t dummy; 11 | 12 | 13 | void pinMode(int, int) { 14 | 15 | } 16 | 17 | 18 | void delay(int) { 19 | 20 | } 21 | 22 | 23 | uint8_t pgm_read_byte(const uint8_t * pByte) { 24 | return *pByte; 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /pcb/livecam/sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (lib (name camera_ov7670)(type Legacy)(uri ${KIPRJMOD}/LibMod/Indrek/camera_ov7670.lib)(options "")(descr "")) 3 | (lib (name tft_1.8inch)(type Legacy)(uri ${KIPRJMOD}/LibMod/Indrek/tft_1.8inch.lib)(options "")(descr "")) 4 | (lib (name DcDcConverter)(type Legacy)(uri ${KIPRJMOD}/LibMod/Indrek/DcDcConverter.lib)(options "")(descr "")) 5 | ) 6 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | OV7670 PIN connections: 3 | 4 | VSYNC - PIN2 5 | XCLCK - PIN3 (must be level shifted from 5V -> 3.3V) 6 | PCLCK - PIN12 7 | SIOD - A4 (I2C data) - 10K resistor to 3.3V 8 | SIOC - A5 (I2C clock) - 10K resistor to 3.3V 9 | D0..D3 - A0..A3 (pixel data bits 0..3) 10 | D4..D7 - PIN4..PIN7 (pixel data bits 4..7) 11 | 3.3V - 3.3V 12 | RESET - 3.3V 13 | GND - GND 14 | PWDN - GND 15 | -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit GFX Library 2 | version=1.1.5 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from. 6 | paragraph=Install this library in addition to the display library for your hardware. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit-GFX-Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Adafruit-GFX", 3 | "keywords": "display, tft, graphics", 4 | "description": "A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/adafruit/Adafruit-GFX-Library.git" 9 | }, 10 | "exclude": "fontconvert", 11 | "frameworks": "arduino", 12 | "platforms": "atmelavr" 13 | } 14 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/DcDcConverter.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # DcDcConverter 5 | # 6 | DEF DcDcConverter DCDC 0 40 Y Y 1 F N 7 | F0 "DCDC" 0 -300 60 H V C CNN 8 | F1 "DcDcConverter" 0 300 60 H V C CNN 9 | F2 "" 0 0 60 H V C CNN 10 | F3 "" 0 0 60 H V C CNN 11 | DRAW 12 | S -250 200 250 -200 0 1 0 N 13 | X IN+ 1 -450 100 200 R 50 50 1 1 I 14 | X IN- 2 -450 -100 200 R 50 50 1 1 I 15 | X OUT+ 3 450 100 200 L 50 50 1 1 P 16 | X OUT- 4 450 -100 200 L 50 50 1 1 P 17 | ENDDRAW 18 | ENDDEF 19 | # 20 | #End Library 21 | -------------------------------------------------------------------------------- /test/fake/OV7670Simulator.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.10.2016. 3 | // 4 | 5 | #include "OV7670Simulator.h" 6 | 7 | 8 | 9 | 10 | OV7670Simulator ov7670Simulator; 11 | 12 | 13 | 14 | 15 | bool OV7670Simulator::isVsync() { 16 | return isVsyncCallback ? isVsyncCallback() : true; 17 | } 18 | 19 | bool OV7670Simulator::isPixelClock() { 20 | return isPixelClockCallback ? isPixelClockCallback() : true; 21 | } 22 | 23 | uint8_t OV7670Simulator::getPixelByte() { 24 | return getPixelCallback ? getPixelCallback() : (uint8_t)0; 25 | } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /PlatformIO_CLion_init.txt: -------------------------------------------------------------------------------- 1 | 2 | Init CLion project with PlatformIO: 3 | 4 | 5 | 1. Install PlatformIO command line tools: 6 | http://docs.platformio.org/en/stable/installation.html 7 | 8 | Install PlatformIO with Python package manager: 9 | sudo pip install -U platformio 10 | 11 | 12 | 2. cd to project root 13 | 14 | 15 | 3. run 16 | platformio init -d src --ide clion 17 | 18 | 19 | 4. "arduino/.idea" folder generated by "platformio init" can be deleted. 20 | CLion will create its own project file in the root directory 21 | 22 | 23 | 5. "File"->"Reload CMake Project" 24 | -------------------------------------------------------------------------------- /src/LiveOV7670/LiveOV7670.ino: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | // change setup.h to switch between buffered and pixel-by-pixel processing 7 | #include "setup.h" 8 | 9 | 10 | 11 | void setup() { 12 | // This is not necessary and has no effect for ATMEGA based Arduinos. 13 | // WAVGAT Nano has slower clock rate by default. We want to reset it to maximum speed 14 | CLKPR = 0x80; // enter clock rate change mode 15 | CLKPR = 0; // set prescaler to 0. WAVGAT MCU has it 3 by default. 16 | 17 | initializeScreenAndCamera(); 18 | } 19 | 20 | 21 | void loop() { 22 | processFrame(); 23 | } 24 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersBayerRGB.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | 5 | #include "CameraOV7670Registers.h" 6 | 7 | 8 | /* 9 | * https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno/blob/master/ov7670.c 10 | */ 11 | const PROGMEM RegisterData CameraOV7670Registers::regsBayerRGB [] = { 12 | {REG_COM7, COM7_BAYER}, 13 | {REG_COM13, 0x08}, /* No gamma, magic rsvd bit */ 14 | {REG_COM16, 0x3d}, /* Edge enhancement, denoise */ 15 | {REG_REG76, 0xe1}, /* Pix correction, magic rsvd */ 16 | {0xff, 0xff}, /* END MARKER */ 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/gerber/kaamera_ja_ekraan-Edge.Cuts.gm1: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Profile,NP* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.2-stable) date 21.04.2016 21:16:34* 5 | %MOMM*% 6 | G01* 7 | G04 APERTURE LIST* 8 | %ADD10C,0.100000*% 9 | G04 APERTURE END LIST* 10 | D10* 11 | X119126000Y-116078000D02* 12 | X119126000Y-78232000D01* 13 | X162560000Y-116078000D02* 14 | X119126000Y-116078000D01* 15 | X162560000Y-78232000D02* 16 | X162560000Y-116078000D01* 17 | X119126000Y-78232000D02* 18 | X162560000Y-78232000D01* 19 | M02* 20 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/FrameworkTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // FrameworkTarget.xcconfig 3 | // 4 | // These are Framework target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Dynamic libs need to be position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Dynamic libs should not have their external symbols stripped. 14 | STRIP_STYLE = non-global 15 | 16 | // Let the user install by specifying the $DSTROOT with xcodebuild 17 | SKIP_INSTALL = NO 18 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/tft_1.8inch.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # TFT_1.8inch 5 | # 6 | DEF TFT_1.8inch TFT 0 40 Y Y 1 F N 7 | F0 "TFT" 500 -400 60 H V C CNN 8 | F1 "TFT_1.8inch" 450 450 60 V V C CNN 9 | F2 "" 50 -100 60 H V C CNN 10 | F3 "" 50 -100 60 H V C CNN 11 | DRAW 12 | S -350 700 350 -450 0 1 0 N 13 | X RST 1 -550 0 200 R 50 50 1 1 I 14 | X CS 2 -550 150 200 R 50 50 1 1 I 15 | X D/C 3 -550 300 200 R 50 50 1 1 I 16 | X SPI_DATA 4 -550 -150 200 R 50 50 1 1 I 17 | X SPI_CLK 5 -550 -300 200 R 50 50 1 1 I C 18 | X 3.3V 6 50 900 200 D 50 50 1 1 W 19 | X LED_3.3V 7 250 900 200 D 50 50 1 1 W 20 | X GND 8 150 -650 200 U 50 50 1 1 W 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/StaticLibraryTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // StaticLibraryTarget.xcconfig 3 | // 4 | // These are static library target settings for libgtest.a. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Static libs can be included in bundles so make them position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Static libs should not have their internal globals or external symbols 14 | // stripped. 15 | STRIP_STYLE = debugging 16 | 17 | // Let the user install by specifying the $DSTROOT with xcodebuild 18 | SKIP_INSTALL = NO 19 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/tft_1.8inch.bak: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # TFT_1.8inch 5 | # 6 | DEF TFT_1.8inch TFT 0 40 Y Y 1 F N 7 | F0 "TFT" 500 -400 60 H V C CNN 8 | F1 "TFT_1.8inch" 650 -250 60 H V C CNN 9 | F2 "" 50 500 60 H V C CNN 10 | F3 "" 50 500 60 H V C CNN 11 | DRAW 12 | S -350 700 350 -450 0 1 0 N 13 | X RST 1 -550 0 200 R 50 50 1 1 I 14 | X CS 2 -550 -150 200 R 50 50 1 1 I 15 | X D/C 3 -550 -300 200 R 50 50 1 1 I 16 | X SPI_DATA 4 -550 150 200 R 50 50 1 1 I 17 | X SPI_CLK 5 -550 300 200 R 50 50 1 1 I C 18 | X 3.3V 6 50 900 200 D 50 50 1 1 W 19 | X LED_3.3V 7 250 900 200 D 50 50 1 1 W 20 | X GND 8 150 -650 200 U 50 50 1 1 W 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/tft_1.8inch.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # TFT_1.8inch 5 | # 6 | DEF TFT_1.8inch TFT 0 40 Y Y 1 F N 7 | F0 "TFT" 500 -400 60 H V C CNN 8 | F1 "TFT_1.8inch" 450 450 60 V V C CNN 9 | F2 "" 50 500 60 H V C CNN 10 | F3 "" 50 500 60 H V C CNN 11 | DRAW 12 | S -350 700 350 -450 0 1 0 N 13 | X RST 1 -550 0 200 R 50 50 1 1 I 14 | X CS 2 -550 -150 200 R 50 50 1 1 I 15 | X D/C 3 -550 -300 200 R 50 50 1 1 I 16 | X SPI_DATA 4 -550 150 200 R 50 50 1 1 I 17 | X SPI_CLK 5 -550 300 200 R 50 50 1 1 I C 18 | X 3.3V 6 50 900 200 D 50 50 1 1 W 19 | X LED_3.3V 7 250 900 200 D 50 50 1 1 W 20 | X GND 8 150 -650 200 U 50 50 1 1 W 21 | ENDDRAW 22 | ENDDEF 23 | # 24 | #End Library 25 | -------------------------------------------------------------------------------- /src/platformio.ini: -------------------------------------------------------------------------------- 1 | # 2 | # Project Configuration File 3 | # 4 | # A detailed documentation with the EXAMPLES is located here: 5 | # http://docs.platformio.org/en/latest/projectconf.html 6 | # 7 | 8 | # A sign `#` at the beginning of the line indicates a comment 9 | # Comment lines are ignored. 10 | 11 | # Simple and base environment 12 | # [env:mybaseenv] 13 | # platform = %INSTALLED_PLATFORM_NAME_HERE% 14 | # framework = 15 | # board = 16 | # 17 | # Automatic targets - enable auto-uploading 18 | # targets = upload 19 | 20 | [platformio] 21 | src_dir = LiveOV7670 22 | 23 | [env:nanoatmega328] 24 | #[env:megaatmega2560] 25 | platform = atmelavr 26 | framework = arduino 27 | board = nanoatmega328 28 | #board = megaatmega2560 29 | 30 | -------------------------------------------------------------------------------- /test/fake/Wire.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 29.10.2016. 3 | // 4 | 5 | #ifndef LIVEOV7670_WIRE_H 6 | #define LIVEOV7670_WIRE_H 7 | 8 | 9 | #include "Arduino.h" 10 | #include 11 | #include 12 | 13 | 14 | class FakeWire { 15 | 16 | 17 | private: 18 | std::vector transmittedBytes; 19 | std::deque bytesToRead; 20 | 21 | 22 | public: 23 | void begin(); 24 | void beginTransmission(int); 25 | void write(uint8_t byte); 26 | int endTransmission(); 27 | void requestFrom(int, int); 28 | uint8_t read(); 29 | 30 | const std::vector & getTransmittedBytes(); 31 | void addBytesToRead(uint8_t byte); 32 | 33 | 34 | }; 35 | 36 | extern FakeWire Wire; 37 | 38 | 39 | #endif //LIVEOV7670_WIRE_H 40 | 41 | 42 | -------------------------------------------------------------------------------- /pcb/livecam/gerber/livecam-Edge_Cuts.gm1: -------------------------------------------------------------------------------- 1 | G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,(5.1.5)-3* 2 | G04 #@! TF.CreationDate,2020-04-26T13:57:47+03:00* 3 | G04 #@! TF.ProjectId,livecam,6c697665-6361-46d2-9e6b-696361645f70,rev?* 4 | G04 #@! TF.SameCoordinates,Original* 5 | G04 #@! TF.FileFunction,Profile,NP* 6 | %FSLAX46Y46*% 7 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 8 | G04 Created by KiCad (PCBNEW (5.1.5)-3) date 2020-04-26 13:57:47* 9 | %MOMM*% 10 | %LPD*% 11 | G04 APERTURE LIST* 12 | %ADD10C,0.050000*% 13 | G04 APERTURE END LIST* 14 | D10* 15 | X128670000Y-82980000D02* 16 | X128680000Y-40590000D01* 17 | X173210000Y-83000000D02* 18 | X128670000Y-82980000D01* 19 | X173210000Y-40610000D02* 20 | X173210000Y-83000000D01* 21 | X128680000Y-40590000D02* 22 | X173210000Y-40610000D01* 23 | M02* 24 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/levelshifter_4ch.bak: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # LevelShifter_4ch 5 | # 6 | DEF LevelShifter_4ch LVL 0 40 Y Y 1 F N 7 | F0 "LVL" 500 -400 60 H V C CNN 8 | F1 "LevelShifter_4ch" 0 400 60 H V C CNN 9 | F2 "" 50 150 60 H V C CNN 10 | F3 "" 50 150 60 H V C CNN 11 | DRAW 12 | S -350 350 350 -450 0 1 0 N 13 | X 3.3V ~ 550 300 200 L 50 50 1 1 W 14 | X 5V ~ -550 300 200 R 50 50 1 1 W 15 | X GND ~ 0 -650 200 U 50 50 1 1 W 16 | X HV1 ~ -550 150 200 R 50 50 1 1 B 17 | X HV2 ~ -550 50 200 R 50 50 1 1 B 18 | X HV3 ~ -550 -50 200 R 50 50 1 1 B 19 | X HV4 ~ -550 -150 200 R 50 50 1 1 B 20 | X LV1 ~ 550 150 200 L 50 50 1 1 B 21 | X LV2 ~ 550 50 200 L 50 50 1 1 B 22 | X LV3 ~ 550 -50 200 L 50 50 1 1 B 23 | X LV4 ~ 550 -150 200 L 50 50 1 1 B 24 | ENDDRAW 25 | ENDDEF 26 | # 27 | #End Library 28 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/V1_5_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all official documentation wiki pages for Google Test **1.5.0** -- **if you use a different version of Google Test, make sure to read the documentation for that version instead.** 2 | 3 | * [Primer](V1_5_Primer.md) -- start here if you are new to Google Test. 4 | * [Samples](Samples.md) -- learn from examples. 5 | * [AdvancedGuide](V1_5_AdvancedGuide.md) -- learn more about Google Test. 6 | * [XcodeGuide](V1_5_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 7 | * [Frequently-Asked Questions](V1_5_FAQ.md) -- check here before asking a question on the mailing list. 8 | 9 | To contribute code to Google Test, read: 10 | 11 | * DevGuide -- read this _before_ writing your first patch. 12 | * [PumpManual](V1_5_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **(the SVN trunk version)** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](Samples.md) -- learn from examples. 7 | * [AdvancedGuide](AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/V1_6_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **1.6** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](V1_6_Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](V1_6_Samples.md) -- learn from examples. 7 | * [AdvancedGuide](V1_6_AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](V1_6_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](V1_6_FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](V1_6_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/levelshifter_4ch.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # LevelShifter_4ch 5 | # 6 | DEF LevelShifter_4ch LVL 0 40 Y Y 1 F N 7 | F0 "LVL" 0 -400 60 H V C CNN 8 | F1 "LevelShifter_4ch" 0 400 60 H V C CNN 9 | F2 "" 50 150 60 H V C CNN 10 | F3 "" 50 150 60 H V C CNN 11 | DRAW 12 | S -350 350 350 -350 0 1 0 N 13 | X HV4 1 -550 -150 200 R 50 50 1 1 B 14 | X HV3 2 -550 -50 200 R 50 50 1 1 B 15 | X GND 3 -550 -300 200 R 50 50 1 1 W 16 | X 5V 4 -550 300 200 R 50 50 1 1 W 17 | X HV2 5 -550 50 200 R 50 50 1 1 B 18 | X HV1 6 -550 150 200 R 50 50 1 1 B 19 | X LV1 7 550 150 200 L 50 50 1 1 B 20 | X LV2 8 550 50 200 L 50 50 1 1 B 21 | X 3.3V 9 550 300 200 L 50 50 1 1 W 22 | X GND 10 550 -300 200 L 50 50 1 1 W 23 | X LV3 11 550 -50 200 L 50 50 1 1 B 24 | X LV4 12 550 -150 200 L 50 50 1 1 B 25 | ENDDRAW 26 | ENDDEF 27 | # 28 | #End Library 29 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/V1_7_Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation wiki pages for Google Test **(the SVN trunk version)** 2 | -- **if you use a released version of Google Test, please read the 3 | documentation for that specific version instead.** 4 | 5 | * [Primer](V1_7_Primer.md) -- start here if you are new to Google Test. 6 | * [Samples](V1_7_Samples.md) -- learn from examples. 7 | * [AdvancedGuide](V1_7_AdvancedGuide.md) -- learn more about Google Test. 8 | * [XcodeGuide](V1_7_XcodeGuide.md) -- how to use Google Test in Xcode on Mac. 9 | * [Frequently-Asked Questions](V1_7_FAQ.md) -- check here before asking a question on the mailing list. 10 | 11 | To contribute code to Google Test, read: 12 | 13 | * [DevGuide](DevGuide.md) -- read this _before_ writing your first patch. 14 | * [PumpManual](V1_7_PumpManual.md) -- how we generate some of Google Test's source files. -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/.library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Adafruit-GFX", 3 | "repository": { 4 | "url": "https://github.com/adafruit/Adafruit-GFX-Library.git", 5 | "type": "git" 6 | }, 7 | "platforms": [ 8 | "atmelavr" 9 | ], 10 | "frameworks": [ 11 | "arduino" 12 | ], 13 | "version": "334e815bc1", 14 | "authors": [ 15 | { 16 | "maintainer": false, 17 | "name": "Adafruit Industries", 18 | "url": "https://github.com/adafruit", 19 | "email": null 20 | } 21 | ], 22 | "keywords": [ 23 | "display", 24 | "tft", 25 | "graphics" 26 | ], 27 | "exclude": "fontconvert", 28 | "id": 13, 29 | "description": "A core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.)" 30 | } -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersYUV422.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | 5 | #include "CameraOV7670Registers.h" 6 | 7 | 8 | /* 9 | * https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno/blob/master/ov7670.c 10 | */ 11 | const PROGMEM RegisterData CameraOV7670Registers::regsYUV422 [] = { 12 | {REG_COM7, 0x0}, /* Selects YUV mode */ 13 | {REG_RGB444, 0}, /* No RGB444 please */ 14 | {REG_COM1, 0}, 15 | {REG_COM15, COM15_R00FF}, 16 | {REG_COM9, 0x6A}, /* 128x gain ceiling; 0x8 is reserved bit */ 17 | {0x4f, 0x80}, /* "matrix coefficient 1" */ 18 | {0x50, 0x80}, /* "matrix coefficient 2" */ 19 | {0x51, 0}, /* vb */ 20 | {0x52, 0x22}, /* "matrix coefficient 4" */ 21 | {0x53, 0x5e}, /* "matrix coefficient 5" */ 22 | {0x54, 0x80}, /* "matrix coefficient 6" */ 23 | {REG_COM13,/*COM13_GAMMA|*/COM13_UVSAT}, 24 | {0xff, 0xff}, 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /test/fake/Arduino.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 29.10.2016. 3 | // 4 | 5 | #ifndef LIVEOV7670_ARDUINO_H 6 | #define LIVEOV7670_ARDUINO_H 7 | 8 | 9 | #include 10 | 11 | 12 | extern uint8_t dummy; 13 | 14 | 15 | #define __AVR_ATmega328P__ dummy 16 | //#define __AVR_ATmega2560__ dummy 17 | 18 | #define PINA 0 19 | #define PINB 0 20 | #define PINC 0 21 | #define PIND 0 22 | #define PINE 0 23 | #define INPUT 0 24 | #define OUTPUT 1 25 | 26 | 27 | #define PROGMEM 28 | #define TCCR2A dummy 29 | #define _BV(p) p 30 | #define COM2A1 dummy 31 | #define COM2B1 dummy 32 | #define WGM21 dummy 33 | #define WGM20 dummy 34 | #define TCCR2B dummy 35 | #define WGM22 dummy 36 | #define CS20 dummy 37 | #define OCR2A dummy 38 | #define OCR2B dummy 39 | 40 | 41 | 42 | 43 | void pinMode(int, int); 44 | void delay(int); 45 | uint8_t pgm_read_byte(const uint8_t * pByte); 46 | 47 | 48 | #endif //LIVEOV7670_ARDUINO_H 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /test/fake/Wire.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 29.10.2016. 3 | // 4 | 5 | #include "Wire.h" 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | FakeWire Wire; 14 | 15 | 16 | 17 | void FakeWire::begin() { 18 | 19 | } 20 | 21 | void FakeWire::beginTransmission(int) { 22 | 23 | } 24 | 25 | void FakeWire::write(uint8_t byte) { 26 | transmittedBytes.push_back(byte); 27 | } 28 | 29 | int FakeWire::endTransmission() { 30 | return 0; 31 | } 32 | 33 | void FakeWire::requestFrom(int, int) { 34 | 35 | } 36 | 37 | uint8_t FakeWire::read() { 38 | if (bytesToRead.empty()) { 39 | return 0; 40 | } else { 41 | uint8_t byte = bytesToRead.front(); 42 | bytesToRead.pop_front(); 43 | return byte; 44 | } 45 | } 46 | 47 | 48 | const std::vector & FakeWire::getTransmittedBytes() { 49 | return transmittedBytes; 50 | } 51 | 52 | 53 | void FakeWire::addBytesToRead(uint8_t byte) { 54 | bytesToRead.push_back(byte); 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersRGB565.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | 5 | #include "CameraOV7670Registers.h" 6 | 7 | 8 | /* 9 | * https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno/blob/master/ov7670.c 10 | */ 11 | const PROGMEM RegisterData CameraOV7670Registers::regsRGB565 [] = { 12 | {REG_COM7, COM7_RGB}, /* Selects RGB mode */ 13 | {REG_RGB444, 0}, /* No RGB444 please */ 14 | {REG_COM1, 0x0}, 15 | {REG_COM15, COM15_RGB565|COM15_R00FF}, 16 | {REG_COM9, 0x6A}, /* 128x gain ceiling; 0x8 is reserved bit */ 17 | {0x4f, 0xb3}, /* "matrix coefficient 1" */ 18 | {0x50, 0xb3}, /* "matrix coefficient 2" */ 19 | {0x51, 0}, /* vb */ 20 | {0x52, 0x3d}, /* "matrix coefficient 4" */ 21 | {0x53, 0xa7}, /* "matrix coefficient 5" */ 22 | {0x54, 0xe4}, /* "matrix coefficient 6" */ 23 | {REG_COM13, /*COM13_GAMMA|*/COM13_UVSAT}, 24 | {0xff, 0xff} /* END MARKER */ 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Samples/FrameworkSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.gtest.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/gfxfont.h: -------------------------------------------------------------------------------- 1 | // Font structures for newer Adafruit_GFX (1.1 and later). 2 | // Example fonts are included in 'Fonts' directory. 3 | // To use a font in your Arduino sketch, #include the corresponding .h 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to 5 | // revert to 'classic' fixed-space bitmap font. 6 | 7 | #ifndef _GFXFONT_H_ 8 | #define _GFXFONT_H_ 9 | 10 | typedef struct { // Data stored PER GLYPH 11 | uint16_t bitmapOffset; // Pointer into GFXfont->bitmap 12 | uint8_t width, height; // Bitmap dimensions in pixels 13 | uint8_t xAdvance; // Distance to advance cursor (x axis) 14 | int8_t xOffset, yOffset; // Dist from cursor pos to UL corner 15 | } GFXglyph; 16 | 17 | typedef struct { // Data stored for FONT AS A WHOLE: 18 | uint8_t *bitmap; // Glyph bitmaps, concatenated 19 | GFXglyph *glyph; // Glyph array 20 | uint8_t first, last; // ASCII extents 21 | uint8_t yAdvance; // Newline distance (y axis) 22 | } GFXfont; 23 | 24 | #endif // _GFXFONT_H_ 25 | -------------------------------------------------------------------------------- /src/LiveOV7670/setup.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 1.05.2016. 3 | // 4 | 5 | #ifndef LIVEOV7670_SETUP_H 6 | #define LIVEOV7670_SETUP_H 7 | 8 | 9 | 10 | 11 | /* 12 | * EXAMPLE = 1 13 | * Use LiveOV7670Library class that reads line into buffer and 14 | * sends data to TFT over SPI during blank lines. 15 | * 16 | * EXAMPLE = 2 17 | * Use LiveOV7670Library class that processes data pixel by pixel 18 | * sends data to TFT during each pixel reading loop. 19 | * VGA can not be used with line buffer since there is no 20 | * time (no blank lines) to do something useful with a buffered line 21 | * 22 | * EXAMPLE = 3 23 | * Reads data from LiveOV7670Library and send it over UART to computer 24 | * Java application for receiving picture from UART 25 | * https://github.com/indrekluuk/ArduImageCapture 26 | * 27 | * EXAMPLE = 4 28 | * Gray scale image @20Hz. Interlaced image. 29 | * 30 | */ 31 | #define EXAMPLE 1 32 | 33 | 34 | 35 | void initializeScreenAndCamera(); 36 | void processFrame(); 37 | 38 | 39 | 40 | #endif //LIVEOV7670_SETUP_H 41 | -------------------------------------------------------------------------------- /src/lib/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | This directory is intended for the project specific (private) libraries. 3 | PlatformIO will compile them to static libraries and link to executable file. 4 | 5 | The source code of each library should be placed in separate directory, like 6 | "lib/private_lib/[here are source files]". 7 | 8 | For example, see how can be organized `Foo` and `Bar` libraries: 9 | 10 | |--lib 11 | | |--Bar 12 | | | |--docs 13 | | | |--examples 14 | | | |--src 15 | | | |- Bar.c 16 | | | |- Bar.h 17 | | |--Foo 18 | | | |- Foo.c 19 | | | |- Foo.h 20 | | |- readme.txt --> THIS FILE 21 | |- platformio.ini 22 | |--src 23 | |- main.c 24 | 25 | Then in `src/main.c` you should use: 26 | 27 | #include 28 | #include 29 | 30 | // rest H/C/CPP code 31 | 32 | PlatformIO will find your libraries automatically, configure preprocessor's 33 | include paths and build them. 34 | 35 | See additional options for PlatformIO Library Dependency Finder `lib_*`: 36 | 37 | http://docs.platformio.org/en/latest/projectconf.html#lib-install 38 | 39 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersVGA.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | #include "CameraOV7670Registers.h" 5 | 6 | // First few lines are garbage. 7 | // For some reason increasing vstart will not remove the first line, and causes synchronization problems. 8 | // It is easier read all lines from the beginning and ignore the garbage lines in the code. 9 | const uint8_t CameraOV7670Registers::VGA_VERTICAL_PADDING = 10; 10 | const uint16_t vstart = 0; 11 | const uint16_t vstop = 480 + CameraOV7670Registers::VGA_VERTICAL_PADDING; 12 | 13 | // 480 + 2 pixel (4 bytes) for padding. 14 | // One from the beginning and three at the end. 15 | const uint16_t hstart = 156; 16 | const uint16_t hstop = 14; 17 | 18 | const PROGMEM RegisterData CameraOV7670Registers::regsVGA [] = { 19 | {REG_VSTART, vstart >> 2}, 20 | {REG_VSTOP, vstop >> 2}, 21 | {REG_VREF, (vstart & 0b11) | ((vstop & 0b11) << 2)}, 22 | {REG_HSTART, hstart >> 3}, 23 | {REG_HSTOP, hstop >> 3}, 24 | {REG_HREF, 0b00000000 | (hstart & 0b111) | ((hstop & 0b111) << 3)}, 25 | 26 | {0xff, 0xff}, /* END MARKER */ 27 | }; 28 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/camera_ov7670.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # Camera_OV7670 5 | # 6 | DEF Camera_OV7670 OV7670 0 40 Y Y 1 F N 7 | F0 "OV7670" 600 -1000 60 H V C CNN 8 | F1 "Camera_OV7670" 750 -850 60 H V C CNN 9 | F2 "" -50 1050 60 H V C CNN 10 | F3 "" -50 1050 60 H V C CNN 11 | DRAW 12 | S -350 1050 350 -1050 0 1 0 N 13 | X 3.3V 1 -150 1250 200 D 50 50 1 1 W 14 | X GND 2 150 -1250 200 U 50 50 1 1 W 15 | X I2C_CLOCK 3 -550 400 200 R 50 50 1 1 I C 16 | X I2C_DATA 4 -550 250 200 R 50 50 1 1 B 17 | X VSYNC 5 -550 -200 200 R 50 50 1 1 O 18 | X HREF 6 -550 -350 200 R 50 50 1 1 O 19 | X PCLOCK 7 -550 -500 200 R 50 50 1 1 O C 20 | X CLOCK 8 -550 550 200 R 50 50 1 1 I C 21 | X D7 9 550 -500 200 L 50 50 1 1 O 22 | X D6 10 550 -350 200 L 50 50 1 1 O 23 | X D5 11 550 -200 200 L 50 50 1 1 O 24 | X D4 12 550 -50 200 L 50 50 1 1 O 25 | X D3 13 550 100 200 L 50 50 1 1 O 26 | X D2 14 550 250 200 L 50 50 1 1 O 27 | X D1 15 550 400 200 L 50 50 1 1 O 28 | X D0 16 550 550 200 L 50 50 1 1 O 29 | X RESET 17 150 1250 200 D 50 50 1 1 I 30 | X PWRDWN 18 -150 -1250 200 U 50 50 1 1 I 31 | ENDDRAW 32 | ENDDEF 33 | # 34 | #End Library 35 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/camera_ov7670.bak: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # Camera_OV7670 5 | # 6 | DEF Camera_OV7670 OV7670 0 40 Y Y 1 F N 7 | F0 "OV7670" 600 -1000 60 H V C CNN 8 | F1 "Camera_OV7670" 750 -850 60 H V C CNN 9 | F2 "" -50 1050 60 H V C CNN 10 | F3 "" -50 1050 60 H V C CNN 11 | DRAW 12 | S -350 1050 350 -1050 0 1 0 N 13 | X 3.3V 1 -150 1250 200 D 50 50 1 1 W 14 | X I2C_CLOCK 2 -550 400 200 R 50 50 1 1 I C 15 | X VSYNC 3 -550 -200 200 R 50 50 1 1 O 16 | X PCLOCK 4 -550 -500 200 R 50 50 1 1 O C 17 | X D7 5 550 -500 200 L 50 50 1 1 O 18 | X D5 6 550 -200 200 L 50 50 1 1 O 19 | X D3 7 550 100 200 L 50 50 1 1 O 20 | X D1 8 550 400 200 L 50 50 1 1 O 21 | X RESET 9 150 1250 200 D 50 50 1 1 I 22 | X GND 10 150 -1250 200 U 50 50 1 1 W 23 | X I2C_DATA 11 -550 250 200 R 50 50 1 1 B 24 | X HREF 12 -550 -350 200 R 50 50 1 1 O 25 | X CLOCK 13 -550 550 200 R 50 50 1 1 I C 26 | X D6 14 550 -350 200 L 50 50 1 1 O 27 | X D4 15 550 -50 200 L 50 50 1 1 O 28 | X D2 16 550 250 200 L 50 50 1 1 O 29 | X D0 17 550 550 200 L 50 50 1 1 O 30 | X PWRDWN 18 -150 -1250 200 U 50 50 1 1 I 31 | ENDDRAW 32 | ENDDEF 33 | # 34 | #End Library 35 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/camera_ov7670.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # Camera_OV7670 5 | # 6 | DEF Camera_OV7670 OV7670 0 40 Y Y 1 F N 7 | F0 "OV7670" 600 -1000 60 H V C CNN 8 | F1 "Camera_OV7670" 750 -850 60 H V C CNN 9 | F2 "" -50 1050 60 H V C CNN 10 | F3 "" -50 1050 60 H V C CNN 11 | DRAW 12 | S -350 1050 350 -1050 0 1 0 N 13 | X 3.3V 1 -150 1250 200 D 50 50 1 1 W 14 | X GND 2 150 -1250 200 U 50 50 1 1 W 15 | X I2C_CLOCK 3 -550 400 200 R 50 50 1 1 I C 16 | X I2C_DATA 4 -550 250 200 R 50 50 1 1 B 17 | X VSYNC 5 -550 -200 200 R 50 50 1 1 O 18 | X HREF 6 -550 -350 200 R 50 50 1 1 O 19 | X PCLOCK 7 -550 -500 200 R 50 50 1 1 O C 20 | X CLOCK 8 -550 550 200 R 50 50 1 1 I C 21 | X D7 9 550 -500 200 L 50 50 1 1 O 22 | X D6 10 550 -350 200 L 50 50 1 1 O 23 | X D5 11 550 -200 200 L 50 50 1 1 O 24 | X D4 12 550 -50 200 L 50 50 1 1 O 25 | X D3 13 550 100 200 L 50 50 1 1 O 26 | X D2 14 550 250 200 L 50 50 1 1 O 27 | X D1 15 550 400 200 L 50 50 1 1 O 28 | X D0 16 550 550 200 L 50 50 1 1 O 29 | X RESET 17 150 1250 200 D 50 50 1 1 I 30 | X PWRDWN 18 -150 -1250 200 U 50 50 1 1 I 31 | ENDDRAW 32 | ENDDEF 33 | # 34 | #End Library 35 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/DebugProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // DebugProject.xcconfig 3 | // 4 | // These are Debug Configuration project settings for the gtest framework and 5 | // examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // No optimization 14 | GCC_OPTIMIZATION_LEVEL = 0 15 | 16 | // Deployment postprocessing is what triggers Xcode to strip, turn it off 17 | DEPLOYMENT_POSTPROCESSING = NO 18 | 19 | // Dead code stripping off 20 | DEAD_CODE_STRIPPING = NO 21 | 22 | // Debug symbols should be on obviously 23 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 24 | 25 | // Define the DEBUG macro in all debug builds 26 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 27 | 28 | // These are turned off to avoid STL incompatibilities with client code 29 | // // Turns on special C++ STL checks to "encourage" good STL use 30 | // GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS 31 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | GTEST_VERSIONINFO_LONG 21 | CFBundleShortVersionString 22 | GTEST_VERSIONINFO_SHORT 23 | CFBundleGetInfoString 24 | ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} 25 | NSHumanReadableCopyright 26 | ${GTEST_VERSIONINFO_ABOUT} 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/ReleaseProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // ReleaseProject.xcconfig 3 | // 4 | // These are Release Configuration project settings for the gtest framework 5 | // and examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // subconfig/Release.xcconfig 14 | 15 | // Optimize for space and size (Apple recommendation) 16 | GCC_OPTIMIZATION_LEVEL = s 17 | 18 | // Deploment postprocessing is what triggers Xcode to strip 19 | DEPLOYMENT_POSTPROCESSING = YES 20 | 21 | // No symbols 22 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO 23 | 24 | // Dead code strip does not affect ObjC code but can help for C 25 | DEAD_CODE_STRIPPING = YES 26 | 27 | // NDEBUG is used by things like assert.h, so define it for general compat. 28 | // ASSERT going away in release tends to create unused vars. 29 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable 30 | 31 | // When we strip we want to strip all symbols in release, but save externals. 32 | STRIP_STYLE = all 33 | -------------------------------------------------------------------------------- /test/fake/OV7670Simulator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.10.2016. 3 | // 4 | 5 | #ifndef LIVEOV7670_OV7670SIMULATOR_H 6 | #define LIVEOV7670_OV7670SIMULATOR_H 7 | 8 | 9 | #include "Arduino.h" 10 | #include 11 | 12 | 13 | 14 | #define OV7670_VSYNC ov7670Simulator.isVsync() 15 | #define OV7670_PIXEL_CLOCK ov7670Simulator.isPixelClock() 16 | #define OV7670_PIXEL_BYTE ov7670Simulator.getPixelByte() 17 | 18 | 19 | class OV7670Simulator { 20 | 21 | 22 | public: 23 | bool isVsync(); 24 | bool isPixelClock(); 25 | uint8_t getPixelByte(); 26 | 27 | 28 | void setIsVsyncCallback(std::function callback) {isVsyncCallback = callback;} 29 | void setIsPixelClockCallback(std::function callback) {isPixelClockCallback = callback;} 30 | void setGetPixelCallback(std::function callback) {getPixelCallback = callback;} 31 | 32 | 33 | private: 34 | std::function isVsyncCallback; 35 | std::function isPixelClockCallback; 36 | std::function getPixelCallback; 37 | 38 | }; 39 | 40 | 41 | 42 | extern OV7670Simulator ov7670Simulator; 43 | 44 | 45 | 46 | #endif //LIVEOV7670_OV7670SIMULATOR_H 47 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/kaamera_ja_ekraan-rescue.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # Camera_OV7670-RESCUE-kaamera_ja_ekraan 5 | # 6 | DEF Camera_OV7670-RESCUE-kaamera_ja_ekraan OV7670 0 40 Y Y 1 F N 7 | F0 "OV7670" 600 -1000 60 H V C CNN 8 | F1 "Camera_OV7670-RESCUE-kaamera_ja_ekraan" 750 -850 60 H V C CNN 9 | F2 "" -50 1050 60 H V C CNN 10 | F3 "" -50 1050 60 H V C CNN 11 | DRAW 12 | S -350 1050 350 -1050 0 1 0 N 13 | X 3.3V 1 -150 1250 200 D 50 50 1 1 W 14 | X I2C_CLOCK 2 -550 400 200 R 50 50 1 1 I C 15 | X VSYNC 3 -550 -200 200 R 50 50 1 1 O 16 | X PCLOCK 4 -550 -500 200 R 50 50 1 1 O C 17 | X D7 5 550 -500 200 L 50 50 1 1 O 18 | X D5 6 550 -200 200 L 50 50 1 1 O 19 | X D3 7 550 100 200 L 50 50 1 1 O 20 | X D1 8 550 400 200 L 50 50 1 1 O 21 | X RESET 9 150 1250 200 D 50 50 1 1 I 22 | X GND 10 150 -1250 200 U 50 50 1 1 W 23 | X I2C_DATA 11 -550 250 200 R 50 50 1 1 B 24 | X HREF 12 -550 -350 200 R 50 50 1 1 O 25 | X CLOCK 13 -550 550 200 R 50 50 1 1 I C 26 | X D6 14 550 -350 200 L 50 50 1 1 O 27 | X D4 15 550 -50 200 L 50 50 1 1 O 28 | X D2 16 550 250 200 L 50 50 1 1 O 29 | X D0 17 550 550 200 L 50 50 1 1 O 30 | X PWRDWN 18 -150 -1250 200 U 50 50 1 1 I 31 | ENDDRAW 32 | ENDDEF 33 | # 34 | #End Library 35 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/BufferedCameraOV7670_QQVGA_10hz_Grayscale.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.04.2016. 3 | // 4 | 5 | #ifndef _BUFFEREDCAMERAOV7670_QQVGA_10HZ_GRAYSCALE_H 6 | #define _BUFFEREDCAMERAOV7670_QQVGA_10HZ_GRAYSCALE_H 7 | 8 | #include "BufferedCameraOV7670.h" 9 | 10 | 11 | // 160 x 120 @ 10Hz 12 | class BufferedCameraOV7670_QQVGA_10hz_Grayscale : public BufferedCameraOV7670 { 13 | 14 | 15 | public: 16 | BufferedCameraOV7670_QQVGA_10hz_Grayscale() : BufferedCameraOV7670(Resolution::RESOLUTION_QQVGA_160x120, CameraOV7670::PIXEL_YUV422, 0) {}; 17 | 18 | void ignoreVerticalPadding() override; 19 | void readLine() override; 20 | 21 | }; 22 | 23 | 24 | 25 | void BufferedCameraOV7670_QQVGA_10hz_Grayscale::ignoreVerticalPadding() { 26 | for (uint8_t i = 0; i < verticalPadding; i++) { 27 | readLine(); 28 | } 29 | } 30 | 31 | 32 | void BufferedCameraOV7670_QQVGA_10hz_Grayscale::readLine() { 33 | pixelBuffer.writeBufferPadding = 0; 34 | 35 | waitForPixelClockLow(); 36 | waitForPixelClockHigh(); 37 | 38 | for (uint8_t i = 0; i<160; i++) { 39 | waitForPixelClockLow(); 40 | readPixelByte(pixelBuffer.readBuffer[i]); 41 | } 42 | } 43 | 44 | 45 | 46 | 47 | 48 | #endif //_BUFFEREDCAMERAOV7670_QQVGA_10HZ_GRAYSCALE_H 49 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersQQVGA.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | #include "CameraOV7670Registers.h" 5 | 6 | // First few lines are garbage. 7 | // For some reason increasing vstart will not remove the first line, and causes synchronization problems. 8 | // It is easier read all lines from the beginning and ignore the garbage lines in the code. 9 | const uint8_t CameraOV7670Registers::QQVGA_VERTICAL_PADDING = 2; 10 | const uint16_t vstart = 0; 11 | const uint16_t vstop = 120 + CameraOV7670Registers::QQVGA_VERTICAL_PADDING; 12 | 13 | // 120 + 2 pixel (4 bytes) for padding. 14 | // One from the beginning and three at the end. 15 | const uint16_t hstart = 182; 16 | const uint16_t hstop = 46; 17 | 18 | const PROGMEM RegisterData CameraOV7670Registers::regsQQVGA [] = { 19 | {REG_VSTART,vstart}, 20 | {REG_VSTOP,vstop}, 21 | {REG_VREF,0}, 22 | {REG_HSTART,hstart >> 3}, 23 | {REG_HSTOP,hstop >> 3}, 24 | {REG_HREF,0b00000000 | (hstart & 0b111) | ((hstop & 0b111) << 3)}, 25 | 26 | {REG_COM3, COM3_DCWEN}, // enable downsamp/crop/window 27 | {REG_COM14, 0x1a}, // divide by 4 28 | {SCALING_DCWCTR, 0x22}, // downsample by 4 29 | {SCALING_PCLK_DIV, 0xf2}, // divide by 4 30 | 31 | {0xff, 0xff}, /* END MARKER */ 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /test/src/camera/base/TestCameraOV7670.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 29.10.2016. 3 | // 4 | 5 | 6 | #include "gtest/gtest.h" 7 | #include "OV7670Simulator.h" 8 | #include "LiveOV7670Library/CameraOV7670.h" 9 | 10 | 11 | 12 | 13 | 14 | TEST(TestCameraOV7670, testWaitForVsync) { 15 | ov7670Simulator = OV7670Simulator(); 16 | CameraOV7670 cameraOV7670(CameraOV7670::RESOLUTION_VGA_640x480, CameraOV7670::PIXEL_RGB565, 0); 17 | 18 | int vsyncCheckCount = 0; 19 | ov7670Simulator.setIsVsyncCallback([&vsyncCheckCount]() { 20 | vsyncCheckCount++; 21 | return vsyncCheckCount > 4; 22 | }); 23 | 24 | cameraOV7670.waitForVsync(); 25 | 26 | EXPECT_EQ(5, vsyncCheckCount); 27 | } 28 | 29 | 30 | 31 | 32 | 33 | 34 | TEST(TestCameraOV7670, testWaitForPixelClockRisingEdge) { 35 | ov7670Simulator = OV7670Simulator(); 36 | CameraOV7670 cameraOV7670(CameraOV7670::RESOLUTION_VGA_640x480, CameraOV7670::PIXEL_RGB565, 0); 37 | 38 | int pixelClockCheckCount = 0; 39 | ov7670Simulator.setIsPixelClockCallback([&pixelClockCheckCount]() { 40 | pixelClockCheckCount++; 41 | return (pixelClockCheckCount < 10) || (pixelClockCheckCount > 13); 42 | }); 43 | 44 | cameraOV7670.waitForPixelClockRisingEdge(); 45 | 46 | EXPECT_EQ(14, pixelClockCheckCount); 47 | } 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670RegistersQVGA.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 17.04.2016. 3 | // 4 | #include "CameraOV7670Registers.h" 5 | 6 | // First few lines are garbage. 7 | // For some reason increasing vstart will not remove the first line, and causes synchronization problems. 8 | // It is easier read all lines from the beginning and ignore the garbage lines in the code. 9 | const uint8_t CameraOV7670Registers::QVGA_VERTICAL_PADDING = 5; 10 | const uint16_t vstart = 0; 11 | const uint16_t vstop = 240 + CameraOV7670Registers::QVGA_VERTICAL_PADDING; 12 | 13 | // 240 + 2 pixel (4 bytes) for padding. 14 | // One from the beginning and three at the end. 15 | const uint16_t hstart = 174; 16 | const uint16_t hstop = 34; 17 | 18 | const PROGMEM RegisterData CameraOV7670Registers::regsQVGA [] = { 19 | {REG_VSTART,vstart >> 1}, 20 | {REG_VSTOP,vstop >> 1}, 21 | {REG_VREF,((vstart & 0b1) << 1) | ((vstop & 0b1) << 3)}, 22 | {REG_HSTART,hstart >> 3}, 23 | {REG_HSTOP,hstop >> 3}, 24 | {REG_HREF,0b00000000 | (hstart & 0b111) | ((hstop & 0b111) << 3)}, 25 | 26 | {REG_COM3, COM3_DCWEN}, // enable downsamp/crop/window 27 | {REG_COM14, 0x19}, // divide by 2 28 | {SCALING_DCWCTR, 0x11}, // downsample by 2 29 | {SCALING_PCLK_DIV, 0xf1}, // divide by 2 30 | 31 | {0xff, 0xff}, /* END MARKER */ 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/V1_6_Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/docs/V1_7_Samples.md: -------------------------------------------------------------------------------- 1 | If you're like us, you'd like to look at some Google Test sample code. The 2 | [samples folder](../samples) has a number of well-commented samples showing how to use a 3 | variety of Google Test features. 4 | 5 | * [Sample #1](../samples/sample1_unittest.cc) shows the basic steps of using Google Test to test C++ functions. 6 | * [Sample #2](../samples/sample2_unittest.cc) shows a more complex unit test for a class with multiple member functions. 7 | * [Sample #3](../samples/sample3_unittest.cc) uses a test fixture. 8 | * [Sample #4](../samples/sample4_unittest.cc) is another basic example of using Google Test. 9 | * [Sample #5](../samples/sample5_unittest.cc) teaches how to reuse a test fixture in multiple test cases by deriving sub-fixtures from it. 10 | * [Sample #6](../samples/sample6_unittest.cc) demonstrates type-parameterized tests. 11 | * [Sample #7](../samples/sample7_unittest.cc) teaches the basics of value-parameterized tests. 12 | * [Sample #8](../samples/sample8_unittest.cc) shows using `Combine()` in value-parameterized tests. 13 | * [Sample #9](../samples/sample9_unittest.cc) shows use of the listener API to modify Google Test's console output and the use of its reflection API to inspect test results. 14 | * [Sample #10](../samples/sample10_unittest.cc) shows use of the listener API to implement a primitive memory leak checker. 15 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Config/General.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // General.xcconfig 3 | // 4 | // These are General configuration settings for the gtest framework and 5 | // examples. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Build for PPC and Intel, 32- and 64-bit 11 | ARCHS = i386 x86_64 ppc ppc64 12 | 13 | // Zerolink prevents link warnings so turn it off 14 | ZERO_LINK = NO 15 | 16 | // Prebinding considered unhelpful in 10.3 and later 17 | PREBINDING = NO 18 | 19 | // Strictest warning policy 20 | WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow 21 | 22 | // Work around Xcode bugs by using external strip. See: 23 | // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html 24 | SEPARATE_STRIP = YES 25 | 26 | // Force C99 dialect 27 | GCC_C_LANGUAGE_STANDARD = c99 28 | 29 | // not sure why apple defaults this on, but it's pretty risky 30 | ALWAYS_SEARCH_USER_PATHS = NO 31 | 32 | // Turn on position dependent code for most cases (overridden where appropriate) 33 | GCC_DYNAMIC_NO_PIC = YES 34 | 35 | // Default SDK and minimum OS version is 10.4 36 | SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk 37 | MACOSX_DEPLOYMENT_TARGET = 10.4 38 | GCC_VERSION = 4.0 39 | 40 | // VERSIONING BUILD SETTINGS (used in Info.plist) 41 | GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. 42 | -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Testing Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Ajay Joshi 7 | Balázs Dán 8 | Bharat Mediratta 9 | Chandler Carruth 10 | Chris Prince 11 | Chris Taylor 12 | Dan Egnor 13 | Eric Roman 14 | Hady Zalek 15 | Jeffrey Yasskin 16 | Jói Sigurðsson 17 | Keir Mierle 18 | Keith Ray 19 | Kenton Varda 20 | Manuel Klimek 21 | Markus Heule 22 | Mika Raento 23 | Miklós Fazekas 24 | Pasi Valminen 25 | Patrick Hanna 26 | Patrick Riley 27 | Peter Kaminski 28 | Preston Jackson 29 | Rainer Klaffenboeck 30 | Russ Cox 31 | Russ Rufer 32 | Sean Mcafee 33 | Sigurður Ásgeirsson 34 | Tracy Bialik 35 | Vadim Berman 36 | Vlad Losev 37 | Zhanyong Wan 38 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.2) 2 | project(LiveOV7670) 3 | 4 | 5 | # PlatformIO build targets 6 | # Must init platformio. See: PlatformIO_CLion_init.txt 7 | add_subdirectory(src) 8 | 9 | 10 | 11 | 12 | # init Google Test target 13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 14 | 15 | # fake arduino headers 16 | include_directories(test/fake) 17 | # project headers 18 | include_directories(src/lib) 19 | include_directories(src/LiveOV7670) 20 | # gtest headers 21 | include_directories(${gtest_SOURCE_DIR}/include) 22 | 23 | 24 | 25 | add_executable(runTests 26 | test/fake/Arduino.cpp 27 | test/fake/Wire.cpp 28 | test/fake/OV7670Simulator.cpp 29 | 30 | src/lib/LiveOV7670Library/CameraOV7670.cpp 31 | src/lib/LiveOV7670Library/CameraOV7670Registers.cpp 32 | src/lib/LiveOV7670Library/CameraOV7670RegistersDefault.cpp 33 | src/lib/LiveOV7670Library/CameraOV7670RegistersQQVGA.cpp 34 | src/lib/LiveOV7670Library/CameraOV7670RegistersQVGA.cpp 35 | src/lib/LiveOV7670Library/CameraOV7670RegistersVGA.cpp 36 | src/lib/LiveOV7670Library/CameraOV7670RegistersRGB565.cpp 37 | src/lib/LiveOV7670Library/CameraOV7670RegistersBayerRGB.cpp 38 | src/lib/LiveOV7670Library/CameraOV7670RegistersYUV422.cpp 39 | 40 | test/src/camera/base/TestCameraOV7670.cpp 41 | test/src/camera/base/TestCameraOV7670Registers.cpp 42 | test/src/camera/buffered/TestBufferedCameraOV7670.cpp 43 | ) 44 | 45 | # link 46 | add_subdirectory(test/lib/gtest-1.7.0) 47 | target_link_libraries(runTests gtest_main) 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/YJ_arduino/arduino.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 Date: lun. 15 oct. 2012 21:10:05 CEST 2 | #encoding utf-8 3 | # 4 | # arduino_mini 5 | # 6 | DEF arduino_mini U 0 40 Y Y 1 F N 7 | F0 "U" 500 -950 70 H V C CNN 8 | F1 "arduino_mini" 750 -1050 70 H V C CNN 9 | F2 "DIL20" 0 -50 60 H V C CNN 10 | DRAW 11 | X GND 14 0 -1550 200 U 60 60 0 0 W 12 | X Vin 15 -150 1150 200 D 60 60 0 0 W 13 | S -400 950 400 -1350 0 1 0 N 14 | X (led)(SCK)D13 1 700 650 300 L 60 60 1 1 I 15 | X 3V3 2 150 1150 200 D 60 60 1 1 w 16 | X Aref 3 -700 400 300 R 60 60 1 1 I 17 | X A0 4 -700 200 300 R 60 60 1 1 B 18 | X A1 5 -700 100 300 R 60 60 1 1 B 19 | X A2 6 -700 0 300 R 60 60 1 1 B 20 | X A3 7 -700 -100 300 R 60 60 1 1 B 21 | X A4(SDA) 8 -700 -200 300 R 60 60 1 1 B 22 | X A5(SCL) 9 -700 -300 300 R 60 60 1 1 B 23 | X A6 10 -700 -400 300 R 60 60 1 1 B 24 | X (int2)D2 20 700 -600 300 L 60 60 1 1 B 25 | X (MISO)D12 30 700 550 300 L 60 60 1 1 B 26 | X A7 11 -700 -500 300 R 60 60 1 1 B 27 | X (int3)#D3 21 700 -500 300 L 60 60 1 1 B 28 | X 5V 12 0 1150 200 D 60 60 1 1 w 29 | X D4 22 700 -400 300 L 60 60 1 1 B 30 | X RST 13 -700 -1300 300 R 60 60 1 1 I L 31 | X #D5 23 700 -300 300 L 60 60 1 1 B 32 | X #D6 24 700 -50 300 L 60 60 1 1 B 33 | X D7 25 700 50 300 L 60 60 1 1 B 34 | X (TX)D0 16 700 -800 300 L 60 60 1 1 B 35 | X D8 26 700 150 300 L 60 60 1 1 B 36 | X (RX)D1 17 700 -700 300 L 60 60 1 1 B 37 | X #D9 27 700 250 300 L 60 60 1 1 B 38 | X RST 18 -700 -1200 300 R 60 60 1 1 I NL 39 | X (SS)#D10 28 700 350 300 L 60 60 1 1 B 40 | X GND 19 100 -1550 200 U 60 60 1 1 W N 41 | X (MOSI)#D11 29 700 450 300 L 60 60 1 1 B 42 | ENDDRAW 43 | ENDDEF 44 | # 45 | #End Library 46 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/kaamera_ja_ekraan.pro: -------------------------------------------------------------------------------- 1 | update=6.03.2016 19:43:04 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir= 31 | [eeschema/libraries] 32 | LibName1=kaamera_ja_ekraan-rescue 33 | LibName2=LibMod/Indrek/camera_ov7670 34 | LibName3=LibMod/Indrek/tft_1.8inch 35 | LibName4=LibMod/Indrek/levelshifter_4ch 36 | LibName5=LibMod/YJ_arduino/arduino 37 | LibName6=power 38 | LibName7=device 39 | LibName8=transistors 40 | LibName9=conn 41 | LibName10=linear 42 | LibName11=regul 43 | LibName12=74xx 44 | LibName13=cmos4000 45 | LibName14=adc-dac 46 | LibName15=memory 47 | LibName16=xilinx 48 | LibName17=microcontrollers 49 | LibName18=dsp 50 | LibName19=microchip 51 | LibName20=analog_switches 52 | LibName21=motorola 53 | LibName22=texas 54 | LibName23=intel 55 | LibName24=audio 56 | LibName25=interface 57 | LibName26=digital-audio 58 | LibName27=philips 59 | LibName28=display 60 | LibName29=cypress 61 | LibName30=siliconi 62 | LibName31=opto 63 | LibName32=atmel 64 | LibName33=contrib 65 | LibName34=valves 66 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/BufferedCameraOV7670_80x120_10hz_Grayscale.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.04.2016. 3 | // 4 | 5 | #ifndef _BUFFEREDCAMERAOV7670_80x120_10HZ_GRAYSCALE_H 6 | #define _BUFFEREDCAMERAOV7670_80x120_10HZ_GRAYSCALE_H 7 | 8 | #include "BufferedCameraOV7670.h" 9 | 10 | 11 | // 160 x 120 @ 10Hz 12 | class BufferedCameraOV7670_80x120_10hz_Grayscale : public BufferedCameraOV7670 { 13 | 14 | 15 | public: 16 | BufferedCameraOV7670_80x120_10hz_Grayscale() : BufferedCameraOV7670(Resolution::RESOLUTION_QQVGA_160x120, CameraOV7670::PIXEL_YUV422, 0) {}; 17 | 18 | void readLine() override; 19 | 20 | }; 21 | 22 | 23 | 24 | 25 | void BufferedCameraOV7670_80x120_10hz_Grayscale::readLine() { 26 | pixelBuffer.writeBufferPadding = 0; 27 | waitForPixelClockLow(); 28 | 29 | asm volatile("nop"); 30 | asm volatile("nop"); 31 | asm volatile("nop"); 32 | 33 | 34 | for (uint8_t i = 0; i<80; i++) { 35 | 36 | asm volatile("nop"); 37 | asm volatile("nop"); 38 | asm volatile("nop"); 39 | asm volatile("nop"); 40 | asm volatile("nop"); 41 | asm volatile("nop"); 42 | asm volatile("nop"); 43 | asm volatile("nop"); 44 | asm volatile("nop"); 45 | asm volatile("nop"); 46 | asm volatile("nop"); 47 | asm volatile("nop"); 48 | asm volatile("nop"); 49 | asm volatile("nop"); 50 | asm volatile("nop"); 51 | asm volatile("nop"); 52 | asm volatile("nop"); 53 | asm volatile("nop"); 54 | asm volatile("nop"); 55 | asm volatile("nop"); 56 | 57 | readPixelByte(pixelBuffer.readBuffer[i]); 58 | } 59 | } 60 | 61 | 62 | #endif //_BUFFEREDCAMERAOV7670_80x120_10HZ_GRAYSCALE_H 63 | -------------------------------------------------------------------------------- /test/src/camera/base/TestCameraOV7670Registers.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.10.2016. 3 | // 4 | 5 | 6 | #include "gtest/gtest.h" 7 | #include "LiveOV7670Library/CameraOV7670Registers.h" 8 | 9 | 10 | 11 | class TestCameraOV7670Registers : public ::testing::Test { 12 | protected: 13 | virtual void SetUp() { 14 | // re-init Wire to make sure it is clean for each test 15 | Wire = FakeWire(); 16 | } 17 | 18 | std::vector registerDataToVector(const RegisterData * pRegs) { 19 | std::vector regVector; 20 | for (; pRegs->addr != 0xFF; pRegs++) { 21 | regVector.push_back(pRegs->addr); 22 | regVector.push_back(pRegs->val); 23 | } 24 | return regVector; 25 | } 26 | }; 27 | 28 | 29 | 30 | 31 | 32 | 33 | TEST_F(TestCameraOV7670Registers, testWriteRegisters) { 34 | CameraOV7670Registers registers(0); 35 | registers.setRegisters(CameraOV7670Registers::regsDefault); 36 | ASSERT_EQ(registerDataToVector(CameraOV7670Registers::regsDefault), Wire.getTransmittedBytes()); 37 | } 38 | 39 | 40 | TEST_F(TestCameraOV7670Registers, testSetRegisterBitsOR) { 41 | CameraOV7670Registers registers(0); 42 | Wire.addBytesToRead(0b01101001); 43 | registers.setRegisterBitsOR(0, 0b00001111); 44 | ASSERT_EQ(3, Wire.getTransmittedBytes().size()); 45 | ASSERT_EQ(0b01101111, Wire.getTransmittedBytes()[2]); 46 | } 47 | 48 | 49 | TEST_F(TestCameraOV7670Registers, testSetRegisterBitsAND) { 50 | CameraOV7670Registers registers(0); 51 | Wire.addBytesToRead(0b01101001); 52 | registers.setRegisterBitsAND(0, 0b00001111); 53 | ASSERT_EQ(3, Wire.getTransmittedBytes().size()); 54 | ASSERT_EQ(0b00001001, Wire.getTransmittedBytes()[2]); 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670Registers.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.10.2016. 3 | // 4 | 5 | #ifndef LIVEOV7670_CAMERAOV7670REGISTERS_H 6 | #define LIVEOV7670_CAMERAOV7670REGISTERS_H 7 | 8 | 9 | #include "Arduino.h" 10 | #include "Wire.h" 11 | #include "CameraOV7670RegisterDefinitions.h" 12 | 13 | 14 | 15 | 16 | class CameraOV7670Registers { 17 | 18 | 19 | private: 20 | uint8_t i2cAddress; 21 | 22 | public: 23 | static const RegisterData regsDefault[]; 24 | static const RegisterData regsRGB565[]; 25 | static const RegisterData regsBayerRGB[]; 26 | static const RegisterData regsYUV422[]; 27 | static const RegisterData regsQQVGA[]; 28 | static const RegisterData regsQVGA[]; 29 | static const RegisterData regsVGA[]; 30 | 31 | static const uint8_t QQVGA_VERTICAL_PADDING; 32 | static const uint8_t QVGA_VERTICAL_PADDING; 33 | static const uint8_t VGA_VERTICAL_PADDING; 34 | 35 | CameraOV7670Registers(const uint8_t i2cAddress); 36 | 37 | void init(); 38 | 39 | bool resetSettings(); 40 | void setRegisters(const RegisterData *registerData); 41 | bool setRegister(uint8_t addr, uint8_t val); 42 | uint8_t readRegister(uint8_t addr); 43 | void setRegisterBitsOR(uint8_t addr, uint8_t bits); 44 | void setRegisterBitsAND(uint8_t addr, uint8_t bits); 45 | 46 | void setDisablePixelClockDuringBlankLines(); 47 | void setDisableHREFDuringBlankLines(); 48 | void setHREFReverse(); 49 | void setInternalClockPreScaler(int preScaler); 50 | void setPLLMultiplier(uint8_t multiplier); 51 | void setManualContrastCenter(uint8_t center); 52 | void setContrast(uint8_t contrast); 53 | void setBrightness(uint8_t birghtness); 54 | void reversePixelBits(); 55 | void setShowColorBar(bool transparent); 56 | 57 | }; 58 | 59 | 60 | #endif //LIVEOV7670_CAMERAOV7670REGISTERS_H 61 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // This is part of the unit test for include/gtest/gtest_prod.h. 33 | 34 | #include "production.h" 35 | 36 | PrivateCode::PrivateCode() : x_(0) {} 37 | -------------------------------------------------------------------------------- /pcb/livecam/gerber/livecam-PTH.drl: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,TZ 3 | T1C0.400 4 | T2C0.800 5 | T3C1.016 6 | % 7 | G90 8 | G05 9 | T1 10 | X133800Y-48280 11 | X135730Y-65930 12 | X139020Y-80670 13 | X144270Y-48280 14 | X146360Y-66120 15 | X146360Y-69890 16 | X149190Y-45830 17 | X152400Y-45830 18 | X153070Y-68070 19 | X153476Y-74015 20 | X155240Y-75130 21 | X155600Y-48320 22 | X155820Y-50790 23 | X157730Y-63200 24 | X158160Y-48460 25 | X159240Y-54420 26 | X160170Y-75140 27 | X161210Y-47090 28 | X162610Y-63200 29 | X164310Y-50560 30 | X164380Y-54490 31 | X164990Y-75220 32 | T2 33 | X133680Y-44450 34 | X133680Y-59690 35 | X136220Y-44450 36 | X136220Y-59690 37 | X138760Y-44450 38 | X138760Y-59690 39 | X141300Y-44450 40 | X141300Y-59690 41 | X143840Y-44450 42 | X143840Y-59690 43 | X146380Y-44450 44 | X146380Y-59690 45 | X148920Y-44450 46 | X148920Y-59690 47 | X151460Y-44450 48 | X151460Y-59690 49 | X154000Y-44450 50 | X154000Y-59690 51 | X156540Y-44450 52 | X156540Y-59690 53 | X159080Y-44450 54 | X159080Y-59690 55 | X161620Y-44450 56 | X161620Y-59690 57 | X164160Y-44450 58 | X164160Y-59690 59 | X166700Y-44450 60 | X166700Y-59690 61 | X169240Y-44450 62 | X169240Y-59690 63 | T3 64 | X133660Y-72100 65 | X136200Y-72100 66 | X138740Y-72100 67 | X141280Y-72100 68 | X143820Y-72100 69 | X146360Y-72100 70 | X148900Y-72100 71 | X151440Y-72100 72 | X133670Y-50780 73 | X133670Y-53320 74 | X136210Y-50780 75 | X136210Y-53320 76 | X138750Y-50780 77 | X138750Y-53320 78 | X141290Y-50780 79 | X141290Y-53320 80 | X143830Y-50780 81 | X143830Y-53320 82 | X146370Y-50780 83 | X146370Y-53320 84 | X148910Y-50780 85 | X148910Y-53320 86 | X151450Y-50780 87 | X151450Y-53320 88 | X153990Y-50780 89 | X153990Y-53320 90 | X169250Y-75830 91 | X169250Y-78370 92 | X169310Y-65700 93 | X169310Y-68240 94 | X133650Y-68220 95 | X133650Y-75820 96 | X151210Y-65720 97 | X151250Y-78320 98 | T0 99 | M30 100 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/src/gtest_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | 32 | #include "gtest/gtest.h" 33 | 34 | GTEST_API_ int main(int argc, char **argv) { 35 | printf("Running main() from gtest_main.cc\n"); 36 | testing::InitGoogleTest(&argc, argv); 37 | return RUN_ALL_TESTS(); 38 | } 39 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/gerber/kaamera_ja_ekraan.drl: -------------------------------------------------------------------------------- 1 | M48 2 | METRIC,TZ 3 | T1C0.400 4 | T2C0.813 5 | T3C1.016 6 | % 7 | G90 8 | G05 9 | T1 10 | X121222Y-83122 11 | X123317Y-85916 12 | X146241Y-85979 13 | X147511Y-98425 14 | X149352Y-94679 15 | X153162Y-86043 16 | X154623Y-84836 17 | T2 18 | X123444Y-81534 19 | X123444Y-96774 20 | X125984Y-81534 21 | X125984Y-96774 22 | X128524Y-81534 23 | X128524Y-96774 24 | X131064Y-81534 25 | X131064Y-96774 26 | X133604Y-81534 27 | X133604Y-96774 28 | X136144Y-81534 29 | X136144Y-96774 30 | X138684Y-81534 31 | X138684Y-96774 32 | X141224Y-81534 33 | X141224Y-96774 34 | X143764Y-81534 35 | X143764Y-96774 36 | X146304Y-81534 37 | X146304Y-96774 38 | X148844Y-81534 39 | X148844Y-96774 40 | X151384Y-81534 41 | X151384Y-96774 42 | X153924Y-81534 43 | X153924Y-96774 44 | X156464Y-81534 45 | X156464Y-96774 46 | X159004Y-81534 47 | X159004Y-96774 48 | T3 49 | X123444Y-88392 50 | X123444Y-90932 51 | X123444Y-102362 52 | X123444Y-107442 53 | X123444Y-112522 54 | X125984Y-88392 55 | X125984Y-90932 56 | X125984Y-102362 57 | X125984Y-107442 58 | X125984Y-112522 59 | X128524Y-88392 60 | X128524Y-90932 61 | X128524Y-102362 62 | X128524Y-107442 63 | X128524Y-112522 64 | X131064Y-88392 65 | X131064Y-90932 66 | X131064Y-102362 67 | X131064Y-107442 68 | X131064Y-112522 69 | X133604Y-88392 70 | X133604Y-90932 71 | X133604Y-102362 72 | X133604Y-107442 73 | X133604Y-112522 74 | X136144Y-88392 75 | X136144Y-90932 76 | X136144Y-102362 77 | X136144Y-107442 78 | X136144Y-112522 79 | X138684Y-88392 80 | X138684Y-90932 81 | X138684Y-107442 82 | X141224Y-88392 83 | X141224Y-90932 84 | X141224Y-107442 85 | X143764Y-88392 86 | X143764Y-90932 87 | X146050Y-102362 88 | X146050Y-112522 89 | X148590Y-102362 90 | X148590Y-112522 91 | X151130Y-102362 92 | X151130Y-112522 93 | X153670Y-102362 94 | X153670Y-112522 95 | X156210Y-102362 96 | X156210Y-112522 97 | X158750Y-102362 98 | X158750Y-112522 99 | T0 100 | M30 101 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/codegear/gtest_all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // C++Builder's IDE cannot build a static library from files with hyphens 35 | // in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . 36 | // This file serves as a workaround. 37 | 38 | #include "src/gtest-all.cc" 39 | -------------------------------------------------------------------------------- /src/lib/Adafruit_GFX_Library/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit GFX Library 2 | 3 | This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions). 4 | 5 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 6 | 7 | Written by Limor Fried/Ladyada for Adafruit Industries. 8 | BSD license, check license.txt for more information. 9 | All text above must be included in any redistribution. 10 | 11 | Recent Arduino IDE releases include the Library Manager for easy installation. Otherwise, to download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h. Place the Adafruit_GFX library folder your /Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 12 | 13 | # Useful Resources 14 | 15 | - Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at ehubin's GitHub repository: https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code 16 | 17 | - drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the pull request here for more details: https://github.com/adafruit/Adafruit-GFX-Library/pull/31 18 | 19 | - 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, #include the corresponding .h file and pass address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font. 20 | 21 | - 'fontconvert' folder contains a command-line tool for converting TTF fonts to Adafruit_GFX .h format. 22 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/scripts/test/Makefile: -------------------------------------------------------------------------------- 1 | # A Makefile for fusing Google Test and building a sample test against it. 2 | # 3 | # SYNOPSIS: 4 | # 5 | # make [all] - makes everything. 6 | # make TARGET - makes the given target. 7 | # make check - makes everything and runs the built sample test. 8 | # make clean - removes all files generated by make. 9 | 10 | # Points to the root of fused Google Test, relative to where this file is. 11 | FUSED_GTEST_DIR = output 12 | 13 | # Paths to the fused gtest files. 14 | FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h 15 | FUSED_GTEST_ALL_CC = $(FUSED_GTEST_DIR)/gtest/gtest-all.cc 16 | 17 | # Where to find the sample test. 18 | SAMPLE_DIR = ../../samples 19 | 20 | # Where to find gtest_main.cc. 21 | GTEST_MAIN_CC = ../../src/gtest_main.cc 22 | 23 | # Flags passed to the preprocessor. 24 | # We have no idea here whether pthreads is available in the system, so 25 | # disable its use. 26 | CPPFLAGS += -I$(FUSED_GTEST_DIR) -DGTEST_HAS_PTHREAD=0 27 | 28 | # Flags passed to the C++ compiler. 29 | CXXFLAGS += -g 30 | 31 | all : sample1_unittest 32 | 33 | check : all 34 | ./sample1_unittest 35 | 36 | clean : 37 | rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o 38 | 39 | $(FUSED_GTEST_H) : 40 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR) 41 | 42 | $(FUSED_GTEST_ALL_CC) : 43 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR) 44 | 45 | gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC) 46 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GTEST_DIR)/gtest/gtest-all.cc 47 | 48 | gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC) 49 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_MAIN_CC) 50 | 51 | sample1.o : $(SAMPLE_DIR)/sample1.cc $(SAMPLE_DIR)/sample1.h 52 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1.cc 53 | 54 | sample1_unittest.o : $(SAMPLE_DIR)/sample1_unittest.cc \ 55 | $(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H) 56 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1_unittest.cc 57 | 58 | sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o 59 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ 60 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_main_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | 34 | // Tests that we don't have to define main() when we link to 35 | // gtest_main instead of gtest. 36 | 37 | namespace { 38 | 39 | TEST(GTestMainTest, ShouldSucceed) { 40 | } 41 | 42 | } // namespace 43 | 44 | // We are using the main() function defined in src/gtest_main.cc, so 45 | // we don't define it here. 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample4_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | #include "sample4.h" 34 | 35 | // Tests the Increment() method. 36 | TEST(Counter, Increment) { 37 | Counter c; 38 | 39 | // EXPECT_EQ() evaluates its arguments exactly once, so they 40 | // can have side effects. 41 | 42 | EXPECT_EQ(0, c.Increment()); 43 | EXPECT_EQ(1, c.Increment()); 44 | EXPECT_EQ(2, c.Increment()); 45 | } 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #ifndef GTEST_SAMPLES_SAMPLE1_H_ 35 | #define GTEST_SAMPLES_SAMPLE1_H_ 36 | 37 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 38 | int Factorial(int n); 39 | 40 | // Returns true iff n is a prime number. 41 | bool IsPrime(int n); 42 | 43 | #endif // GTEST_SAMPLES_SAMPLE1_H_ 44 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_uninitialized_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | 34 | TEST(DummyTest, Dummy) { 35 | // This test doesn't verify anything. We just need it to create a 36 | // realistic stage for testing the behavior of Google Test when 37 | // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being 38 | // called first. 39 | } 40 | 41 | int main() { 42 | return RUN_ALL_TESTS(); 43 | } 44 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample4.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #include 35 | 36 | #include "sample4.h" 37 | 38 | // Returns the current counter value, and increments it. 39 | int Counter::Increment() { 40 | return counter_++; 41 | } 42 | 43 | // Prints the current counter value to STDOUT. 44 | void Counter::Print() const { 45 | printf("%d", counter_); 46 | } 47 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/codegear/gtest_link.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // Links gtest.lib and gtest_main.lib into the current project in C++Builder. 35 | // This means that these libraries can't be renamed, but it's the only way to 36 | // ensure that Debug versus Release test builds are linked against the 37 | // appropriate Debug or Release build of the libraries. 38 | 39 | #pragma link "gtest.lib" 40 | #pragma link "gtest_main.lib" 41 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/include/gtest/internal/custom/gtest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. 31 | // The following macros can be defined: 32 | // 33 | // GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of 34 | // OsStackTraceGetterInterface. 35 | // 36 | // ** Custom implementation starts here ** 37 | 38 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 39 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 40 | 41 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 42 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_xml_outfile1_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: keith.ray@gmail.com (Keith Ray) 31 | // 32 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by 33 | // gtest_xml_outfiles_test.py 34 | 35 | #include "gtest/gtest.h" 36 | 37 | class PropertyOne : public testing::Test { 38 | protected: 39 | virtual void SetUp() { 40 | RecordProperty("SetUpProp", 1); 41 | } 42 | virtual void TearDown() { 43 | RecordProperty("TearDownProp", 1); 44 | } 45 | }; 46 | 47 | TEST_F(PropertyOne, TestSomeProperties) { 48 | RecordProperty("TestSomeProperty", 1); 49 | } 50 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_xml_outfile2_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: keith.ray@gmail.com (Keith Ray) 31 | // 32 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by 33 | // gtest_xml_outfiles_test.py 34 | 35 | #include "gtest/gtest.h" 36 | 37 | class PropertyTwo : public testing::Test { 38 | protected: 39 | virtual void SetUp() { 40 | RecordProperty("SetUpProp", 2); 41 | } 42 | virtual void TearDown() { 43 | RecordProperty("TearDownProp", 2); 44 | } 45 | }; 46 | 47 | TEST_F(PropertyTwo, TestSomeProperties) { 48 | RecordProperty("TestSomeProperty", 2); 49 | } 50 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/codegear/gtest.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {c1d923e0-6cba-4332-9b6f-3420acbf5091} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Default.Personality 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest-typed-test2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include 33 | 34 | #include "test/gtest-typed-test_test.h" 35 | #include "gtest/gtest.h" 36 | 37 | #if GTEST_HAS_TYPED_TEST_P 38 | 39 | // Tests that the same type-parameterized test case can be 40 | // instantiated in different translation units linked together. 41 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.) 42 | INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest, 43 | testing::Types >); 44 | 45 | #endif // GTEST_HAS_TYPED_TEST_P 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/include/gtest/internal/custom/gtest-printers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // This file provides an injection point for custom printers in a local 31 | // installation of gTest. 32 | // It will be included from gtest-printers.h and the overrides in this file 33 | // will be visible to everyone. 34 | // See documentation at gtest/gtest-printers.h for details on how to define a 35 | // custom printer. 36 | // 37 | // ** Custom implementation starts here ** 38 | 39 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 40 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 41 | 42 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 43 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample4.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #ifndef GTEST_SAMPLES_SAMPLE4_H_ 35 | #define GTEST_SAMPLES_SAMPLE4_H_ 36 | 37 | // A simple monotonic counter. 38 | class Counter { 39 | private: 40 | int counter_; 41 | 42 | public: 43 | // Creates a counter that starts at 0. 44 | Counter() : counter_(0) {} 45 | 46 | // Returns the current counter value, and increments it. 47 | int Increment(); 48 | 49 | // Prints the current counter value to STDOUT. 50 | void Print() const; 51 | }; 52 | 53 | #endif // GTEST_SAMPLES_SAMPLE4_H_ 54 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/BufferedCameraOV7670_QQVGA.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.04.2016. 3 | // 4 | 5 | #ifndef _BUFFEREDCAMERAOV7670_QQVGA_H 6 | #define _BUFFEREDCAMERAOV7670_QQVGA_H 7 | 8 | #include "BufferedCameraOV7670.h" 9 | 10 | 11 | // 160 x 120 @ 5Hz or less 12 | class BufferedCameraOV7670_QQVGA : public BufferedCameraOV7670 { 13 | 14 | public: 15 | enum FramesPerSecond { 16 | FPS_5_Hz, 17 | FPS_3p33_Hz, 18 | FPS_2p5_Hz, 19 | FPS_2_Hz, 20 | FPS_1p66_Hz 21 | }; 22 | 23 | 24 | private: 25 | FramesPerSecond framesPerSecond; 26 | 27 | public: 28 | BufferedCameraOV7670_QQVGA(PixelFormat format, FramesPerSecond fps) : 29 | BufferedCameraOV7670(Resolution::RESOLUTION_QQVGA_160x120, format, getPreScalerForFps(fps)), 30 | framesPerSecond(fps) 31 | {}; 32 | 33 | void ignoreVerticalPadding() override; 34 | void readLine() override; 35 | 36 | 37 | private: 38 | static uint8_t getPreScalerForFps(FramesPerSecond fps) { 39 | switch (fps) { 40 | default: 41 | case FPS_5_Hz: 42 | return 1; 43 | case FPS_3p33_Hz: 44 | return 2; 45 | case FPS_2p5_Hz: 46 | return 3; 47 | case FPS_2_Hz: 48 | return 4; 49 | case FPS_1p66_Hz: 50 | return 5; 51 | } 52 | } 53 | }; 54 | 55 | 56 | void BufferedCameraOV7670_QQVGA::ignoreVerticalPadding() { 57 | if (framesPerSecond == FPS_5_Hz) { 58 | for (uint8_t i = 0; i < verticalPadding; i++) { 59 | readLine(); 60 | } 61 | } else { 62 | CameraOV7670::ignoreVerticalPadding(); 63 | } 64 | } 65 | 66 | 67 | void BufferedCameraOV7670_QQVGA::readLine() { 68 | 69 | // reading loop is too tight fro 5Hz to wait for raising clock edge 70 | if (framesPerSecond == FPS_5_Hz) { 71 | pixelBuffer.writeBufferPadding = 0; 72 | uint16_t bufferIndex = 0; 73 | 74 | waitForPixelClockLow(); 75 | while (bufferIndex < getPixelBufferLength()) { 76 | readPixelByte(pixelBuffer.writeBuffer[bufferIndex++]); 77 | waitForPixelClockLow(); 78 | readPixelByte(pixelBuffer.writeBuffer[bufferIndex++]); 79 | waitForPixelClockLow(); 80 | } 81 | 82 | } else { 83 | BufferedCameraOV7670::readLine(); 84 | } 85 | 86 | } 87 | 88 | 89 | 90 | 91 | 92 | 93 | #endif //_BUFFEREDCAMERAOV7670_QQVGA_H 94 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_help_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | // This program is meant to be run by gtest_help_test.py. Do not run 33 | // it directly. 34 | 35 | #include "gtest/gtest.h" 36 | 37 | // When a help flag is specified, this program should skip the tests 38 | // and exit with 0; otherwise the following test will be executed, 39 | // causing this program to exit with a non-zero code. 40 | TEST(HelpFlagTest, ShouldNotBeRun) { 41 | ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified."; 42 | } 43 | 44 | #if GTEST_HAS_DEATH_TEST 45 | TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {} 46 | #endif 47 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/BufferedCameraOV7670_QVGA.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by indrek on 30.04.2016. 3 | // 4 | 5 | #ifndef _BUFFEREDCAMERAOV7670_QVGA_H 6 | #define _BUFFEREDCAMERAOV7670_QVGA_H 7 | 8 | #include "BufferedCameraOV7670.h" 9 | 10 | 11 | // 320 x 240 @ 2.5Hz or less 12 | class BufferedCameraOV7670_QVGA : public BufferedCameraOV7670 { 13 | 14 | public: 15 | enum FramesPerSecond { 16 | FPS_2p5_Hz, 17 | FPS_2_Hz, 18 | FPS_1p66_Hz, 19 | FPS_1p43_Hz, 20 | FPS_1p25_Hz 21 | }; 22 | 23 | 24 | private: 25 | FramesPerSecond framesPerSecond; 26 | 27 | public: 28 | BufferedCameraOV7670_QVGA(PixelFormat format, FramesPerSecond fps) : 29 | BufferedCameraOV7670(Resolution::RESOLUTION_QVGA_320x240, format, getPreScalerForFps(fps)), 30 | framesPerSecond(fps) 31 | {}; 32 | 33 | 34 | void ignoreVerticalPadding() override; 35 | void readLine() override; 36 | 37 | 38 | 39 | private: 40 | static uint8_t getPreScalerForFps(FramesPerSecond fps) { 41 | switch (fps) { 42 | default: 43 | case FPS_2p5_Hz: 44 | return 3; 45 | case FPS_2_Hz: 46 | return 4; 47 | case FPS_1p66_Hz: 48 | return 5; 49 | case FPS_1p43_Hz: 50 | return 6; 51 | case FPS_1p25_Hz: 52 | return 7; 53 | } 54 | } 55 | 56 | }; 57 | 58 | 59 | 60 | 61 | void BufferedCameraOV7670_QVGA::ignoreVerticalPadding() { 62 | if (framesPerSecond == FPS_2p5_Hz) { 63 | for (uint8_t i = 0; i < verticalPadding; i++) { 64 | readLine(); 65 | } 66 | } else { 67 | CameraOV7670::ignoreVerticalPadding(); 68 | } 69 | } 70 | 71 | 72 | void BufferedCameraOV7670_QVGA::readLine() { 73 | 74 | // reading loop is too tight for 2.5Hz to wait for raising clock edge 75 | if (framesPerSecond == FPS_2p5_Hz) { 76 | pixelBuffer.writeBufferPadding = 0; 77 | uint16_t bufferIndex = 0; 78 | 79 | waitForPixelClockLow(); 80 | while (bufferIndex < getPixelBufferLength()) { 81 | readPixelByte(pixelBuffer.writeBuffer[bufferIndex++]); 82 | waitForPixelClockLow(); 83 | readPixelByte(pixelBuffer.writeBuffer[bufferIndex++]); 84 | waitForPixelClockLow(); 85 | } 86 | 87 | } else { 88 | BufferedCameraOV7670::readLine(); 89 | } 90 | 91 | } 92 | 93 | 94 | 95 | 96 | 97 | 98 | #endif //_BUFFEREDCAMERAOV7670_QVGA_H 99 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/src/gtest-all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: mheule@google.com (Markus Heule) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // Sometimes it's desirable to build Google Test by compiling a single file. 35 | // This file serves this purpose. 36 | 37 | // This line ensures that gtest.h can be compiled on its own, even 38 | // when it's fused. 39 | #include "gtest/gtest.h" 40 | 41 | // The following lines pull in the real gtest *.cc files. 42 | #include "src/gtest.cc" 43 | #include "src/gtest-death-test.cc" 44 | #include "src/gtest-filepath.cc" 45 | #include "src/gtest-port.cc" 46 | #include "src/gtest-printers.cc" 47 | #include "src/gtest-test-part.cc" 48 | #include "src/gtest-typed-test.cc" 49 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/production.h: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // This is part of the unit test for include/gtest/gtest_prod.h. 33 | 34 | #ifndef GTEST_TEST_PRODUCTION_H_ 35 | #define GTEST_TEST_PRODUCTION_H_ 36 | 37 | #include "gtest/gtest_prod.h" 38 | 39 | class PrivateCode { 40 | public: 41 | // Declares a friend test that does not use a fixture. 42 | FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers); 43 | 44 | // Declares a friend test that uses a fixture. 45 | FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers); 46 | 47 | PrivateCode(); 48 | 49 | int x() const { return x_; } 50 | private: 51 | void set_x(int an_x) { x_ = an_x; } 52 | int x_; 53 | }; 54 | 55 | #endif // GTEST_TEST_PRODUCTION_H_ 56 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_all_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // Tests for Google C++ Testing Framework (Google Test) 33 | // 34 | // Sometimes it's desirable to build most of Google Test's own tests 35 | // by compiling a single file. This file serves this purpose. 36 | #include "test/gtest-filepath_test.cc" 37 | #include "test/gtest-linked_ptr_test.cc" 38 | #include "test/gtest-message_test.cc" 39 | #include "test/gtest-options_test.cc" 40 | #include "test/gtest-port_test.cc" 41 | #include "test/gtest_pred_impl_unittest.cc" 42 | #include "test/gtest_prod_test.cc" 43 | #include "test/gtest-test-part_test.cc" 44 | #include "test/gtest-typed-test_test.cc" 45 | #include "test/gtest-typed-test2_test.cc" 46 | #include "test/gtest_unittest.cc" 47 | #include "test/production.cc" 48 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_prod_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // Unit test for include/gtest/gtest_prod.h. 33 | 34 | #include "gtest/gtest.h" 35 | #include "test/production.h" 36 | 37 | // Tests that private members can be accessed from a TEST declared as 38 | // a friend of the class. 39 | TEST(PrivateCodeTest, CanAccessPrivateMembers) { 40 | PrivateCode a; 41 | EXPECT_EQ(0, a.x_); 42 | 43 | a.set_x(1); 44 | EXPECT_EQ(1, a.x_); 45 | } 46 | 47 | typedef testing::Test PrivateCodeFixtureTest; 48 | 49 | // Tests that private members can be accessed from a TEST_F declared 50 | // as a friend of the class. 51 | TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) { 52 | PrivateCode a; 53 | EXPECT_EQ(0, a.x_); 54 | 55 | a.set_x(2); 56 | EXPECT_EQ(2, a.x_); 57 | } 58 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_sole_header_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: mheule@google.com (Markus Heule) 31 | // 32 | // This test verifies that it's possible to use Google Test by including 33 | // the gtest.h header file alone. 34 | 35 | #include "gtest/gtest.h" 36 | 37 | namespace { 38 | 39 | void Subroutine() { 40 | EXPECT_EQ(42, 42); 41 | } 42 | 43 | TEST(NoFatalFailureTest, ExpectNoFatalFailure) { 44 | EXPECT_NO_FATAL_FAILURE(;); 45 | EXPECT_NO_FATAL_FAILURE(SUCCEED()); 46 | EXPECT_NO_FATAL_FAILURE(Subroutine()); 47 | EXPECT_NO_FATAL_FAILURE({ SUCCEED(); }); 48 | } 49 | 50 | TEST(NoFatalFailureTest, AssertNoFatalFailure) { 51 | ASSERT_NO_FATAL_FAILURE(;); 52 | ASSERT_NO_FATAL_FAILURE(SUCCEED()); 53 | ASSERT_NO_FATAL_FAILURE(Subroutine()); 54 | ASSERT_NO_FATAL_FAILURE({ SUCCEED(); }); 55 | } 56 | 57 | } // namespace 58 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample2.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #include "sample2.h" 35 | 36 | #include 37 | 38 | // Clones a 0-terminated C string, allocating memory using new. 39 | const char* MyString::CloneCString(const char* a_c_string) { 40 | if (a_c_string == NULL) return NULL; 41 | 42 | const size_t len = strlen(a_c_string); 43 | char* const clone = new char[ len + 1 ]; 44 | memcpy(clone, a_c_string, len + 1); 45 | 46 | return clone; 47 | } 48 | 49 | // Sets the 0-terminated C string this MyString object 50 | // represents. 51 | void MyString::Set(const char* a_c_string) { 52 | // Makes sure this works when c_string == c_string_ 53 | const char* const temp = MyString::CloneCString(a_c_string); 54 | delete[] c_string_; 55 | c_string_ = temp; 56 | } 57 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Samples/FrameworkSample/widget.h: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: preston.a.jackson@gmail.com (Preston Jackson) 31 | // 32 | // Google Test - FrameworkSample 33 | // widget.h 34 | // 35 | 36 | // Widget is a very simple class used for demonstrating the use of gtest. It 37 | // simply stores two values a string and an integer, which are returned via 38 | // public accessors in multiple forms. 39 | 40 | #import 41 | 42 | class Widget { 43 | public: 44 | Widget(int number, const std::string& name); 45 | ~Widget(); 46 | 47 | // Public accessors to number data 48 | float GetFloatValue() const; 49 | int GetIntValue() const; 50 | 51 | // Public accessors to the string data 52 | std::string GetStringValue() const; 53 | void GetCharPtrValue(char* buffer, size_t max_size) const; 54 | 55 | private: 56 | // Data members 57 | float number_; 58 | std::string name_; 59 | }; 60 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/msvc/gtest.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "gtest_main.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862032}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | EndProjectSection 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest", "gtest_unittest.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}" 11 | ProjectSection(ProjectDependencies) = postProject 12 | EndProjectSection 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test", "gtest_prod_test.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}" 15 | ProjectSection(ProjectDependencies) = postProject 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfiguration) = preSolution 20 | Debug = Debug 21 | Release = Release 22 | EndGlobalSection 23 | GlobalSection(ProjectConfiguration) = postSolution 24 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.ActiveCfg = Debug|Win32 25 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.Build.0 = Debug|Win32 26 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.ActiveCfg = Release|Win32 27 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.Build.0 = Release|Win32 28 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.ActiveCfg = Debug|Win32 29 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.Build.0 = Debug|Win32 30 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.ActiveCfg = Release|Win32 31 | {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.Build.0 = Release|Win32 32 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.ActiveCfg = Debug|Win32 33 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.Build.0 = Debug|Win32 34 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.ActiveCfg = Release|Win32 35 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.Build.0 = Release|Win32 36 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.ActiveCfg = Debug|Win32 37 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.Build.0 = Debug|Win32 38 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.ActiveCfg = Release|Win32 39 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.Build.0 = Release|Win32 40 | EndGlobalSection 41 | GlobalSection(ExtensibilityGlobals) = postSolution 42 | EndGlobalSection 43 | GlobalSection(ExtensibilityAddIns) = postSolution 44 | EndGlobalSection 45 | EndGlobal 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/include/gtest/gtest_prod.h: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // Google C++ Testing Framework definitions useful in production code. 33 | 34 | #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 35 | #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 36 | 37 | // When you need to test the private or protected members of a class, 38 | // use the FRIEND_TEST macro to declare your tests as friends of the 39 | // class. For example: 40 | // 41 | // class MyClass { 42 | // private: 43 | // void MyMethod(); 44 | // FRIEND_TEST(MyClassTest, MyMethod); 45 | // }; 46 | // 47 | // class MyClassTest : public testing::Test { 48 | // // ... 49 | // }; 50 | // 51 | // TEST_F(MyClassTest, MyMethod) { 52 | // // Can call MyClass::MyMethod() here. 53 | // } 54 | 55 | #define FRIEND_TEST(test_case_name, test_name)\ 56 | friend class test_case_name##_##test_name##_Test 57 | 58 | #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 59 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/msvc/gtest-md.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "gtest-md.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main-md", "gtest_main-md.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862033}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | EndProjectSection 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test-md", "gtest_prod_test-md.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}" 11 | ProjectSection(ProjectDependencies) = postProject 12 | EndProjectSection 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest-md", "gtest_unittest-md.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}" 15 | ProjectSection(ProjectDependencies) = postProject 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfiguration) = preSolution 20 | Debug = Debug 21 | Release = Release 22 | EndGlobalSection 23 | GlobalSection(ProjectConfiguration) = postSolution 24 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.ActiveCfg = Debug|Win32 25 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.Build.0 = Debug|Win32 26 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.ActiveCfg = Release|Win32 27 | {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.Build.0 = Release|Win32 28 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.ActiveCfg = Debug|Win32 29 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.Build.0 = Debug|Win32 30 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.ActiveCfg = Release|Win32 31 | {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.Build.0 = Release|Win32 32 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.ActiveCfg = Debug|Win32 33 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.Build.0 = Debug|Win32 34 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.ActiveCfg = Release|Win32 35 | {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.Build.0 = Release|Win32 36 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.ActiveCfg = Debug|Win32 37 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.Build.0 = Debug|Win32 38 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.ActiveCfg = Release|Win32 39 | {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.Build.0 = Release|Win32 40 | EndGlobalSection 41 | GlobalSection(ExtensibilityGlobals) = postSolution 42 | EndGlobalSection 43 | GlobalSection(ExtensibilityAddIns) = postSolution 44 | EndGlobalSection 45 | EndGlobal 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest-param-test_test.h: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Authors: vladl@google.com (Vlad Losev) 31 | // 32 | // The Google C++ Testing Framework (Google Test) 33 | // 34 | // This header file provides classes and functions used internally 35 | // for testing Google Test itself. 36 | 37 | #ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ 38 | #define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ 39 | 40 | #include "gtest/gtest.h" 41 | 42 | #if GTEST_HAS_PARAM_TEST 43 | 44 | // Test fixture for testing definition and instantiation of a test 45 | // in separate translation units. 46 | class ExternalInstantiationTest : public ::testing::TestWithParam { 47 | }; 48 | 49 | // Test fixture for testing instantiation of a test in multiple 50 | // translation units. 51 | class InstantiationInMultipleTranslaionUnitsTest 52 | : public ::testing::TestWithParam { 53 | }; 54 | 55 | #endif // GTEST_HAS_PARAM_TEST 56 | 57 | #endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_ 58 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Samples/FrameworkSample/widget.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: preston.a.jackson@gmail.com (Preston Jackson) 31 | // 32 | // Google Test - FrameworkSample 33 | // widget.cc 34 | // 35 | 36 | // Widget is a very simple class used for demonstrating the use of gtest 37 | 38 | #include "widget.h" 39 | 40 | Widget::Widget(int number, const std::string& name) 41 | : number_(number), 42 | name_(name) {} 43 | 44 | Widget::~Widget() {} 45 | 46 | float Widget::GetFloatValue() const { 47 | return number_; 48 | } 49 | 50 | int Widget::GetIntValue() const { 51 | return static_cast(number_); 52 | } 53 | 54 | std::string Widget::GetStringValue() const { 55 | return name_; 56 | } 57 | 58 | void Widget::GetCharPtrValue(char* buffer, size_t max_size) const { 59 | // Copy the char* representation of name_ into buffer, up to max_size. 60 | strncpy(buffer, name_.c_str(), max_size-1); 61 | buffer[max_size-1] = '\0'; 62 | return; 63 | } 64 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Samples/FrameworkSample/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2008, Google Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | # Executes the samples and tests for the Google Test Framework. 33 | 34 | # Help the dynamic linker find the path to the libraries. 35 | export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR 36 | export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR 37 | 38 | # Create some executables. 39 | test_executables=$@ 40 | 41 | # Now execute each one in turn keeping track of how many succeeded and failed. 42 | succeeded=0 43 | failed=0 44 | failed_list=() 45 | for test in ${test_executables[*]}; do 46 | "$test" 47 | result=$? 48 | if [ $result -eq 0 ]; then 49 | succeeded=$(( $succeeded + 1 )) 50 | else 51 | failed=$(( failed + 1 )) 52 | failed_list="$failed_list $test" 53 | fi 54 | done 55 | 56 | # Report the successes and failures to the console. 57 | echo "Tests complete with $succeeded successes and $failed failures." 58 | if [ $failed -ne 0 ]; then 59 | echo "The following tests failed:" 60 | echo $failed_list 61 | fi 62 | exit $failed 63 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_no_test_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Tests that a Google Test program that has no test defined can run 31 | // successfully. 32 | // 33 | // Author: wan@google.com (Zhanyong Wan) 34 | 35 | #include "gtest/gtest.h" 36 | 37 | int main(int argc, char **argv) { 38 | testing::InitGoogleTest(&argc, argv); 39 | 40 | // An ad-hoc assertion outside of all tests. 41 | // 42 | // This serves three purposes: 43 | // 44 | // 1. It verifies that an ad-hoc assertion can be executed even if 45 | // no test is defined. 46 | // 2. It verifies that a failed ad-hoc assertion causes the test 47 | // program to fail. 48 | // 3. We had a bug where the XML output won't be generated if an 49 | // assertion is executed before RUN_ALL_TESTS() is called, even 50 | // though --gtest_output=xml is specified. This makes sure the 51 | // bug is fixed and doesn't regress. 52 | EXPECT_EQ(1, 2); 53 | 54 | // The above EXPECT_EQ() should cause RUN_ALL_TESTS() to return non-zero. 55 | return RUN_ALL_TESTS() ? 0 : 1; 56 | } 57 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest-typed-test_test.h: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ 33 | #define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ 34 | 35 | #include "gtest/gtest.h" 36 | 37 | #if GTEST_HAS_TYPED_TEST_P 38 | 39 | using testing::Test; 40 | 41 | // For testing that the same type-parameterized test case can be 42 | // instantiated in different translation units linked together. 43 | // ContainerTest will be instantiated in both gtest-typed-test_test.cc 44 | // and gtest-typed-test2_test.cc. 45 | 46 | template 47 | class ContainerTest : public Test { 48 | }; 49 | 50 | TYPED_TEST_CASE_P(ContainerTest); 51 | 52 | TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) { 53 | TypeParam container; 54 | } 55 | 56 | TYPED_TEST_P(ContainerTest, InitialSizeIsZero) { 57 | TypeParam container; 58 | EXPECT_EQ(0U, container.size()); 59 | } 60 | 61 | REGISTER_TYPED_TEST_CASE_P(ContainerTest, 62 | CanBeDefaultConstructed, InitialSizeIsZero); 63 | 64 | #endif // GTEST_HAS_TYPED_TEST_P 65 | 66 | #endif // GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ 67 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample1.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #include "sample1.h" 35 | 36 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 37 | int Factorial(int n) { 38 | int result = 1; 39 | for (int i = 1; i <= n; i++) { 40 | result *= i; 41 | } 42 | 43 | return result; 44 | } 45 | 46 | // Returns true iff n is a prime number. 47 | bool IsPrime(int n) { 48 | // Trivial case 1: small numbers 49 | if (n <= 1) return false; 50 | 51 | // Trivial case 2: even numbers 52 | if (n % 2 == 0) return n == 2; 53 | 54 | // Now, we have that n is odd and n >= 3. 55 | 56 | // Try to divide n by every odd number i, starting from 3 57 | for (int i = 3; ; i += 2) { 58 | // We only have to try i up to the squre root of n 59 | if (i > n/i) break; 60 | 61 | // Now, we have i <= n/i < n. 62 | // If n is divisible by i, n is not prime. 63 | if (n % i == 0) return false; 64 | } 65 | 66 | // n has no integer factor in the range (1, n), and thus is prime. 67 | return true; 68 | } 69 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_uninitialized_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2008, Google Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | """Verifies that Google Test warns the user when not initialized properly.""" 33 | 34 | __author__ = 'wan@google.com (Zhanyong Wan)' 35 | 36 | import gtest_test_utils 37 | 38 | 39 | COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_') 40 | 41 | 42 | def Assert(condition): 43 | if not condition: 44 | raise AssertionError 45 | 46 | 47 | def AssertEq(expected, actual): 48 | if expected != actual: 49 | print('Expected: %s' % (expected,)) 50 | print(' Actual: %s' % (actual,)) 51 | raise AssertionError 52 | 53 | 54 | def TestExitCodeAndOutput(command): 55 | """Runs the given command and verifies its exit code and output.""" 56 | 57 | # Verifies that 'command' exits with code 1. 58 | p = gtest_test_utils.Subprocess(command) 59 | Assert(p.exited) 60 | AssertEq(1, p.exit_code) 61 | Assert('InitGoogleTest' in p.output) 62 | 63 | 64 | class GTestUninitializedTest(gtest_test_utils.TestCase): 65 | def testExitCodeAndOutput(self): 66 | TestExitCodeAndOutput(COMMAND) 67 | 68 | 69 | if __name__ == '__main__': 70 | gtest_test_utils.Main() 71 | -------------------------------------------------------------------------------- /pcb/livecam/LibMod/Indrek/DcDc5VUp.pretty/DcDc5VUp.kicad_mod: -------------------------------------------------------------------------------- 1 | (module DcDc5VUp (layer F.Cu) (tedit 5782B25D) 2 | (descr "Through hole pin header") 3 | (tags "pin header") 4 | (fp_text reference REF** (at -0.7 21.5) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value DC_DC_5V_UP (at 8.6 11.7 90) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_text user OUT- (at -9.1 3.3 90) (layer F.SilkS) 11 | (effects (font (size 1 1) (thickness 0.15))) 12 | ) 13 | (fp_text user OUT+ (at 8.7 3.1 90) (layer F.SilkS) 14 | (effects (font (size 1 1) (thickness 0.15))) 15 | ) 16 | (fp_text user IN- (at 8.9 20.5 90) (layer F.SilkS) 17 | (effects (font (size 1 1) (thickness 0.15))) 18 | ) 19 | (fp_text user IN+ (at -9.1 20.4 90) (layer F.SilkS) 20 | (effects (font (size 1 1) (thickness 0.15))) 21 | ) 22 | (fp_line (start -5.07 1.57) (end -5.07 4.25) (layer F.SilkS) (width 0.15)) 23 | (fp_line (start -5.07 4.25) (end -2.53 4.25) (layer F.SilkS) (width 0.15)) 24 | (fp_line (start -2.53 4.25) (end -2.53 1.57) (layer F.SilkS) (width 0.15)) 25 | (fp_line (start -2.53 1.57) (end -5.07 1.57) (layer F.SilkS) (width 0.15)) 26 | (fp_line (start 5.07 1.57) (end 2.53 1.57) (layer F.SilkS) (width 0.15)) 27 | (fp_line (start 5.07 4.25) (end 5.07 1.57) (layer F.SilkS) (width 0.15)) 28 | (fp_line (start 2.53 4.25) (end 5.07 4.25) (layer F.SilkS) (width 0.15)) 29 | (fp_line (start 2.53 1.57) (end 2.53 4.25) (layer F.SilkS) (width 0.15)) 30 | (fp_line (start 5.03 19.17) (end 5.03 21.85) (layer F.SilkS) (width 0.15)) 31 | (fp_line (start 5.03 21.85) (end 7.57 21.85) (layer F.SilkS) (width 0.15)) 32 | (fp_line (start 7.57 21.85) (end 7.57 19.17) (layer F.SilkS) (width 0.15)) 33 | (fp_line (start 7.57 19.17) (end 5.03 19.17) (layer F.SilkS) (width 0.15)) 34 | (fp_line (start -4.75 20.55) (end -4.75 22.1) (layer F.SilkS) (width 0.15)) 35 | (fp_line (start -7.85 22) (end -7.85 20.45) (layer F.SilkS) (width 0.15)) 36 | (fp_line (start -7.85 22.05) (end -4.75 22.05) (layer F.SilkS) (width 0.15)) 37 | (fp_line (start -10.05 22.3) (end 9.75 22.3) (layer F.CrtYd) (width 0.05)) 38 | (fp_line (start -10.05 0.85) (end 9.75 0.85) (layer F.CrtYd) (width 0.05)) 39 | (fp_line (start 9.75 0.85) (end 9.75 22.3) (layer F.CrtYd) (width 0.05)) 40 | (fp_line (start -10.05 0.85) (end -10.05 22.3) (layer F.CrtYd) (width 0.05)) 41 | (pad 4 thru_hole oval (at -3.8 2.84) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 42 | (pad 3 thru_hole oval (at 3.8 2.84) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 43 | (pad 2 thru_hole oval (at 6.3 20.44) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 44 | (pad 1 thru_hole rect (at -6.3 20.4) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 45 | ) 46 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/configure.ac: -------------------------------------------------------------------------------- 1 | m4_include(m4/acx_pthread.m4) 2 | 3 | # At this point, the Xcode project assumes the version string will be three 4 | # integers separated by periods and surrounded by square brackets (e.g. 5 | # "[1.0.1]"). It also asumes that there won't be any closing parenthesis 6 | # between "AC_INIT(" and the closing ")" including comments and strings. 7 | AC_INIT([Google C++ Testing Framework], 8 | [1.7.0], 9 | [googletestframework@googlegroups.com], 10 | [gtest]) 11 | 12 | # Provide various options to initialize the Autoconf and configure processes. 13 | AC_PREREQ([2.59]) 14 | AC_CONFIG_SRCDIR([./LICENSE]) 15 | AC_CONFIG_MACRO_DIR([m4]) 16 | AC_CONFIG_AUX_DIR([build-aux]) 17 | AC_CONFIG_HEADERS([build-aux/config.h]) 18 | AC_CONFIG_FILES([Makefile]) 19 | AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config]) 20 | 21 | # Initialize Automake with various options. We require at least v1.9, prevent 22 | # pedantic complaints about package files, and enable various distribution 23 | # targets. 24 | AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) 25 | 26 | # Check for programs used in building Google Test. 27 | AC_PROG_CC 28 | AC_PROG_CXX 29 | AC_LANG([C++]) 30 | AC_PROG_LIBTOOL 31 | 32 | # TODO(chandlerc@google.com): Currently we aren't running the Python tests 33 | # against the interpreter detected by AM_PATH_PYTHON, and so we condition 34 | # HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's 35 | # version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" 36 | # hashbang. 37 | PYTHON= # We *do not* allow the user to specify a python interpreter 38 | AC_PATH_PROG([PYTHON],[python],[:]) 39 | AS_IF([test "$PYTHON" != ":"], 40 | [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) 41 | AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) 42 | 43 | # Configure pthreads. 44 | AC_ARG_WITH([pthreads], 45 | [AS_HELP_STRING([--with-pthreads], 46 | [use pthreads (default is yes)])], 47 | [with_pthreads=$withval], 48 | [with_pthreads=check]) 49 | 50 | have_pthreads=no 51 | AS_IF([test "x$with_pthreads" != "xno"], 52 | [ACX_PTHREAD( 53 | [], 54 | [AS_IF([test "x$with_pthreads" != "xcheck"], 55 | [AC_MSG_FAILURE( 56 | [--with-pthreads was specified, but unable to be used])])]) 57 | have_pthreads="$acx_pthread_ok"]) 58 | AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" = "xyes"]) 59 | AC_SUBST(PTHREAD_CFLAGS) 60 | AC_SUBST(PTHREAD_LIBS) 61 | 62 | # TODO(chandlerc@google.com) Check for the necessary system headers. 63 | 64 | # TODO(chandlerc@google.com) Check the types, structures, and other compiler 65 | # and architecture characteristics. 66 | 67 | # Output the generated files. No further autoconf macros may be used. 68 | AC_OUTPUT 69 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Scripts/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2008, Google Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | # Executes the samples and tests for the Google Test Framework. 33 | 34 | # Help the dynamic linker find the path to the libraries. 35 | export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR 36 | export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR 37 | 38 | # Create some executables. 39 | test_executables=("$BUILT_PRODUCTS_DIR/gtest_unittest-framework" 40 | "$BUILT_PRODUCTS_DIR/gtest_unittest" 41 | "$BUILT_PRODUCTS_DIR/sample1_unittest-framework" 42 | "$BUILT_PRODUCTS_DIR/sample1_unittest-static") 43 | 44 | # Now execute each one in turn keeping track of how many succeeded and failed. 45 | succeeded=0 46 | failed=0 47 | failed_list=() 48 | for test in ${test_executables[*]}; do 49 | "$test" 50 | result=$? 51 | if [ $result -eq 0 ]; then 52 | succeeded=$(( $succeeded + 1 )) 53 | else 54 | failed=$(( failed + 1 )) 55 | failed_list="$failed_list $test" 56 | fi 57 | done 58 | 59 | # Report the successes and failures to the console. 60 | echo "Tests complete with $succeeded successes and $failed failures." 61 | if [ $failed -ne 0 ]; then 62 | echo "The following tests failed:" 63 | echo $failed_list 64 | fi 65 | exit $failed 66 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/xcode/Samples/FrameworkSample/widget_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: preston.a.jackson@gmail.com (Preston Jackson) 31 | // 32 | // Google Test - FrameworkSample 33 | // widget_test.cc 34 | // 35 | 36 | // This is a simple test file for the Widget class in the Widget.framework 37 | 38 | #include 39 | #include "gtest/gtest.h" 40 | 41 | #include 42 | 43 | // This test verifies that the constructor sets the internal state of the 44 | // Widget class correctly. 45 | TEST(WidgetInitializerTest, TestConstructor) { 46 | Widget widget(1.0f, "name"); 47 | EXPECT_FLOAT_EQ(1.0f, widget.GetFloatValue()); 48 | EXPECT_EQ(std::string("name"), widget.GetStringValue()); 49 | } 50 | 51 | // This test verifies the conversion of the float and string values to int and 52 | // char*, respectively. 53 | TEST(WidgetInitializerTest, TestConversion) { 54 | Widget widget(1.0f, "name"); 55 | EXPECT_EQ(1, widget.GetIntValue()); 56 | 57 | size_t max_size = 128; 58 | char buffer[max_size]; 59 | widget.GetCharPtrValue(buffer, max_size); 60 | EXPECT_STREQ("name", buffer); 61 | } 62 | 63 | // Use the Google Test main that is linked into the framework. It does something 64 | // like this: 65 | // int main(int argc, char** argv) { 66 | // testing::InitGoogleTest(&argc, argv); 67 | // return RUN_ALL_TESTS(); 68 | // } 69 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/make/Makefile: -------------------------------------------------------------------------------- 1 | # A sample Makefile for building Google Test and using it in user 2 | # tests. Please tweak it to suit your environment and project. You 3 | # may want to move it to your project's root directory. 4 | # 5 | # SYNOPSIS: 6 | # 7 | # make [all] - makes everything. 8 | # make TARGET - makes the given target. 9 | # make clean - removes all files generated by make. 10 | 11 | # Please tweak the following variable definitions as needed by your 12 | # project, except GTEST_HEADERS, which you can use in your own targets 13 | # but shouldn't modify. 14 | 15 | # Points to the root of Google Test, relative to where this file is. 16 | # Remember to tweak this if you move this file. 17 | GTEST_DIR = .. 18 | 19 | # Where to find user code. 20 | USER_DIR = ../samples 21 | 22 | # Flags passed to the preprocessor. 23 | # Set Google Test's header directory as a system directory, such that 24 | # the compiler doesn't generate warnings in Google Test headers. 25 | CPPFLAGS += -isystem $(GTEST_DIR)/include 26 | 27 | # Flags passed to the C++ compiler. 28 | CXXFLAGS += -g -Wall -Wextra -pthread 29 | 30 | # All tests produced by this Makefile. Remember to add new tests you 31 | # created to the list. 32 | TESTS = sample1_unittest 33 | 34 | # All Google Test headers. Usually you shouldn't change this 35 | # definition. 36 | GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \ 37 | $(GTEST_DIR)/include/gtest/internal/*.h 38 | 39 | # House-keeping build targets. 40 | 41 | all : $(TESTS) 42 | 43 | clean : 44 | rm -f $(TESTS) gtest.a gtest_main.a *.o 45 | 46 | # Builds gtest.a and gtest_main.a. 47 | 48 | # Usually you shouldn't tweak such internal variables, indicated by a 49 | # trailing _. 50 | GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) 51 | 52 | # For simplicity and to avoid depending on Google Test's 53 | # implementation details, the dependencies specified below are 54 | # conservative and not optimized. This is fine as Google Test 55 | # compiles fast and for ordinary users its source rarely changes. 56 | gtest-all.o : $(GTEST_SRCS_) 57 | $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \ 58 | $(GTEST_DIR)/src/gtest-all.cc 59 | 60 | gtest_main.o : $(GTEST_SRCS_) 61 | $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \ 62 | $(GTEST_DIR)/src/gtest_main.cc 63 | 64 | gtest.a : gtest-all.o 65 | $(AR) $(ARFLAGS) $@ $^ 66 | 67 | gtest_main.a : gtest-all.o gtest_main.o 68 | $(AR) $(ARFLAGS) $@ $^ 69 | 70 | # Builds a sample test. A test should link with either gtest.a or 71 | # gtest_main.a, depending on whether it defines its own main() 72 | # function. 73 | 74 | sample1.o : $(USER_DIR)/sample1.cc $(USER_DIR)/sample1.h $(GTEST_HEADERS) 75 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1.cc 76 | 77 | sample1_unittest.o : $(USER_DIR)/sample1_unittest.cc \ 78 | $(USER_DIR)/sample1.h $(GTEST_HEADERS) 79 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample1_unittest.cc 80 | 81 | sample1_unittest : sample1.o sample1_unittest.o gtest_main.a 82 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ 83 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/gerber/kaamera_ja_ekraan-F.SilkS.gto: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Legend,Top* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.2-stable) date 21.04.2016 21:16:34* 5 | %MOMM*% 6 | G01* 7 | G04 APERTURE LIST* 8 | %ADD10C,0.100000*% 9 | %ADD11C,0.381000*% 10 | %ADD12C,0.150000*% 11 | %ADD13C,0.304800*% 12 | G04 APERTURE END LIST* 13 | D10* 14 | D11* 15 | X162814000Y-95504000D02* 16 | X119634000Y-95504000D01* 17 | X119634000Y-95504000D02* 18 | X119634000Y-82804000D01* 19 | X119634000Y-82804000D02* 20 | X162814000Y-82804000D01* 21 | X162814000Y-82804000D02* 22 | X162814000Y-95504000D01* 23 | X162814000Y-87884000D02* 24 | X161544000Y-87884000D01* 25 | X161544000Y-87884000D02* 26 | X161544000Y-90424000D01* 27 | X161544000Y-90424000D02* 28 | X162814000Y-90424000D01* 29 | D12* 30 | X124714000Y-106172000D02* 31 | X142494000Y-106172000D01* 32 | X142494000Y-106172000D02* 33 | X142494000Y-108712000D01* 34 | X142494000Y-108712000D02* 35 | X124714000Y-108712000D01* 36 | X121894000Y-105892000D02* 37 | X123444000Y-105892000D01* 38 | X124714000Y-106172000D02* 39 | X124714000Y-108712000D01* 40 | X123444000Y-108992000D02* 41 | X121894000Y-108992000D01* 42 | X121894000Y-108992000D02* 43 | X121894000Y-105892000D01* 44 | D13* 45 | X150876001Y-93260333D02* 46 | X151722667Y-93260333D01* 47 | X150706667Y-93768333D02* 48 | X151299334Y-91990333D01* 49 | X151892001Y-93768333D01* 50 | X153500667Y-93768333D02* 51 | X152908001Y-92921667D01* 52 | X152484667Y-93768333D02* 53 | X152484667Y-91990333D01* 54 | X153162001Y-91990333D01* 55 | X153331334Y-92075000D01* 56 | X153416001Y-92159667D01* 57 | X153500667Y-92329000D01* 58 | X153500667Y-92583000D01* 59 | X153416001Y-92752333D01* 60 | X153331334Y-92837000D01* 61 | X153162001Y-92921667D01* 62 | X152484667Y-92921667D01* 63 | X154262667Y-93768333D02* 64 | X154262667Y-91990333D01* 65 | X154686001Y-91990333D01* 66 | X154940001Y-92075000D01* 67 | X155109334Y-92244333D01* 68 | X155194001Y-92413667D01* 69 | X155278667Y-92752333D01* 70 | X155278667Y-93006333D01* 71 | X155194001Y-93345000D01* 72 | X155109334Y-93514333D01* 73 | X154940001Y-93683667D01* 74 | X154686001Y-93768333D01* 75 | X154262667Y-93768333D01* 76 | X156972001Y-93768333D02* 77 | X155956001Y-93768333D01* 78 | X156464001Y-93768333D02* 79 | X156464001Y-91990333D01* 80 | X156294667Y-92244333D01* 81 | X156125334Y-92413667D01* 82 | X155956001Y-92498333D01* 83 | D12* 84 | X139906571Y-104608381D02* 85 | X140478000Y-104608381D01* 86 | X140192285Y-105608381D02* 87 | X140192285Y-104608381D01* 88 | X141144667Y-105084571D02* 89 | X140811333Y-105084571D01* 90 | X140811333Y-105608381D02* 91 | X140811333Y-104608381D01* 92 | X141287524Y-104608381D01* 93 | X141525619Y-104608381D02* 94 | X142097048Y-104608381D01* 95 | X141811333Y-105608381D02* 96 | X141811333Y-104608381D01* 97 | X142954191Y-105608381D02* 98 | X142382762Y-105608381D01* 99 | X142668476Y-105608381D02* 100 | X142668476Y-104608381D01* 101 | X142573238Y-104751238D01* 102 | X142478000Y-104846476D01* 103 | X142382762Y-104894095D01* 104 | M02* 105 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/gerber/kaamera_ja_ekraan-F.Mask.gts: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Top* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.2-stable) date 21.04.2016 21:16:34* 5 | %MOMM*% 6 | G01* 7 | G04 APERTURE LIST* 8 | %ADD10C,0.100000*% 9 | %ADD11R,1.574800X2.286000*% 10 | %ADD12O,1.574800X2.286000*% 11 | %ADD13O,1.727200X2.032000*% 12 | %ADD14R,1.727200X2.032000*% 13 | %ADD15R,1.727200X1.727200*% 14 | %ADD16O,1.727200X1.727200*% 15 | G04 APERTURE END LIST* 16 | D10* 17 | D11* 18 | X159004000Y-81534000D03* 19 | D12* 20 | X156464000Y-81534000D03* 21 | X153924000Y-81534000D03* 22 | X151384000Y-81534000D03* 23 | X148844000Y-81534000D03* 24 | X146304000Y-81534000D03* 25 | X143764000Y-81534000D03* 26 | X141224000Y-81534000D03* 27 | X138684000Y-81534000D03* 28 | X136144000Y-81534000D03* 29 | X133604000Y-81534000D03* 30 | X131064000Y-81534000D03* 31 | X128524000Y-81534000D03* 32 | X125984000Y-81534000D03* 33 | X123444000Y-81534000D03* 34 | X123444000Y-96774000D03* 35 | X125984000Y-96774000D03* 36 | X128524000Y-96774000D03* 37 | X131064000Y-96774000D03* 38 | X133604000Y-96774000D03* 39 | X136144000Y-96774000D03* 40 | X138684000Y-96774000D03* 41 | X141224000Y-96774000D03* 42 | X143764000Y-96774000D03* 43 | X146304000Y-96774000D03* 44 | X148844000Y-96774000D03* 45 | X151384000Y-96774000D03* 46 | X153924000Y-96774000D03* 47 | X156464000Y-96774000D03* 48 | X159004000Y-96774000D03* 49 | D13* 50 | X146050000Y-112522000D03* 51 | X158750000Y-102362000D03* 52 | X156210000Y-102362000D03* 53 | X153670000Y-102362000D03* 54 | X151130000Y-102362000D03* 55 | X148590000Y-102362000D03* 56 | D14* 57 | X146050000Y-102362000D03* 58 | D13* 59 | X148590000Y-112522000D03* 60 | X151130000Y-112522000D03* 61 | X153670000Y-112522000D03* 62 | X156210000Y-112522000D03* 63 | X158750000Y-112522000D03* 64 | X123444000Y-112522000D03* 65 | X136144000Y-102362000D03* 66 | X133604000Y-102362000D03* 67 | X131064000Y-102362000D03* 68 | X128524000Y-102362000D03* 69 | X125984000Y-102362000D03* 70 | D14* 71 | X123444000Y-102362000D03* 72 | D13* 73 | X125984000Y-112522000D03* 74 | X128524000Y-112522000D03* 75 | X131064000Y-112522000D03* 76 | X133604000Y-112522000D03* 77 | X136144000Y-112522000D03* 78 | D15* 79 | X143764000Y-90932000D03* 80 | D16* 81 | X143764000Y-88392000D03* 82 | X141224000Y-90932000D03* 83 | X141224000Y-88392000D03* 84 | X138684000Y-90932000D03* 85 | X138684000Y-88392000D03* 86 | X136144000Y-90932000D03* 87 | X136144000Y-88392000D03* 88 | X133604000Y-90932000D03* 89 | X133604000Y-88392000D03* 90 | X131064000Y-90932000D03* 91 | X131064000Y-88392000D03* 92 | X128524000Y-90932000D03* 93 | X128524000Y-88392000D03* 94 | X125984000Y-90932000D03* 95 | X125984000Y-88392000D03* 96 | X123444000Y-90932000D03* 97 | X123444000Y-88392000D03* 98 | D14* 99 | X123444000Y-107442000D03* 100 | D13* 101 | X125984000Y-107442000D03* 102 | X128524000Y-107442000D03* 103 | X131064000Y-107442000D03* 104 | X133604000Y-107442000D03* 105 | X136144000Y-107442000D03* 106 | X138684000Y-107442000D03* 107 | X141224000Y-107442000D03* 108 | M02* 109 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest-param-test2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: vladl@google.com (Vlad Losev) 31 | // 32 | // Tests for Google Test itself. This verifies that the basic constructs of 33 | // Google Test work. 34 | 35 | #include "gtest/gtest.h" 36 | 37 | #include "test/gtest-param-test_test.h" 38 | 39 | #if GTEST_HAS_PARAM_TEST 40 | 41 | using ::testing::Values; 42 | using ::testing::internal::ParamGenerator; 43 | 44 | // Tests that generators defined in a different translation unit 45 | // are functional. The test using extern_gen is defined 46 | // in gtest-param-test_test.cc. 47 | ParamGenerator extern_gen = Values(33); 48 | 49 | // Tests that a parameterized test case can be defined in one translation unit 50 | // and instantiated in another. The test is defined in gtest-param-test_test.cc 51 | // and ExternalInstantiationTest fixture class is defined in 52 | // gtest-param-test_test.h. 53 | INSTANTIATE_TEST_CASE_P(MultiplesOf33, 54 | ExternalInstantiationTest, 55 | Values(33, 66)); 56 | 57 | // Tests that a parameterized test case can be instantiated 58 | // in multiple translation units. Another instantiation is defined 59 | // in gtest-param-test_test.cc and InstantiationInMultipleTranslaionUnitsTest 60 | // fixture is defined in gtest-param-test_test.h 61 | INSTANTIATE_TEST_CASE_P(Sequence2, 62 | InstantiationInMultipleTranslaionUnitsTest, 63 | Values(42*3, 42*4, 42*5)); 64 | 65 | #endif // GTEST_HAS_PARAM_TEST 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LiveOV7670 2 | 3 | Demo: 4 | https://www.youtube.com/watch?v=TqSY6FETuos&list=PLVilroPGLJaesaS5mP93i0goPck2JK-O4&index=2 5 | 6 | Step-by-step guide with pictures: 7 | https://circuitjournal.com/arduino-ov7670-10fps 8 | 9 | Tutorial 1 (10fps video stream to a display): 10 | https://www.youtube.com/watch?v=Dp3RMb0e1eA&index=3&list=PLVilroPGLJaesaS5mP93i0goPck2JK-O4 11 | Tutorial 2 (sending image to the PC over the USB cable): 12 | https://www.youtube.com/watch?v=L9DTW1ulsT0&index=5&list=PLVilroPGLJaesaS5mP93i0goPck2JK-O4 13 | 14 | Datasheet for OV7670: 15 | https://www.voti.nl/docs/OV7670.pdf 16 | 17 | ------------------------------------------------------------------------------- 18 | 19 | Compiling in Arduino IDE: 20 | 21 | 1. Download all files 22 | 2. copy "src/lib/LiveOV7670Library" and "src/lib/Adafruit_GFX_Library" to Arduino "libraries" folder (If you already have "Adafruit_GFX_Library" then you don't have to copy that) 23 | 3. Open "src/LiveOV7670/LiveOV7670.ino" in Arduino IDE 24 | 4. Select Tools->Board->Arduino Uno/Nano 25 | 26 | ------------------------------------------------------------------------------- 27 | 28 | Connection shcema for the PCB board: 29 | https://raw.githubusercontent.com/indrekluuk/LiveOV7670/master/LiveOV7670.png 30 | 31 | ------------------------------------------------------------------------------- 32 | 33 | ### Connections for Arduino Uno/Nano 34 | 35 | OV7670 connections: 36 | 37 | VSYNC - PIN2 38 | XCLCK - PIN3 (must be level shifted from 5V -> 3.3V) 39 | PCLCK - PIN12 40 | SIOD - A4 (I2C data) - 10K resistor to 3.3V 41 | SIOC - A5 (I2C clock) - 10K resistor to 3.3V 42 | D0..D3 - A0..A3 (pixel data bits 0..3) 43 | D4..D7 - PIN4..PIN7 (pixel data bits 4..7) 44 | 3.3V - 3.3V 45 | RESET - 3.3V 46 | GND - GND 47 | PWDN - GND 48 | 49 | 1.8" TFT connections: 50 | 51 | DC - PIN8 (5V -> 3.3V) 52 | CS - PIN9 (5V -> 3.3V) 53 | RESET - PIN10 (5V -> 3.3V) 54 | SPI data - PIN11 (5V -> 3.3V) 55 | SPI clock - PIN13 (5V -> 3.3V) 56 | VCC - 5V/3.3V (depending on jumper position on the TFT board) 57 | BL - 3.3V 58 | GND - GND 59 | 60 | ------------------------------------------------------------------------------- 61 | 62 | ### Connections for Arduino Mega 63 | 64 | OV7670 connections: 65 | 66 | VSYNC - PIN2 67 | XCLCK - PIN9 (must be level shifted from 5V -> 3.3V) 68 | PCLCK - PIN12 69 | SIOD - PIN20-SDA (I2C data) - 10K resistor to 3.3V 70 | SIOC - PIN21-SCL (I2C clock) - 10K resistor to 3.3V 71 | D0..D7 - PIN22..PIN29 (pixel data bits 0..7) 72 | 3.3V - 3.3V 73 | RESET - 3.3V 74 | GND - GND 75 | PWDN - GND 76 | 77 | 1.8" TFT connections: 78 | 79 | DC - PIN48 (5V -> 3.3V) 80 | CS - PIN53 (5V -> 3.3V) 81 | RESET - PIN49 (5V -> 3.3V) 82 | SPI data - PIN51 (5V -> 3.3V) 83 | SPI clock - PIN52 (5V -> 3.3V) 84 | VCC - 5V/3.3V (depending on jumper position on the TFT board) 85 | BL - 3.3V 86 | GND - GND 87 | 88 | ------------------------------------------------------------------------------- 89 | 90 | Special thanks to 91 | https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno 92 | 93 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/scripts/upload_gtest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2009, Google Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | """upload_gtest.py v0.1.0 -- uploads a Google Test patch for review. 33 | 34 | This simple wrapper passes all command line flags and 35 | --cc=googletestframework@googlegroups.com to upload.py. 36 | 37 | USAGE: upload_gtest.py [options for upload.py] 38 | """ 39 | 40 | __author__ = 'wan@google.com (Zhanyong Wan)' 41 | 42 | import os 43 | import sys 44 | 45 | CC_FLAG = '--cc=' 46 | GTEST_GROUP = 'googletestframework@googlegroups.com' 47 | 48 | 49 | def main(): 50 | # Finds the path to upload.py, assuming it is in the same directory 51 | # as this file. 52 | my_dir = os.path.dirname(os.path.abspath(__file__)) 53 | upload_py_path = os.path.join(my_dir, 'upload.py') 54 | 55 | # Adds Google Test discussion group to the cc line if it's not there 56 | # already. 57 | upload_py_argv = [upload_py_path] 58 | found_cc_flag = False 59 | for arg in sys.argv[1:]: 60 | if arg.startswith(CC_FLAG): 61 | found_cc_flag = True 62 | cc_line = arg[len(CC_FLAG):] 63 | cc_list = [addr for addr in cc_line.split(',') if addr] 64 | if GTEST_GROUP not in cc_list: 65 | cc_list.append(GTEST_GROUP) 66 | upload_py_argv.append(CC_FLAG + ','.join(cc_list)) 67 | else: 68 | upload_py_argv.append(arg) 69 | 70 | if not found_cc_flag: 71 | upload_py_argv.append(CC_FLAG + GTEST_GROUP) 72 | 73 | # Invokes upload.py with the modified command line flags. 74 | os.execv(upload_py_path, upload_py_argv) 75 | 76 | 77 | if __name__ == '__main__': 78 | main() 79 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_color_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | // A helper program for testing how Google Test determines whether to use 33 | // colors in the output. It prints "YES" and returns 1 if Google Test 34 | // decides to use colors, and prints "NO" and returns 0 otherwise. 35 | 36 | #include 37 | 38 | #include "gtest/gtest.h" 39 | 40 | // Indicates that this translation unit is part of Google Test's 41 | // implementation. It must come before gtest-internal-inl.h is 42 | // included, or there will be a compiler error. This trick is to 43 | // prevent a user from accidentally including gtest-internal-inl.h in 44 | // his code. 45 | #define GTEST_IMPLEMENTATION_ 1 46 | #include "src/gtest-internal-inl.h" 47 | #undef GTEST_IMPLEMENTATION_ 48 | 49 | using testing::internal::ShouldUseColor; 50 | 51 | // The purpose of this is to ensure that the UnitTest singleton is 52 | // created before main() is entered, and thus that ShouldUseColor() 53 | // works the same way as in a real Google-Test-based test. We don't actual 54 | // run the TEST itself. 55 | TEST(GTestColorTest, Dummy) { 56 | } 57 | 58 | int main(int argc, char** argv) { 59 | testing::InitGoogleTest(&argc, argv); 60 | 61 | if (ShouldUseColor(true)) { 62 | // Google Test decides to use colors in the output (assuming it 63 | // goes to a TTY). 64 | printf("YES\n"); 65 | return 1; 66 | } else { 67 | // Google Test decides not to use colors in the output. 68 | printf("NO\n"); 69 | return 0; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/LibMod/Indrek/LevelShifter_4ch.pretty/LevelShifter_2x6_10.16mm.kicad_mod: -------------------------------------------------------------------------------- 1 | (module LevelShifter_2x6_10.16mm (layer F.Cu) (tedit 56DC4ECB) 2 | (descr "Bi-drectional level shifter") 3 | (tags "Level shifter") 4 | (fp_text reference REF** (at 0 -5.1) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value LevelShifter_4ch (at 0 -3.1) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -6.63 -1.55) (end -3.53 -1.55) (layer F.SilkS) (width 0.15)) 11 | (fp_line (start -6.63 0) (end -6.63 -1.55) (layer F.SilkS) (width 0.15)) 12 | (fp_line (start -3.81 1.27) (end -6.35 1.27) (layer F.SilkS) (width 0.15)) 13 | (fp_line (start -3.53 -1.55) (end -3.53 0) (layer F.SilkS) (width 0.15)) 14 | (fp_line (start -6.35 13.97) (end -6.35 1.27) (layer F.SilkS) (width 0.15)) 15 | (fp_line (start -3.81 13.97) (end -6.35 13.97) (layer F.SilkS) (width 0.15)) 16 | (fp_line (start -3.81 1.27) (end -3.81 13.97) (layer F.SilkS) (width 0.15)) 17 | (fp_line (start -6.83 14.45) (end -3.33 14.45) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start -6.83 -1.75) (end -3.33 -1.75) (layer F.CrtYd) (width 0.05)) 19 | (fp_line (start -3.33 -1.75) (end -3.33 14.45) (layer F.CrtYd) (width 0.05)) 20 | (fp_line (start -6.83 -1.75) (end -6.83 14.45) (layer F.CrtYd) (width 0.05)) 21 | (fp_line (start 3.33 -1.75) (end 3.33 14.45) (layer F.CrtYd) (width 0.05)) 22 | (fp_line (start 6.83 -1.75) (end 6.83 14.45) (layer F.CrtYd) (width 0.05)) 23 | (fp_line (start 3.33 -1.75) (end 6.83 -1.75) (layer F.CrtYd) (width 0.05)) 24 | (fp_line (start 3.33 14.45) (end 6.83 14.45) (layer F.CrtYd) (width 0.05)) 25 | (fp_line (start 6.35 -1.27) (end 6.35 13.97) (layer F.SilkS) (width 0.15)) 26 | (fp_line (start 6.35 13.97) (end 3.81 13.97) (layer F.SilkS) (width 0.15)) 27 | (fp_line (start 3.81 13.97) (end 3.81 -1.27) (layer F.SilkS) (width 0.15)) 28 | (fp_line (start 6.35 -1.27) (end 3.81 -1.27) (layer F.SilkS) (width 0.15)) 29 | (pad 12 thru_hole oval (at 5.08 0) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 30 | (pad 6 thru_hole oval (at -5.08 12.7) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 31 | (pad 5 thru_hole oval (at -5.08 10.16) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 32 | (pad 4 thru_hole oval (at -5.08 7.62) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 3 thru_hole oval (at -5.08 5.08) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 2 thru_hole oval (at -5.08 2.54) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 1 thru_hole rect (at -5.08 0) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 11 thru_hole oval (at 5.08 2.54) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 37 | (pad 10 thru_hole oval (at 5.08 5.08) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 38 | (pad 9 thru_hole oval (at 5.08 7.62) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 39 | (pad 8 thru_hole oval (at 5.08 10.16) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 40 | (pad 7 thru_hole oval (at 5.08 12.7) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 41 | ) 42 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/scripts/common.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Google Inc. All Rights Reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above 10 | # copyright notice, this list of conditions and the following disclaimer 11 | # in the documentation and/or other materials provided with the 12 | # distribution. 13 | # * Neither the name of Google Inc. nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | """Shared utilities for writing scripts for Google Test/Mock.""" 30 | 31 | __author__ = 'wan@google.com (Zhanyong Wan)' 32 | 33 | 34 | import os 35 | import re 36 | 37 | 38 | # Matches the line from 'svn info .' output that describes what SVN 39 | # path the current local directory corresponds to. For example, in 40 | # a googletest SVN workspace's trunk/test directory, the output will be: 41 | # 42 | # URL: https://googletest.googlecode.com/svn/trunk/test 43 | _SVN_INFO_URL_RE = re.compile(r'^URL: https://(\w+)\.googlecode\.com/svn(.*)') 44 | 45 | 46 | def GetCommandOutput(command): 47 | """Runs the shell command and returns its stdout as a list of lines.""" 48 | 49 | f = os.popen(command, 'r') 50 | lines = [line.strip() for line in f.readlines()] 51 | f.close() 52 | return lines 53 | 54 | 55 | def GetSvnInfo(): 56 | """Returns the project name and the current SVN workspace's root path.""" 57 | 58 | for line in GetCommandOutput('svn info .'): 59 | m = _SVN_INFO_URL_RE.match(line) 60 | if m: 61 | project = m.group(1) # googletest or googlemock 62 | rel_path = m.group(2) 63 | root = os.path.realpath(rel_path.count('/') * '../') 64 | return project, root 65 | 66 | return None, None 67 | 68 | 69 | def GetSvnTrunk(): 70 | """Returns the current SVN workspace's trunk root path.""" 71 | 72 | _, root = GetSvnInfo() 73 | return root + '/trunk' if root else None 74 | 75 | 76 | def IsInGTestSvn(): 77 | project, _ = GetSvnInfo() 78 | return project == 'googletest' 79 | 80 | 81 | def IsInGMockSvn(): 82 | project, _ = GetSvnInfo() 83 | return project == 'googlemock' 84 | -------------------------------------------------------------------------------- /pcb/kaamera_ja_ekraan/gerber/kaamera_ja_ekraan-B.Mask.gbs: -------------------------------------------------------------------------------- 1 | G04 #@! TF.FileFunction,Soldermask,Bot* 2 | %FSLAX46Y46*% 3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* 4 | G04 Created by KiCad (PCBNEW 4.0.2-stable) date 21.04.2016 21:16:34* 5 | %MOMM*% 6 | G01* 7 | G04 APERTURE LIST* 8 | %ADD10C,0.100000*% 9 | %ADD11R,1.574800X2.286000*% 10 | %ADD12O,1.574800X2.286000*% 11 | %ADD13O,1.727200X2.032000*% 12 | %ADD14R,1.727200X2.032000*% 13 | %ADD15R,1.727200X1.727200*% 14 | %ADD16O,1.727200X1.727200*% 15 | %ADD17R,2.000000X1.700000*% 16 | G04 APERTURE END LIST* 17 | D10* 18 | D11* 19 | X159004000Y-81534000D03* 20 | D12* 21 | X156464000Y-81534000D03* 22 | X153924000Y-81534000D03* 23 | X151384000Y-81534000D03* 24 | X148844000Y-81534000D03* 25 | X146304000Y-81534000D03* 26 | X143764000Y-81534000D03* 27 | X141224000Y-81534000D03* 28 | X138684000Y-81534000D03* 29 | X136144000Y-81534000D03* 30 | X133604000Y-81534000D03* 31 | X131064000Y-81534000D03* 32 | X128524000Y-81534000D03* 33 | X125984000Y-81534000D03* 34 | X123444000Y-81534000D03* 35 | X123444000Y-96774000D03* 36 | X125984000Y-96774000D03* 37 | X128524000Y-96774000D03* 38 | X131064000Y-96774000D03* 39 | X133604000Y-96774000D03* 40 | X136144000Y-96774000D03* 41 | X138684000Y-96774000D03* 42 | X141224000Y-96774000D03* 43 | X143764000Y-96774000D03* 44 | X146304000Y-96774000D03* 45 | X148844000Y-96774000D03* 46 | X151384000Y-96774000D03* 47 | X153924000Y-96774000D03* 48 | X156464000Y-96774000D03* 49 | X159004000Y-96774000D03* 50 | D13* 51 | X146050000Y-112522000D03* 52 | X158750000Y-102362000D03* 53 | X156210000Y-102362000D03* 54 | X153670000Y-102362000D03* 55 | X151130000Y-102362000D03* 56 | X148590000Y-102362000D03* 57 | D14* 58 | X146050000Y-102362000D03* 59 | D13* 60 | X148590000Y-112522000D03* 61 | X151130000Y-112522000D03* 62 | X153670000Y-112522000D03* 63 | X156210000Y-112522000D03* 64 | X158750000Y-112522000D03* 65 | X123444000Y-112522000D03* 66 | X136144000Y-102362000D03* 67 | X133604000Y-102362000D03* 68 | X131064000Y-102362000D03* 69 | X128524000Y-102362000D03* 70 | X125984000Y-102362000D03* 71 | D14* 72 | X123444000Y-102362000D03* 73 | D13* 74 | X125984000Y-112522000D03* 75 | X128524000Y-112522000D03* 76 | X131064000Y-112522000D03* 77 | X133604000Y-112522000D03* 78 | X136144000Y-112522000D03* 79 | D15* 80 | X143764000Y-90932000D03* 81 | D16* 82 | X143764000Y-88392000D03* 83 | X141224000Y-90932000D03* 84 | X141224000Y-88392000D03* 85 | X138684000Y-90932000D03* 86 | X138684000Y-88392000D03* 87 | X136144000Y-90932000D03* 88 | X136144000Y-88392000D03* 89 | X133604000Y-90932000D03* 90 | X133604000Y-88392000D03* 91 | X131064000Y-90932000D03* 92 | X131064000Y-88392000D03* 93 | X128524000Y-90932000D03* 94 | X128524000Y-88392000D03* 95 | X125984000Y-90932000D03* 96 | X125984000Y-88392000D03* 97 | X123444000Y-90932000D03* 98 | X123444000Y-88392000D03* 99 | D17* 100 | X155162000Y-91440000D03* 101 | X151162000Y-91440000D03* 102 | X155162000Y-87884000D03* 103 | X151162000Y-87884000D03* 104 | D14* 105 | X123444000Y-107442000D03* 106 | D13* 107 | X125984000Y-107442000D03* 108 | X128524000Y-107442000D03* 109 | X131064000Y-107442000D03* 110 | X133604000Y-107442000D03* 111 | X136144000Y-107442000D03* 112 | X138684000Y-107442000D03* 113 | X141224000Y-107442000D03* 114 | M02* 115 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/samples/sample2.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #ifndef GTEST_SAMPLES_SAMPLE2_H_ 35 | #define GTEST_SAMPLES_SAMPLE2_H_ 36 | 37 | #include 38 | 39 | 40 | // A simple string class. 41 | class MyString { 42 | private: 43 | const char* c_string_; 44 | const MyString& operator=(const MyString& rhs); 45 | 46 | public: 47 | // Clones a 0-terminated C string, allocating memory using new. 48 | static const char* CloneCString(const char* a_c_string); 49 | 50 | //////////////////////////////////////////////////////////// 51 | // 52 | // C'tors 53 | 54 | // The default c'tor constructs a NULL string. 55 | MyString() : c_string_(NULL) {} 56 | 57 | // Constructs a MyString by cloning a 0-terminated C string. 58 | explicit MyString(const char* a_c_string) : c_string_(NULL) { 59 | Set(a_c_string); 60 | } 61 | 62 | // Copy c'tor 63 | MyString(const MyString& string) : c_string_(NULL) { 64 | Set(string.c_string_); 65 | } 66 | 67 | //////////////////////////////////////////////////////////// 68 | // 69 | // D'tor. MyString is intended to be a final class, so the d'tor 70 | // doesn't need to be virtual. 71 | ~MyString() { delete[] c_string_; } 72 | 73 | // Gets the 0-terminated C string this MyString object represents. 74 | const char* c_string() const { return c_string_; } 75 | 76 | size_t Length() const { 77 | return c_string_ == NULL ? 0 : strlen(c_string_); 78 | } 79 | 80 | // Sets the 0-terminated C string this MyString object represents. 81 | void Set(const char* c_string); 82 | }; 83 | 84 | 85 | #endif // GTEST_SAMPLES_SAMPLE2_H_ 86 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/test/gtest_throw_on_failure_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | // Tests Google Test's throw-on-failure mode with exceptions disabled. 33 | // 34 | // This program must be compiled with exceptions disabled. It will be 35 | // invoked by gtest_throw_on_failure_test.py, and is expected to exit 36 | // with non-zero in the throw-on-failure mode or 0 otherwise. 37 | 38 | #include "gtest/gtest.h" 39 | 40 | #include // for fflush, fprintf, NULL, etc. 41 | #include // for exit 42 | #include // for set_terminate 43 | 44 | // This terminate handler aborts the program using exit() rather than abort(). 45 | // This avoids showing pop-ups on Windows systems and core dumps on Unix-like 46 | // ones. 47 | void TerminateHandler() { 48 | fprintf(stderr, "%s\n", "Unhandled C++ exception terminating the program."); 49 | fflush(NULL); 50 | exit(1); 51 | } 52 | 53 | int main(int argc, char** argv) { 54 | #if GTEST_HAS_EXCEPTIONS 55 | std::set_terminate(&TerminateHandler); 56 | #endif 57 | testing::InitGoogleTest(&argc, argv); 58 | 59 | // We want to ensure that people can use Google Test assertions in 60 | // other testing frameworks, as long as they initialize Google Test 61 | // properly and set the throw-on-failure mode. Therefore, we don't 62 | // use Google Test's constructs for defining and running tests 63 | // (e.g. TEST and RUN_ALL_TESTS) here. 64 | 65 | // In the throw-on-failure mode with exceptions disabled, this 66 | // assertion will cause the program to exit with a non-zero code. 67 | EXPECT_EQ(2, 3); 68 | 69 | // When not in the throw-on-failure mode, the control will reach 70 | // here. 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /test/lib/gtest-1.7.0/include/gtest/internal/custom/gtest-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. 31 | // The following macros can be defined: 32 | // 33 | // Flag related macros: 34 | // GTEST_FLAG(flag_name) 35 | // GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its 36 | // own flagfile flag parsing. 37 | // GTEST_DECLARE_bool_(name) 38 | // GTEST_DECLARE_int32_(name) 39 | // GTEST_DECLARE_string_(name) 40 | // GTEST_DEFINE_bool_(name, default_val, doc) 41 | // GTEST_DEFINE_int32_(name, default_val, doc) 42 | // GTEST_DEFINE_string_(name, default_val, doc) 43 | // 44 | // Test filtering: 45 | // GTEST_TEST_FILTER_ENV_VAR_ - The name of an environment variable that 46 | // will be used if --GTEST_FLAG(test_filter) 47 | // is not provided. 48 | // 49 | // Logging: 50 | // GTEST_LOG_(severity) 51 | // GTEST_CHECK_(condition) 52 | // Functions LogToStderr() and FlushInfoLog() have to be provided too. 53 | // 54 | // Threading: 55 | // GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. 56 | // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are 57 | // already provided. 58 | // Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and 59 | // GTEST_DEFINE_STATIC_MUTEX_(mutex) 60 | // 61 | // GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) 62 | // GTEST_LOCK_EXCLUDED_(locks) 63 | // 64 | // ** Custom implementation starts here ** 65 | 66 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 67 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 68 | 69 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 70 | -------------------------------------------------------------------------------- /src/lib/LiveOV7670Library/CameraOV7670.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "CameraOV7670.h" 3 | 4 | 5 | bool CameraOV7670::init() { 6 | registers.init(); 7 | initIO(); 8 | delay(10); // give camera some time to run before starting setup 9 | return setUpCamera(); 10 | } 11 | 12 | 13 | void CameraOV7670::initIO() { 14 | #ifdef OV7670_INIT_INPUTS 15 | OV7670_INIT_INPUTS; 16 | #endif 17 | OV7670_INIT_CLOCK_OUT; 18 | } 19 | 20 | 21 | bool CameraOV7670::setUpCamera() { 22 | if (registers.resetSettings()) { 23 | registers.setRegisters(CameraOV7670Registers::regsDefault); 24 | 25 | switch (pixelFormat) { 26 | default: 27 | case PIXEL_RGB565: 28 | registers.setRegisters(CameraOV7670Registers::regsRGB565); 29 | break; 30 | case PIXEL_BAYERRGB: 31 | registers.setRegisters(CameraOV7670Registers::regsBayerRGB); 32 | break; 33 | case PIXEL_YUV422: 34 | registers.setRegisters(CameraOV7670Registers::regsYUV422); 35 | break; 36 | } 37 | 38 | switch (resolution) { 39 | case RESOLUTION_VGA_640x480: 40 | registers.setRegisters(CameraOV7670Registers::regsVGA); 41 | verticalPadding = CameraOV7670Registers::VGA_VERTICAL_PADDING; 42 | break; 43 | case RESOLUTION_QVGA_320x240: 44 | registers.setRegisters(CameraOV7670Registers::regsQVGA); 45 | verticalPadding = CameraOV7670Registers::QVGA_VERTICAL_PADDING; 46 | break; 47 | default: 48 | case RESOLUTION_QQVGA_160x120: 49 | registers.setRegisters(CameraOV7670Registers::regsQQVGA); 50 | verticalPadding = CameraOV7670Registers::QQVGA_VERTICAL_PADDING; 51 | break; 52 | } 53 | 54 | registers.setDisablePixelClockDuringBlankLines(); 55 | registers.setDisableHREFDuringBlankLines(); 56 | registers.setInternalClockPreScaler(internalClockPreScaler); 57 | registers.setPLLMultiplier(pllMultiplier); 58 | 59 | return true; 60 | } else { 61 | return false; 62 | } 63 | } 64 | 65 | 66 | bool CameraOV7670::setRegister(uint8_t addr, uint8_t val) { 67 | registers.setRegister(addr, val); 68 | } 69 | 70 | uint8_t CameraOV7670::readRegister(uint8_t addr) { 71 | return registers.readRegister(addr); 72 | } 73 | 74 | void CameraOV7670::setRegisterBitsOR(uint8_t addr, uint8_t bits) { 75 | registers.setRegisterBitsOR(addr, bits); 76 | } 77 | 78 | void CameraOV7670::setRegisterBitsAND(uint8_t addr, uint8_t bits) { 79 | registers.setRegisterBitsAND(addr, bits); 80 | } 81 | 82 | void CameraOV7670::setManualContrastCenter(uint8_t contrastCenter) { 83 | registers.setManualContrastCenter(contrastCenter); 84 | } 85 | 86 | 87 | void CameraOV7670::setContrast(uint8_t contrast) { 88 | registers.setContrast(contrast); 89 | } 90 | 91 | 92 | void CameraOV7670::setBrightness(uint8_t birghtness) { 93 | registers.setBrightness(birghtness); 94 | } 95 | 96 | 97 | void CameraOV7670::reversePixelBits() { 98 | registers.reversePixelBits(); 99 | } 100 | 101 | void CameraOV7670::showColorBars(bool transparent) { 102 | registers.setShowColorBar(transparent); 103 | } 104 | 105 | void CameraOV7670::ignoreVerticalPadding() { 106 | for (uint8_t i = 0; i < verticalPadding; i++) { 107 | ignoreHorizontalPaddingLeft(); 108 | for (uint16_t x = 0; x < resolution * 2; x++) { 109 | waitForPixelClockRisingEdge(); 110 | } 111 | ignoreHorizontalPaddingRight(); 112 | } 113 | } 114 | 115 | 116 | --------------------------------------------------------------------------------