Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Trace_Program2 GR-PEACH_Camera_in_barcode GR-PEACH_LCD_sample GR-PEACH_LCD_4_3inch_sample ... more
Video library for GR-PEACH.
Hello World!
Import programGR-PEACH_Camera_in
Camera in sample for GR-PEACH. This sample works on GR-LYCHEE besides GR-PEACH.
API
Import library
Interface
See the Pinout page for more details
Revision 2:3149baf7925b, committed 2015-11-25
- Comitter:
- dkato
- Date:
- Wed Nov 25 05:11:29 2015 +0000
- Parent:
- 1:fe90cfd5fe25
- Child:
- 3:e0e475089616
- Commit message:
- Added functionality for select the pin for inputting composite video signals.
Changed in this revision
--- a/DisplayBace.h Thu Oct 01 07:12:34 2015 +0000
+++ b/DisplayBace.h Wed Nov 25 05:11:29 2015 +0000
@@ -45,6 +45,14 @@
VIDEO_INPUT_CHANNEL_1 /*!< Video input channel 1 */
} video_input_channel_t;
+ /*! @enum video_adc_vinsel_t
+ @brief Input pin control
+ */
+ typedef enum {
+ VIDEO_ADC_VINSEL_VIN1 = 0, /*!< VIN1 input */
+ VIDEO_ADC_VINSEL_VIN2 /*!< VIN2 input */
+ } video_adc_vinsel_t;
+
/*! @enum graphics_layer_t
@brief Graphics layer select
*/
@@ -109,7 +117,7 @@
LCD_TCON_PIN_NON = -1, /*!< Not using output */
LCD_TCON_PIN_0, /*!< LCD_TCON0 */
LCD_TCON_PIN_1, /*!< LCD_TCON1 */
- LCD_TCON_PIN_2, /*!< LCD_TCON2 */
+ LCD_TCON_PIN_2, /*!< LCD_TCON2 */
LCD_TCON_PIN_3 /*!< LCD_TCON3 */
} lcd_tcon_pin_t;
@@ -471,6 +479,9 @@
* - PAL format : Max height is 520[px]
* @param[in] video_write_buff_hw : Output width[px] <br />
* - Max width : 800[px]
+ * @param[in] video_adc_vinsel : Input pin control <br />
+ * - VIDEO_ADC_VINSEL_VIN1 : VIN1 input
+ * - VIDEO_ADC_VINSEL_VIN2 : VIN2 input
* @retval Error code
*/
graphics_error_t Video_Write_Setting (
@@ -481,7 +492,8 @@
video_format_t video_format,
wr_rd_swa_t wr_rd_swa,
unsigned short video_write_buff_vw,
- unsigned short video_write_buff_hw );
+ unsigned short video_write_buff_hw,
+ video_adc_vinsel_t video_adc_vinsel = VIDEO_ADC_VINSEL_VIN1 );
/** Video surface write buffer change process
* @param[in] video_input_channel : Video input channel <br />
--- a/DisplayBase.cpp Thu Oct 01 07:12:34 2015 +0000
+++ b/DisplayBase.cpp Wed Nov 25 05:11:29 2015 +0000
@@ -358,6 +358,7 @@
* - WR_RD_WRSWA_32_16_8BIT : Swapped in 32-bit units + 16-bit units + 8-bit units: 8-7-6-5-4-3-2-1
* @param[in] video_write_size_vw [px]: output v width
* @param[in] video_write_size_hw [px]: output h width
+ * @param[in] video_adc_vinsel : Input pin control
* @retval Error code
******************************************************************************/
DisplayBase::graphics_error_t
@@ -369,7 +370,9 @@
video_format_t video_format,
wr_rd_swa_t wr_rd_swa,
unsigned short write_buff_vw,
- unsigned short write_buff_hw )
+ unsigned short write_buff_hw,
+ video_adc_vinsel_t video_adc_vinsel )
+
{
graphics_error_t error = GRAPHICS_OK;
@@ -396,7 +399,8 @@
(drv_video_format_t)video_format,
(drv_wr_rd_swa_t)wr_rd_swa,
write_buff_vw,
- write_buff_hw);
+ write_buff_hw,
+ (drv_video_adc_vinsel_t)video_adc_vinsel);
}
} else if( _video_input_sel == INPUT_SEL_EXT ) {
rect_t cap_area;
--- a/gr_peach_vdc5.c Thu Oct 01 07:12:34 2015 +0000
+++ b/gr_peach_vdc5.c Wed Nov 25 05:11:29 2015 +0000
@@ -942,6 +942,7 @@
* @param[in] wr_rd_swa : Frame buffer swap setting
* @param[in] video_write_size_vw [px]: output height
* @param[in] video_write_size_hw [px]: output width
+ * @param[in] video_adc_vinsel : Input pin control
* @retval Error code
******************************************************************************/
drv_graphics_error_t DRV_Video_Write_Setting (
@@ -952,7 +953,8 @@
drv_video_format_t video_format,
drv_wr_rd_swa_t wr_rd_swa,
uint16_t video_write_buff_vw,
- uint16_t video_write_buff_hw )
+ uint16_t video_write_buff_hw,
+ drv_video_adc_vinsel_t video_adc_vinsel )
{
drv_graphics_error_t drv_error = DRV_GRAPHICS_OK;
vdc5_channel_t ch = VDC5_CHANNEL_0;
@@ -966,9 +968,9 @@
uint8_t * framebuffer_b;
if( video_input_ch == DRV_VIDEO_INPUT_CHANNEL_0 ) {
- GRAPHICS_VideoDecoderInit( VDEC_ADC_VINSEL_VIN1, VDEC_CHANNEL_0, (graphics_col_sys_t)col_sys );
+ GRAPHICS_VideoDecoderInit( (vdec_adc_vinsel_t)video_adc_vinsel, VDEC_CHANNEL_0, (graphics_col_sys_t)col_sys );
} else if( video_input_ch == DRV_VIDEO_INPUT_CHANNEL_1 ) {
- GRAPHICS_VideoDecoderInit( VDEC_ADC_VINSEL_VIN1, VDEC_CHANNEL_1, (graphics_col_sys_t)col_sys );
+ GRAPHICS_VideoDecoderInit( (vdec_adc_vinsel_t)video_adc_vinsel, VDEC_CHANNEL_1, (graphics_col_sys_t)col_sys );
} else {
drv_error = DRV_GRAPHICS_CHANNEL_ERR;
}
--- a/gr_peach_vdc5.h Thu Oct 01 07:12:34 2015 +0000
+++ b/gr_peach_vdc5.h Wed Nov 25 05:11:29 2015 +0000
@@ -72,6 +72,12 @@
DRV_VIDEO_INPUT_CHANNEL_1 /* video input channel 1 */
} drv_video_input_channel_t;
+/* input pin control */
+typedef enum {
+ DRV_VIDEO_ADC_VINSEL_VIN1 = 0, /* VIN1 input */
+ DRV_VIDEO_ADC_VINSEL_VIN2 /* VIN2 input */
+} drv_video_adc_vinsel_t;
+
/* graphics layer select */
typedef enum {
DRV_GRAPHICS_LAYER_0 = 0, /* graphics layer 0 */
@@ -294,7 +300,8 @@
drv_video_format_t video_format,
drv_wr_rd_swa_t wr_rd_swa,
uint16_t video_write_buff_vw,
- uint16_t video_write_buff_hw );
+ uint16_t video_write_buff_hw,
+ drv_video_adc_vinsel_t video_adc_vinsel );
drv_graphics_error_t DRV_Video_Write_Setting_Digital (
void * framebuff,
