Skip to content

Commit 98a6f76

Browse files
committed
drivers: video: removed header file
Header file was not shared and very small and it is now removed. Definitions are pulled into the source. Signed-off-by: Krystian Balicki <kristos_b@wp.pl>
1 parent f1a979f commit 98a6f76

File tree

2 files changed

+11
-29
lines changed

2 files changed

+11
-29
lines changed

‎drivers/video/video_arducam_mega.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <zephyr/drivers/video-controls.h>
1313
#include <zephyr/drivers/video.h>
1414
#include <zephyr/logging/log.h>
15-
#include <zephyr/drivers/video/arducam_mega.h>
1615

1716
#include "video_common.h"
1817
#include "video_ctrls.h"
@@ -145,6 +144,14 @@ enum mega_features {
145144
MEGA_HAS_FOCUS = 1 << 1,
146145
};
147146

147+
/* Arducam specific camera controls */
148+
#define VIDEO_CID_ARDUCAM_RESET (VIDEO_CID_PRIVATE_BASE + 1)
149+
#define VIDEO_CID_ARDUCAM_LOWPOWER (VIDEO_CID_PRIVATE_BASE + 2)
150+
151+
/* Read only registers */
152+
#define VIDEO_CID_ARDUCAM_SUPP_RES (VIDEO_CID_PRIVATE_BASE + 3)
153+
#define VIDEO_CID_ARDUCAM_SUPP_SP_EFF (VIDEO_CID_PRIVATE_BASE + 4)
154+
148155
#define ARDUCHIP_FIFO 0x04 /* FIFO and I2C control */
149156
#define ARDUCHIP_FIFO_2 0x07 /* FIFO and I2C control */
150157

@@ -206,6 +213,8 @@ enum mega_features {
206213
#define AC_STACK_SIZE 4096
207214
#define AC_PRIORITY 5
208215

216+
#define ARDUCAM_MEGA_CAPTURE_TRIES 200
217+
209218
K_THREAD_STACK_DEFINE(ac_stack_area, AC_STACK_SIZE);
210219

211220
struct k_work_q ac_work_q;
@@ -954,7 +963,7 @@ static int arducam_mega_capture(const struct device *dev, uint32_t *length)
954963
arducam_mega_write_reg(&cfg->bus, ARDUCHIP_FIFO, FIFO_CLEAR_ID_MASK);
955964
arducam_mega_write_reg(&cfg->bus, ARDUCHIP_FIFO, FIFO_START_MASK);
956965

957-
for (; tries > 0; tries--) {
966+
for (int tries = ARDUCAM_MEGA_CAPTURE_TRIES; tries > 0; tries--) {
958967
ret = arducam_mega_read_reg(&cfg->bus, ARDUCHIP_TRIG, &reg_data);
959968
if (ret < 0) {
960969
LOG_ERR("Capture timeout!");
@@ -1282,7 +1291,6 @@ static int arducam_mega_init(const struct device *dev)
12821291
{
12831292
const struct arducam_mega_config *cfg = dev->config;
12841293
struct arducam_mega_data *drv_data = dev->data;
1285-
12861294
struct video_format fmt;
12871295
int ret = 0;
12881296
uint32_t reg_data;

‎include/zephyr/drivers/video/arducam_mega.h‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)