Skip to content

Commit 0b1cbd6

Browse files
committed
Correct return type of I2SCamera::dmaBufferInit
Lack of return statement in this function was causing compilation to fail: C:\Users\per\AppData\Local\Temp\arduino_build_111040\sketch\I2SCamera.cpp: In static member function 'static bool I2SCamera::dmaBufferInit(int)': I2SCamera.cpp:215: error: no return statement in function returning non-void [-Werror=return-type] } ^ cc1plus.exe: some warnings being treated as errors
1 parent 3767079 commit 0b1cbd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

I2SCamera.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ bool I2SCamera::i2sInit(const int VSYNC, const int HREF, const int PCLK, const i
201201
return true;
202202
}
203203

204-
bool I2SCamera::dmaBufferInit(int bytes)
204+
void I2SCamera::dmaBufferInit(int bytes)
205205
{
206206
dmaBufferCount = 2;
207207
dmaBuffer = (DMABuffer**) malloc(sizeof(DMABuffer*) * dmaBufferCount);

I2SCamera.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class I2SCamera
8282
static void i2sStop();
8383
static void i2sRun();
8484

85-
static bool dmaBufferInit(int bytes);
85+
static void dmaBufferInit(int bytes);
8686
static void dmaBufferDeinit();
8787

8888
static bool initVSync(int pin);

0 commit comments

Comments
 (0)