Skip to content

Commit 3c4562c

Browse files
committed
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 ```
1 parent dc9bc8f commit 3c4562c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

shared-bindings/camera/ImageFormat.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
//| RGB565: ImageFormat
3939
//| """RGB565 format."""
4040
//|
41-
const mp_obj_type_t camera_imageformat_type;
4241

4342
const camera_imageformat_obj_t camera_imageformat_jpg_obj = {
4443
{ &camera_imageformat_type },

shared-bindings/camera/ImageFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef enum {
3535
IMAGEFORMAT_RGB565,
3636
} camera_imageformat_t;
3737

38-
const mp_obj_type_t camera_imageformat_type;
38+
extern const mp_obj_type_t camera_imageformat_type;
3939

4040
camera_imageformat_t camera_imageformat_obj_to_type(mp_obj_t obj);
4141
mp_obj_t camera_imageformat_type_to_obj(camera_imageformat_t mode);

0 commit comments

Comments
 (0)