Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

lp6m

🌴
On vacation
Block or report user

Report or block lp6m

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lp6m
lp6m / get_pcam_image2.cpp
Created Oct 22, 2018
Get Pcam 5C image through HLS core via V4L2 API
View get_pcam_image2.cpp
/*
Target board: ZYBO Z7-20
Kernel&Circuit:https://github.com/Digilent/Petalinux-Zybo-Z7-20
Distribution: Ubuntu 16.04
https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-16.04.3-minimal-armhf-2017-10-07.tar.xz
Thanks to @hokim.
Xilinx Form: https://forums.xilinx.com/t5/Embedded-Linux/can-t-get-image-from-PCam-5C-on-Ubuntu-running-on-ZYBO-Z7-20/m-p/882879#M28057
Before run this code, you must run the following commands.
@lp6m
lp6m / system_user.dtsi
Created Oct 22, 2018
Modified Device Tree
View system_user.dtsi
/include/ "system-conf.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/xilinx-vip.h>
/ {
model = "Zynq Zybo Z7 Development Board";
compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";
chosen {
bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
@lp6m
lp6m / system_user.dtsi
Created Oct 22, 2018
Cutom Device Tree
View system_user.dtsi
/include/ "system-conf.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/xilinx-vip.h>
/ {
model = "Zynq Zybo Z7 Development Board";
compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";
chosen {
bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
@lp6m
lp6m / pl.dtsi
Created Oct 22, 2018
Generated Device Tree by Petalinux
View pl.dtsi
/*
* CAUTION: This file is automatically generated by Xilinx.
* Version:
* Today is: Mon Oct 22 17:53:19 2018
*/
/ {
amba_pl: amba_pl {
#address-cells = <1>;
@lp6m
lp6m / system_user.dtsi
Created Oct 22, 2018
Modified Device Tree (inserted HLS IP)
View system_user.dtsi
/include/ "system-conf.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/xilinx-vip.h>
/ {
model = "Zynq Zybo Z7 Development Board";
compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";
chosen {
bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
@lp6m
lp6m / system_user.dtsi
Created Oct 22, 2018
Modified Device Tree (Inserted HLS IP)
View system_user.dtsi
/include/ "system-conf.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/xilinx-vip.h>
/ {
model = "Zynq Zybo Z7 Development Board";
compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";
chosen {
bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
@lp6m
lp6m / yuyvy.cpp
Created Oct 22, 2018
Extract Y 8bit data from YUYV 16bit data.
View yuyvy.cpp
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <hls_math.h>
#include <math.h>
//--- struct for image flowing through AXI4-Stream
template<int D>
struct im_axis{
ap_uint<D> data;
View test.cpp
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <hls_math.h>
#include <math.h>
//--- struct for image flowing through AXI4-Stream
template<int D>
struct im_axis{
ap_uint<D> data;
View gist:a7d70d293ee758b90254e8c7f2e1db8d
root@arm:~# sudo media-ctl -p /dev/video0
Media controller API version 4.9.0
Media device information
------------------------
driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
View gist:7addae393394583902b2da19ee18ae5e
root@arm:/home/ubuntu# echo 959 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio959/direction
echo 1 > /sys/class/gpio/gpio959/value
echo 0 > /sys/class/gpio/gpio959/value
root@arm:/home/ubuntu# sh cam.sh
waiting in xioctl()
bus_info : platform:video_cap:0
card : video_cap output 0
driver : xilinx-vipp
version : 264448
You can’t perform that action at this time.