Update license

* Switch to MIT
* Add license notice to source files
This commit is contained in:
iabdalkader 2014-09-20 05:09:52 +02:00
parent a8146eaeba
commit 65cd8a133a
83 changed files with 705 additions and 94 deletions

24
LICENSE
View File

@ -1,3 +1,21 @@
Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
The MIT License (MIT)
Copyright (c) 2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE

View File

@ -1,6 +1,10 @@
/**
* Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
* See the file COPYING for copying permission.
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Dynamic array.
*
*/
#include <stdlib.h>
#include <string.h>

View File

@ -1,6 +1,10 @@
/**
* Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
* See the file COPYING for copying permission.
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Dynamic array.
*
*/
#ifndef __ARRAY_H__
#define __ARRAY_H__
@ -18,4 +22,4 @@ void *array_pop_back(struct array *array);
void array_sort(struct array *array, array_comp);
void array_erase(struct array *array, int index);
void array_resize(struct array *array, int index);
#endif//__ARRAY_H__
#endif //__ARRAY_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Global framebuffer pointer.
*
*/
#ifndef __FRAMEBUFFER_H__
#define __FRAMEBUFFER_H__
#include "mutex.h"
@ -9,5 +17,6 @@ static struct framebuffer {
int ready;
mutex_t lock;
uint8_t pixels[];
// Note all instances of fb point to the same memory address.
}*fb = (struct framebuffer *) &_fb_base;
#endif /* __FRAMEBUFFER_H__ */

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Blob count.
*
*/
#include "xalloc.h"
#include "imlib.h"
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Fast approximate math functions.
*
*/
#include "mdefs.h"
#include "fmath.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Fast approximate math functions.
*
*/
#ifndef __FMATH_H__
#define __FMATH_H__
#include <stdint.h>
@ -12,4 +20,4 @@ float fast_cbrtf(float d);
float fast_fabsf(float d);
float fast_log(float x);
float fast_log2(float x);
#endif /* __FMATH_H__ */
#endif // __FMATH_H__

View File

