From 4e31f25db8aaee45d28d0a92fc21b0277c182b95 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Tue, 29 Mar 2016 02:26:39 +0200 Subject: [PATCH] Additional qstr definitions for OpenMV. --- src/Makefile | 5 +- src/micropython | 2 +- src/omv/py/qstrdefsomv.h | 270 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 275 insertions(+), 2 deletions(-) create mode 100644 src/omv/py/qstrdefsomv.h diff --git a/src/Makefile b/src/Makefile index 15dd54c01..b899fbc16 100755 --- a/src/Makefile +++ b/src/Makefile @@ -25,6 +25,9 @@ MICROPY_DIR=micropython OMV_DIR=omv WINC1500_DIR=winc1500 +# Additional qstr definitions for OpenMV +OMV_QSTR_DEFS = $(TOP_DIR)/$(OMV_DIR)/py/qstrdefsomv.h + # Target TARGET ?= OPENMV2 FW_DIR=$(TOP_DIR)/../firmware/$(TARGET)/ @@ -311,7 +314,7 @@ objs: | $(BUILD) $(MAKE) -C $(CMSIS_DIR) BUILD=$(BUILD)/$(CMSIS_DIR) $(MAKE) -C $(STHAL_DIR) BUILD=$(BUILD)/$(STHAL_DIR) $(MAKE) -C $(FATFS_DIR) BUILD=$(BUILD)/$(FATFS_DIR) - $(MAKE) -C $(MICROPY_DIR)/stmhal BUILD=$(BUILD)/$(MICROPY_DIR) BOARD=$(TARGET) + $(MAKE) -C $(MICROPY_DIR)/stmhal BUILD=$(BUILD)/$(MICROPY_DIR) BOARD=$(TARGET) QSTR_DEFS=$(OMV_QSTR_DEFS) $(MAKE) -C $(OMV_DIR) BUILD=$(BUILD)/$(OMV_DIR) $(MAKE) -C $(WINC1500_DIR) BUILD=$(BUILD)/$(WINC1500_DIR) diff --git a/src/micropython b/src/micropython index e8f532528..8ea9341cd 160000 --- a/src/micropython +++ b/src/micropython @@ -1 +1 @@ -Subproject commit e8f5325288f930a0714c5dda1eab1ef4e740531c +Subproject commit 8ea9341cdc25c32200fed348669be16ec5f46015 diff --git a/src/omv/py/qstrdefsomv.h b/src/omv/py/qstrdefsomv.h new file mode 100644 index 000000000..a888ce087 --- /dev/null +++ b/src/omv/py/qstrdefsomv.h @@ -0,0 +1,270 @@ +/* + * This file is part of the OpenMV project. + * Copyright (c) 2013/2014 Ibrahim Abdelkader + * This work is licensed under the MIT license, see the file LICENSE for details. + * + * qstrs specific to openmv + * + */ + +// Image module +Q(image) +Q(Image) +Q(rgb_to_lab) +Q(lab_to_rgb) +Q(rgb_to_grayscale) +Q(grayscale_to_rgb) +Q(HaarCascade) +Q(FREAK) +Q(LBP) +Q(load_descriptor) +Q(save_descriptor) +Q(match_descriptor) + +// Image class +Q(load) +Q(save) +Q(width) +Q(height) +Q(format) +Q(size) +Q(get_pixel) +Q(set_pixel) +Q(draw_line) +Q(draw_rectangle) +Q(draw_circle) +Q(draw_string) +Q(draw_cross) +Q(draw_keypoints) +Q(binary) +Q(invert) +Q(and) +Q(nand) +Q(or) +Q(nor) +Q(xor) +Q(xnor) +Q(pixels) +Q(centroid) +Q(orientation_radians) +Q(orientation_degrees) +Q(erode) +Q(dilate) +Q(negate) +Q(difference) +Q(morph) +Q(statistics) +Q(midpoint) +Q(median) +Q(kp_desc) +Q(lbp_desc) +Q(Cascade) +Q(blit) +Q(blend) +Q(scaled) +Q(subimg) +Q(compress) +Q(rainbow) +Q(histeq) +Q(threshold) +Q(find_blobs) +Q(find_template) +Q(find_features) +Q(find_keypoints) +Q(find_lbp) +Q(find_eyes) +Q(cmp_lbp) +Q(color) +Q(roi) +Q(mul) +Q(add) +Q(bias) +Q(percentile) + +// Lcd Module +Q(lcd) +Q(type) +Q(set_backlight) +Q(get_backlight) +Q(display) +Q(clear) + +// FIR Module +Q(fir) +Q(read_ta) +Q(read_ir) +Q(draw_ta) +Q(draw_ir) +Q(alpha) +Q(scale) + +// Gif module +Q(gif) +Q(Gif) +Q(open) +Q(add_frame) +Q(loop) + +// Mjpeg module +Q(mjpeg) +Q(Mjpeg) + +// Led Module +Q(led) +Q(RED) +Q(GREEN) +Q(BLUE) +Q(IR) +Q(on) +Q(off) +Q(toggle) + +// Time Module +Q(time) +Q(ticks) +Q(sleep) +Q(clock) +Q(Clock) + +// Clock +Q(tick) +Q(fps) +Q(avg) + +//Sensor Module +Q(sensor) +Q(RGB565) +Q(YUV422) +Q(GRAYSCALE) +Q(JPEG) +Q(QQCIF) +Q(QQVGA) +Q(QQVGA2) +Q(QCIF) +Q(HQVGA) +Q(QVGA) +Q(CIF) +Q(VGA) +Q(SVGA) +Q(SXGA) +Q(UXGA) +Q(OV9650) +Q(OV2640) +Q(OV7725) +// Filters +Q(FILTER_BW) +Q(FILTER_SKIN) + +//SDE +Q(NORMAL) +Q(NEGATIVE) + +Q(reset) +Q(snapshot) +Q(get_id) +Q(set_pixformat) +Q(set_framerate) +Q(set_framesize) +Q(set_gainceiling) +Q(set_contrast) +Q(set_brightness) +Q(set_saturation) +Q(set_quality) +Q(set_colorbar) +Q(set_whitebal) +Q(set_hmirror) +Q(set_vflip) +Q(set_special_effect) +Q(set_image_filter) +Q(__write_reg) +Q(__read_reg) + +// GPIOS +Q(P1) +Q(P2) +Q(P3) +Q(P4) +Q(P5) +Q(P6) +Q(PA1) +Q(PA2) +Q(PA3) +Q(PA4) +Q(PA5) +Q(PA6) +Q(PA7) +Q(PA8) +Q(PB1) +Q(PB2) +Q(PB3) +Q(PB4) +Q(IN) +Q(OUT) +Q(gpio) +Q(GPIO) +Q(low) +Q(high) + +// SPI +Q(spi) +Q(read) +Q(write) +Q(write_image) + +// UART +Q(uart) + +// File +Q(file) +Q(close) + +//Wlan +Q(wlan) +Q(WEP) +Q(WPA) +Q(WPA2) +Q(init) +Q(connect) +Q(connected) +Q(ifconfig) +Q(patch_version) +Q(patch_program) +Q(socket) +Q(send) +Q(recv) +Q(bind) +Q(listen) +Q(accept) +Q(settimeout) +Q(setblocking) +Q(select) +Q(AF_INET) +Q(AF_INET6) +Q(SOCK_STREAM) +Q(SOCK_DGRAM) +Q(SOCK_RAW) +Q(IPPROTO_IP) +Q(IPPROTO_ICMP) +Q(IPPROTO_IPV4) +Q(IPPROTO_TCP) +Q(IPPROTO_UDP) +Q(IPPROTO_IPV6) +Q(IPPROTO_RAW) + +// for WINC1500 module +Q(WINC) +Q(connect) +Q(disconnect) +Q(isconnected) +Q(ifconfig) +Q(fw_version) +Q(scan) +Q(rssi) +Q(OPEN) +Q(WEP) +Q(WPA_PSK) +Q(802_1X) +Q(ssid) +Q(key) +Q(security) +Q(bssid)