diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-12-15 10:39:56 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-12-15 10:40:24 -0600 |
| commit | 3c4562c3caafa0590b63b32d680717363eb371bc (patch) | |
| tree | c25f7472428bd787e349fcfe288541b854876886 /shared-bindings/camera | |
| parent | dc9bc8fc9a078184447292f67b0a5b17a8917117 (diff) | |
camera: Provide correct forward-declaration of camera_imageformat_type
This resolves the build error
```
arm-none-eabi-ld: build-spresense/libmpy.a(Camera.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
arm-none-eabi-ld: build-spresense/libmpy.a(ImageFormat.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
arm-none-eabi-ld: build-spresense/libmpy.a(Camera.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
```
Diffstat (limited to 'shared-bindings/camera')
| -rw-r--r-- | shared-bindings/camera/ImageFormat.c | 1 | ||||
| -rw-r--r-- | shared-bindings/camera/ImageFormat.h | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/shared-bindings/camera/ImageFormat.c b/shared-bindings/camera/ImageFormat.c index d4bdddc56..9f2f9617f 100644 --- a/shared-bindings/camera/ImageFormat.c +++ b/shared-bindings/camera/ImageFormat.c @@ -38,7 +38,6 @@ //| RGB565: ImageFormat //| """RGB565 format.""" //| -const mp_obj_type_t camera_imageformat_type; const camera_imageformat_obj_t camera_imageformat_jpg_obj = { { &camera_imageformat_type }, diff --git a/shared-bindings/camera/ImageFormat.h b/shared-bindings/camera/ImageFormat.h index 8abc88438..32a36354f 100644 --- a/shared-bindings/camera/ImageFormat.h +++ b/shared-bindings/camera/ImageFormat.h @@ -35,7 +35,7 @@ typedef enum { IMAGEFORMAT_RGB565, } camera_imageformat_t; -const mp_obj_type_t camera_imageformat_type; +extern const mp_obj_type_t camera_imageformat_type; camera_imageformat_t camera_imageformat_obj_to_type(mp_obj_t obj); mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t mode); |