@ -1,25 +1,29 @@
/*******************************************************************************
* name: Font
* family: Ubuntu
* size: 8
* style: Normal
* included characters: !"#$%&'()*+,-./0123456789:;<=>?\x0040ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
* antialiasing: yes
* type: monospaced
* encoding: ASMO-708
* unicode bom: no
*
* preset name: Monochrome
* data block size: 8 bit(s), uint8_t
* RLE compression enabled: no
* conversion type: Monochrome, Diffuse Dither 128
* bits per pixel: 1
*
* preprocess:
* main scan direction: top_to_bottom
* line scan direction: forward
* inverse: yes
*******************************************************************************/
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Font data.
*
* Size: 8 Style: Normal
* Included characters:
* !"#$%&'()*+,-./0123456789:;<=>?\x0040ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
* Antialiasing: yes
* Type: monospaced
* Encoding: ASMO-708
* Unicode bom: no
*
* Preset name: Monochrome
* Data block size: 8 bit(s), uint8_t
* RLE compression enabled: no
* Conversion type: Monochrome, Diffuse Dither 128
* Bits per pixel: 1
*
* Preprocess:
* main scan direction: top_to_bottom
* line scan direction: forward
* inverse: yes
*/
#include <stdint.h>
#include "font.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Font data.
*
*/
#ifndef __FONT_H__
#define __FONT_H__
typedef struct {
@ -6,4 +14,4 @@ typedef struct {
uint8_t data[10];
} glyph_t;
extern const glyph_t font[95];
#endif //__FONT_H__
#endif // __FONT_H__

View File

@ -1,8 +1,7 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
* This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Viola-Jones face detector implementation.
* Original Author: Francesco Comaschi (f.comaschi@tue.nl)

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Image library.
*
*/
#include <stdlib.h>
#include <string.h>
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Image library.
*
*/
#ifndef __IMLIB_H__
#define __IMLIB_H__
#include <stdint.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Integral image.
*
*/
#include <stdlib.h>
#include <string.h>
#include <arm_math.h>

View File

@ -1,13 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
* This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Public domain Minimalistic JPEG baseline encoder
* Minimalistic JPEG baseline encoder.
*
* */
*/
#include "ff.h"
#include "std.h"
#include "xalloc.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Kmeans clustering.
*
*/
#include <float.h>
#include <limits.h>
#include <arm_math.h>

View File

@ -1,12 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013 Ibrahim Abd Elkader <i.abdalkader@gmail.com>
* This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
*
* LBPu28,2 Operator.
*
*/
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* LBPu28,2 Operator.
*
*/
#include "imlib.h"
#include "xalloc.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* O(N) median filter with histograms.
*
*/
#include "xalloc.h"
#include "imlib.h"
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* X,Y Point.
*
*/
#include <float.h>
#include <limits.h>
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* PPM/PGM reader/writer.
*
*/
#include <ff.h>
#include <stdio.h>
#include "xalloc.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Rectangle functions.
*
*/
#include <float.h>
#include <limits.h>
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Template matching with NCC (Normalized Cross Correlation).
*
*/
#include "xalloc.h"
#include "imlib.h"
#include <arm_math.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* main function.
*
*/
#include <stdio.h>
#include <string.h>
#include <stm32f4xx_hal.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Misc macros.
*
*/
#ifndef ALWAYS_INLINE
#define ALWAYS_INLINE inline __attribute__((always_inline))
#endif

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Mutex.
*
*/
#include <stm32f4xx.h>
#include <core_cm4.h>
#include <core_cmInstr.h>
@ -11,12 +19,12 @@ void mutex_init(mutex_t *mutex)
void mutex_lock(mutex_t *mutex)
{
volatile int locked = 0;
/* wait for mutex to be unlocked */
// Wait for mutex to be unlocked
do {
/* attemp ex read */
// Attempt exclusive read
while (__LDREXW(mutex) != 0);
/* attempt to lock mutex */
// Attempt to lock mutex
locked = __STREXW(1, mutex);
} while (locked != 0);
__DMB();
@ -30,7 +38,7 @@ int mutex_try_lock(mutex_t *mutex)
return 0;
}
/* attempt to lock mutex */
// Attempt to lock mutex
locked = __STREXW(1, mutex);
__DMB();

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Mutex.
*
*/
#ifndef __MUTEX_H__
#define __MUTEX_H__
#include <stdint.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV2640 driver.
*
*/
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV2640 driver.
*
*/
#ifndef __OV2640_H__
#define __OV2640_H__
#include "sensor.h"
int ov2640_init(struct sensor_dev *sensor);
#endif /* __OV2640_H__ */
#endif // __OV2640_H__

View File

@ -1,6 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV2640 register definitions.
*/
#ifndef __REG_REGS_H__
#define __REG_REGS_H__
/* OV2640 Registers definition */
/* DSP register bank FF=0x00*/
#define QS 0x44
#define HSIZE 0x51

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV9650 driver.
*
*/
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV9650 driver.
*
*/
#ifndef __OV9650_H__
#define __OV9650_H__
#include "sensor.h"
int ov9650_init(struct sensor_dev *sensor);
#endif /* __OV9650_H__ */
#endif // __OV9650_H__

View File

@ -1,6 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* OV9650 register definitions.
*/
#ifndef __REG_REGS_H__
#define __REG_REGS_H__
/* OV9650 Registers definition */
#define REG_GAIN 0x00
#define REG_BLUE 0x01
#define REG_RED 0x02

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Pin definitions.
*
*/
#ifndef __PINCFG_H__
#define __PINCFG_H__
#include <stm32f4xx_hal.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* MLX90620 Python module.
*
*/
#include <mp.h>
#include <stdbool.h>
#include <float.h>

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* MLX90620 Python module.
*
*/
#ifndef __MLX90620_H__
#define __MLX90620_H__
const mp_obj_module_t *py_mlx90620_init();
#endif /* __PY_mlx_H__ */
#endif // __PY_mlx_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* MicroPython header.
*
*/
#ifndef __MP_H__
#define __MP_H__
#include <std.h>
@ -24,4 +32,4 @@
#include "usb.h"
#include "storage.h"
#include "sdcard.h"
#endif /* __MP_H__ */
#endif // __MP_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* MP assertions.
*
*/
#ifndef __PY_ASSERT_H__
#define __PY_ASSERT_H__
#define PY_ASSERT_TRUE(cond) \
@ -34,4 +42,4 @@
} \
} while(0)
#endif /* __PY_ASSERT_H__ */
#endif // __PY_ASSERT_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Clock Python module.
*
*/
#include <mp.h>
#include "systick.h"
#include "py_clock.h"

