drivers/video: Update API to dump register for debug
This commit is contained in:
parent
1332bdb9a7
commit
277c8e368b
@ -150,6 +150,16 @@ config VIDEO_ISX012
|
||||
default n
|
||||
select I2C
|
||||
|
||||
if VIDEO_ISX012
|
||||
|
||||
config VIDEO_ISX012_REGDEBUG
|
||||
bool "Enable to read registers of ISX012 for test"
|
||||
default n
|
||||
---help---
|
||||
Enable to read registers of ISX012 for test.
|
||||
|
||||
endif
|
||||
|
||||
config VIDEO_ISX019
|
||||
bool "ISX019 Image sensor"
|
||||
default n
|
||||
@ -183,6 +193,20 @@ config VIDEO_ISX019_INITIAL_JPEG_QUALITY
|
||||
---help---
|
||||
The initial JPEG quality.
|
||||
|
||||
config VIDEO_ISX019_NAME_WITH_VERSION
|
||||
bool "ISX019 Image sensor name with version number"
|
||||
default n
|
||||
---help---
|
||||
ISX019 Camera board has FPGA for encoding JPEG image.
|
||||
This FPGA has a version number for the circuit.
|
||||
This option enables to report FPGA version with driver name.
|
||||
|
||||
config VIDEO_ISX019_REGDEBUG
|
||||
bool "Enable to read registers of ISX019 for test"
|
||||
default n
|
||||
---help---
|
||||
Enable to read registers of ISX019 for test.
|
||||
|
||||
endif
|
||||
|
||||
config VIDEO_OV2640
|
||||
|
@ -2965,3 +2965,24 @@ int isx012_uninitialize(void)
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_VIDEO_ISX012_REGDEBUG
|
||||
int isx012_read_register(uint16_t addr, FAR uint8_t *buf, uint8_t size)
|
||||
{
|
||||
uint16_t buf16;
|
||||
|
||||
if (buf == NULL)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (size > 2)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
buf16 = isx012_getreg(&g_isx012_private, addr, size);
|
||||
memcpy(buf, &buf16, size);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
@ -1228,7 +1228,7 @@ static int isx019_uninit(void)
|
||||
static FAR const char *isx019_get_driver_name(void)
|
||||
{
|
||||
#ifdef CONFIG_VIDEO_ISX019_NAME_WITH_VERSION
|
||||
static char name[16];
|
||||
static char name[20];
|
||||
uint8_t f_ver = 0;
|
||||
uint16_t is_ver = 0;
|
||||
|
||||
|
@ -53,7 +53,9 @@ extern "C"
|
||||
|
||||
int isx012_initialize(void);
|
||||
int isx012_uninitialize(void);
|
||||
|
||||
#ifdef CONFIG_VIDEO_ISX012_REGDEBUG
|
||||
int isx012_read_register(uint16_t addr, FAR uint8_t *buf, uint8_t size);
|
||||
#endif
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user