mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Rename mdefs.h to common.h
This commit is contained in:
parent
f200f2e0b8
commit
b665c65ed6
26
src/omv/common.h
Normal file
26
src/omv/common.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Common macros.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef ALWAYS_INLINE
|
||||||
|
#define ALWAYS_INLINE inline __attribute__((always_inline))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BREAK
|
||||||
|
#define BREAK() __asm__ volatile ("BKPT")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_OPT
|
||||||
|
#define DISABLE_OPT __attribute__((optimize("O0")))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_PRINTF
|
||||||
|
#define debug_printf(fmt, ...) \
|
||||||
|
do { printf("%s(): " fmt, __func__, ##__VA_ARGS__);} while (0)
|
||||||
|
#else
|
||||||
|
#define debug_printf(...)
|
||||||
|
#endif
|
||||||
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <mp.h>
|
#include <mp.h>
|
||||||
#include "mdefs.h"
|
#include "common.h"
|
||||||
#include "fb_alloc.h"
|
#include "fb_alloc.h"
|
||||||
#include "ff_wrapper.h"
|
#include "ff_wrapper.h"
|
||||||
#define FF_MIN(x,y) (((x)<(y))?(x):(y))
|
#define FF_MIN(x,y) (((x)<(y))?(x):(y))
|
||||||
|
|||||||
@ -7,10 +7,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "mdefs.h"
|
|
||||||
#include "fb_alloc.h"
|
#include "fb_alloc.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
#include "imlib.h"
|
#include "imlib.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
ALWAYS_INLINE static uint8_t *init_mask(rectangle_t *roi)
|
ALWAYS_INLINE static uint8_t *init_mask(rectangle_t *roi)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include <arm_math.h>
|
#include <arm_math.h>
|
||||||
#include "fb_alloc.h"
|
#include "fb_alloc.h"
|
||||||
#include "ff_wrapper.h"
|
#include "ff_wrapper.h"
|
||||||
#include "mdefs.h"
|
#include "common.h"
|
||||||
#include "fft.h"
|
#include "fft.h"
|
||||||
// http://processors.wiki.ti.com/index.php/Efficient_FFT_Computation_of_Real_Input
|
// http://processors.wiki.ti.com/index.php/Efficient_FFT_Computation_of_Real_Input
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
* Fast approximate math functions.
|
* Fast approximate math functions.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "mdefs.h"
|
|
||||||
#include "fmath.h"
|
#include "fmath.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#define M_PI 3.14159265f
|
#define M_PI 3.14159265f
|
||||||
#define M_PI_2 1.57079632f
|
#define M_PI_2 1.57079632f
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
* Fast 9 and 25 bin sort.
|
* Fast 9 and 25 bin sort.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "mdefs.h"
|
|
||||||
#include "fsort.h"
|
#include "fsort.h"
|
||||||
|
#include "common.h"
|
||||||
// http://pages.ripco.net/~jgamble/nw.html
|
// http://pages.ripco.net/~jgamble/nw.html
|
||||||
|
|
||||||
ALWAYS_INLINE static void cmpswp(uint8_t *a, uint8_t *b)
|
ALWAYS_INLINE static void cmpswp(uint8_t *a, uint8_t *b)
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
#include "fb_alloc.h"
|
#include "fb_alloc.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
#include "imlib.h"
|
#include "imlib.h"
|
||||||
#include "mdefs.h"
|
#include "common.h"
|
||||||
|
|
||||||
// Gamma uncompress
|
// Gamma uncompress
|
||||||
extern const float xyz_table[256];
|
extern const float xyz_table[256];
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
#include "ff.h"
|
#include "ff.h"
|
||||||
#include "mdefs.h"
|
|
||||||
#include "modnetwork.h"
|
#include "modnetwork.h"
|
||||||
|
|
||||||
#include "lib/utils/pyexec.h"
|
#include "lib/utils/pyexec.h"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user