View File

@ -1,4 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Clock Python module.
*
*/
#ifndef __PY_CLOCK_H__
#define __PY_CLOCK_H__
mp_obj_t py_clock();
#endif /* __PY_CLOCK_H__ */
#endif // __PY_CLOCK_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* File Python module.
*
*/
#include <mp.h>
#include "py_assert.h"
#include "py_file.h"

View File

@ -1,8 +1,15 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* File Python module.
*
*/
#ifndef __PY_FILE_H__
#define __PY_FILE_H__
#include <ff.h>
const char *ffs_strerror(FRESULT res);
mp_obj_t py_file_open(mp_obj_t path, mp_obj_t mode);
void *py_file_cobj(mp_obj_t file);
#endif /* __PY_FILE_H__ */
#endif // __PY_FILE_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* GPIO Python module.
*
*/
#include "mp.h"
#include "pincfg.h"
#include "py_gpio.h"

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* GPIO Python module.
*
*/
#ifndef __PY_GPIO_H__
#define __PY_GPIO_H__
const mp_obj_module_t *py_gpio_init();
#endif /* __PY_GPIO_H__ */
#endif // __PY_GPIO_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Image Python module.
*
*/
#include "mp.h"
#include "imlib.h"
#include "array.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Image Python module.
*
*/
#ifndef __PY_IMAGE_H__
#define __PY_IMAGE_H__
#include "imlib.h"
@ -9,5 +17,5 @@ mp_obj_t py_image(int width, int height, int bpp, void *pixels);
mp_obj_t py_image_from_struct(image_t *image);
void *py_image_cobj(mp_obj_t image);
int py_image_descriptor_from_roi(image_t *image, const char *path, rectangle_t *roi);
#endif /* __PY_IMAGE_H__ */
#endif // __PY_IMAGE_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* LED Python module.
*
*/
#include "mp.h"
#include "pincfg.h"
#include "py_led.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* LED Python module.
*
*/
#ifndef __PY_LED_H__
#define __PY_LED_H__
enum led_id {
@ -14,4 +22,4 @@ void led_init(enum led_id color);
void led_toggle(enum led_id color);
void led_state(enum led_id color, int state);
const mp_obj_module_t *py_led_init();
#endif /* __PY_LED_H__ */
#endif // __PY_LED_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Select Python module.
*
*/
#include <mp.h>
#include <cc3000_common.h>
#include <evnt_handler.h>

View File

@ -1,4 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Select Python module.
*
*/
#ifndef __PY_SELECT_H__
#define __PY_SELECT_H__
const mp_obj_module_t *py_select_init();
#endif /* __PY_SELECT_H__ */
#endif // __PY_SELECT_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor Python module.
*
*/
#include "mp.h"
#include "sccb.h"
#include "sensor.h"

View File

@ -1,4 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor Python module.
*
*/
#ifndef __PY_SENSOR_H__
#define __PY_SENSOR_H__
const mp_obj_module_t *py_sensor_init();
#endif /* __PY_SENSOR_H__ */
#endif // __PY_SENSOR_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Socket Python module.
*
*/
#include <mp.h>
#include <cc3000_common.h>
#include <evnt_handler.h>
@ -7,6 +15,7 @@
#include <py_wlan.h>
#include <py_socket.h>
#include <py_assert.h>
#define MAX_FD (8)
#define MAX_ADDRSTRLEN (128)
#define MAX_RX_PACKET (CC3000_RX_BUFFER_SIZE-CC3000_MINIMAL_RX_SIZE-1)

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Socket Python module.
*
*/
#ifndef __PY_SOCKET_H__
#define __PY_SOCKET_H__
typedef struct {
@ -6,4 +14,4 @@ typedef struct {
} socket_t;
extern const mp_obj_type_t socket_type;
const mp_obj_module_t *py_socket_init();
#endif /* __PY_SOCKET_H__ */
#endif // __PY_SOCKET_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SPI Python module.
*
*/
#include "mp.h"
#include "pincfg.h"
#include "spi.h"

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SPI Python module.
*
*/
#ifndef __PY_SPI_H__
#define __PY_SPI_H__
const mp_obj_module_t *py_spi_init();
#endif /* __PY_SPI_H__ */
#endif // __PY_SPI_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Time Python module.
*
*/
#include <mp.h>
#include "systick.h"
#include "py_time.h"

View File

@ -1,4 +1,12 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Time Python module.
*
*/
#ifndef __PY_TIME_H__
#define __PY_TIME_H__
const mp_obj_module_t *py_time_init();
#endif /* __PY_TIME_H__ */
#endif // __PY_TIME_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* WLAN Python module.
*
*/
#include <mp.h>
#include <cc3k.h>
#include <stm32f4xx_hal.h>

View File

@ -1,6 +1,14 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* WLAN Python module.
*
*/
#ifndef __PY_WLAN_H__
#define __PY_WLAN_H__
int wlan_get_fd_state(int fd);
void wlan_clear_fd_state(int fd);
const mp_obj_module_t *py_wlan_init();
#endif /* __PY_WLAN_H__ */
#endif // __PY_WLAN_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* UART Python module.
*
*/
#include "mp.h"
#include "pincfg.h"
#include "uart.h"

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* UART Python module.
*
*/
#ifndef __UART_H__
#define __UART_H__
const mp_obj_module_t *py_uart_init();
#endif /* __UART_H__ */
#endif // __UART_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* RCC (Reset and Clock Control).
*
*/
#include <stdint.h>
#include <stm32f4xx.h>
#include <stm32f4xx_rcc.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* RCC (Reset and Clock Control).
*
*/
#ifndef __RCC_CTRL_H__
#define __RCC_CTRL_H__
enum sysclk_freq {
@ -8,4 +16,4 @@ enum sysclk_freq {
SYSCLK_240_MHZ,
};
void rcc_ctrl_set_frequency(enum sysclk_freq);
#endif //__RCC_CTRL_H__
#endif // __RCC_CTRL_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* RNG (Random Number Generator).
*
*/
#include <stm32f4xx_hal.h>
#include "rng.h"

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* RNG (Random Number Generator).
*
*/
#ifndef __RNG_H__
#define __RNG_H__
void rng_init();
uint32_t rng_randint(uint32_t min, uint32_t max);
#endif /* __RNG_H__ */
#endif // __RNG_H__

View File

@ -1,9 +1,15 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SCCB (I2C like) driver.
*
*/
#include <stm32f4xx_hal.h>
#include "sccb.h"
#include "pincfg.h"
#include "mdefs.h"
/* I2C defs */
#define SCCB_FREQ (30000)
#define SLAVE_ADDR (0x60)
#define TIMEOUT (100000)

View File

@ -1,7 +1,15 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SCCB (I2C like) driver.
*
*/
#ifndef __SCCB_H__
#define __SCCB_H__
#include <stdint.h>
void SCCB_Init();
uint8_t SCCB_Read(uint8_t addr);
uint8_t SCCB_Write(uint8_t addr, uint8_t data);
#endif /* __SCCB_H__ */
#endif // __SCCB_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SD card SDIO driver.
*
*/
#include <stdbool.h>
#include <stm32f4xx_hal.h>
#include "mdefs.h"

View File

@ -1,11 +1,4 @@
/*-----------------------------------------------------------------------*/
/* MMC/SDSC/SDHC (in SPI mode) control module for STM32 Version 1.1.6 */
/* (C) Martin Thomas, 2010 - based on the AVR MMC module (C)ChaN, 2007 */
/*-----------------------------------------------------------------------*/
/* Copyright (c) 2010, Martin Thomas, ChaN
All rights reserved.
/* Copyright (c) 2010, Martin Thomas, ChaN All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SDRAM Driver.
*
*/
#include <std.h>
#include <stdbool.h>
#include <stm32f4xx_hal.h>

View File

@ -1,5 +1,13 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* SDRAM Driver.
*
*/
#ifndef __SDRAM_H__
#define __SDRAM_H__
bool sdram_init();
bool sdram_test();
#endif //__SDRAM_H__
#endif // __SDRAM_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor abstraction layer.
*
*/
#include <stdlib.h>
#include <string.h>
#include "sccb.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor abstraction layer.
*
*/
#ifndef __SENSOR_H__
#define __SENSOR_H__
#include <stdint.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Software I2C implementation.
*
*/
#include <stdbool.h>
#include <stm32f4xx_hal.h>
#include "soft_i2c.h"

View File

@ -1,7 +1,15 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Software I2C implementation.
*
*/
#ifndef __SOFT_I2C_H__
#define __SOFT_I2C_H__
#include <stdint.h>
void soft_i2c_init();
int soft_i2c_read_bytes(uint8_t slv_addr, uint8_t *buf, int len, bool stop);
int soft_i2c_write_bytes(uint8_t slv_addr, uint8_t *buf, int len, bool stop);
#endif //__SOFT_I2C_H__
#endif // __SOFT_I2C_H__

View File

@ -1,5 +1,10 @@
/**
* Linker script for STM32F4xx Devices with 1MB FLASH, 192KB RAM (64KB CCM)
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Linker script for STM32F4xx Devices.
*
*/
/* Entry Point */

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* HAL MSP.
*
*/
#include "pincfg.h"
#include <stm32f4xx_hal.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Interrupt handlers.
*
*/
#include <stdio.h>
#include <usbd_core.h>
#include <stm32f4xx_exti.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Systick driver.
*
*/
#include <stm32f4xx_hal.h>
#include <stdint.h>
#include <stdbool.h>

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Systick driver.
*
*/
#ifndef __SYSTICK_H__
#define __SYSTICK_H__
#include <stdint.h>
@ -5,4 +13,4 @@ int systick_init();
void systick_sleep(uint32_t ms);
uint32_t systick_current_millis();
bool sys_tick_has_passed(uint32_t stc, uint32_t delay_ms);
#endif /* __SYSTICK_H__ */
#endif // __SYSTICK_H__

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* USB debug support.
*
*/
#include "mp.h"
#include "imlib.h"
#include "sensor.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* USB debug support.
*
*/
#ifndef __USBDBG_H__
#define __USBDBG_H__
enum usbdbg_cmd {

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Memory allocation functions.
*
*/
#include <mp.h>
#include "mdefs.h"
#include "xalloc.h"

View File

@ -1,3 +1,11 @@
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Memory allocation functions.
*
*/
#ifndef __XALLOC_H__
#define __XALLOC_H__
#include <stdint.h>
@ -6,4 +14,4 @@ void *xalloc(uint32_t size);
void *xalloc0(uint32_t size);
void xfree(void *ptr);
void *xrealloc(void *ptr, uint32_t size);
#endif /* __XALLOC_H__ */
#endif // __XALLOC_H__