Skip to content

Commit 10eed92

Browse files
committed
Add header comments to files in src
Fixes #9
1 parent 3d65c02 commit 10eed92

15 files changed

+208
-2
lines changed

src/alloc.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* alloc.c
8+
*
9+
* Wrapper functions for malloc(), free(), calloc(), and realloc(). These ensure
10+
* memory gets allocated on the C heap before the MicroPython garbage collector
11+
* has been initialized, and and in the GC pool afterwards.
12+
*------------------------------------------------------------------------------
13+
*/
14+
115
// C headers
216
#include "py/runtime.h"
317

src/convert.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* convert.cpp
8+
*
9+
* Helper functions to convert between various data types from MicroPython, ulab
10+
* NumPy, and OpenCV
11+
*------------------------------------------------------------------------------
12+
*/
13+
114
// C++ headers
215
#include "convert.h"
316
#include "numpy.h"

src/convert.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* convert.h
8+
*
9+
* Helper functions to convert between various data types from MicroPython, ulab
10+
* NumPy, and OpenCV.
11+
*------------------------------------------------------------------------------
12+
*/
13+
114
// C++ headers
215
#include "opencv2/core.hpp"
316

src/core.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* core.cpp
8+
*
9+
* MicroPython wrappers for functions from the OpenCV core module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C++ headers
214
#include "opencv2/core.hpp"
315
#include "opencv2/imgcodecs.hpp"

src/core.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* core.h
8+
*
9+
* MicroPython wrappers for functions from the OpenCV core module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C headers
214
#include "py/runtime.h"
315

src/highgui.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* highgui.cpp
8+
*
9+
* MicroPython wrappers for functions from the OpenCV highgui module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C++ headers
214
#include "opencv2/core.hpp"
315
#include "convert.h"

src/highgui.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* highgui.h
8+
*
9+
* MicroPython wrappers for functions from the OpenCV highgui module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C headers
214
#include "py/runtime.h"
315

src/imgcodecs.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* imgcodecs.cpp
8+
*
9+
* MicroPython wrappers for functions from the OpenCV imgcodecs module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C++ headers
214
#include "opencv2/core.hpp"
315
#include "opencv2/imgcodecs.hpp"

src/imgcodecs.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* imgcodecs.h
8+
*
9+
* MicroPython wrappers for functions from the OpenCV imgcodecs module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C headers
214
#include "py/runtime.h"
315

src/imgproc.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
*------------------------------------------------------------------------------
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Copyright (c) 2025 SparkFun Electronics
6+
*------------------------------------------------------------------------------
7+
* imgproc.cpp
8+
*
9+
* MicroPython wrappers for functions from the OpenCV imgproc module.
10+
*------------------------------------------------------------------------------
11+
*/
12+
113
// C++ headers
214
#include "opencv2/core.hpp"
315
#include "opencv2/imgproc.hpp"

0 commit comments

Comments
 (0)