当前位置: 首页 > news >正文

海思3559:BT656调试笔记

前言

  海思3559a的sdk例子是没有提供BT1120和BT656视频接入的,但实际上硬件是可以支持接入的。不过前提是只支持逐行方式输入,不支持隔行视频,如果想输入PAL制式的隔行视频,请先用芯片转成逐行再接入。不知道是官方手册有意无意的忽略还是太简单约定俗成,例程没有手册相关描述又非常模糊,这里给出SDK2.0.3.1版本的BT656输入调试笔记,输入由adv7280逐行给出

硬件部分:

   Hi3559AV100 DEV 与 MIPI/SLVS/BT.1120/BT.656/BT601/DC 接口的绑定关系如下
在这里插入图片描述
在这里插入图片描述
  说明不是所有的mipi都可以被当做cmos作采集复用的,相关电路原理图设计如下
在这里插入图片描述

  通过《Hi3559AV100_PINOUT_CN》可以查看对应的引脚,发现没有对应的配置寄存器,推测这块不需要我们来配置寄存器的,那就应该是VI CMOS2和MIPI RX Port2/MIPI RX Port3共用引脚通过使能对应接口时钟来选择。
在这里插入图片描述
  根据《Hi3559A╱C V100 ultra-HD Mobile Camera SoC 用户指南》中MIPI_RX频率配置寄存器(PERI_CRG65),要使能VI CMOS2时钟,应当把PERI_CRG65的bit[11:9]置为111
在这里插入图片描述
  此处有两种修改方式,阅读加载驱动的脚本load3559av100_multicore,之前传感器类型我们都选择的imx477作为模板加载,直接传入bt656在2.0.3.1版本的SDK里是会报not support的错误,根据报错信息可以找到Hi3559AV100_SDK_V2.0.3.1/drv/interdrv/sysconfig路径下的sysconfig.c
  module_init(hi_sysconfig_init);
    sensor_config(sensor_list);

static int sensor_config(char *s)
{int ret;int index;int clock;char* line;BUS_TYPE bus_type;char sensor_name[SENSOR_NAME_LEN];while ((line = strsep(&s, ":")) != NULL){int i;char* argv[8];for (i = 0; (argv[i] = strsep(&line, ",")) != NULL;){ret = parse_sensor_name(argv[i], sensor_name);if(ret >= 0){index = parse_sensor_index(argv[i]);//报错信息出处if (index >= 0){clock = parse_sensor_clock(sensor_name);bus_type = parse_sensor_bus_type(sensor_name);if (is_coms(sensor_name)){coms_clock_config(index);}else{sensor_bus_pin_mux(index, bus_type);sensor_clock_config(index, clock);}}}if (++i == ARRAY_SIZE(argv)){break;}}}return 0;}

      is_coms(sensor_name)

static int is_coms(char *name)
{unsigned int len;len = SENSOR_NAME_LEN;if (   (0 == strncmp("bt1120", name, len))|| (0 == strncmp("bt656", name, len))|| (0 == strncmp("bt601", name, len))){return 1;}else{return 0;}
}

第一种方式

  可见,传bt656在这里也仅仅是为了配置这个寄存器,那么我们直接传参后单独修改寄存器也是可以的,直接

devmem 0x12010104 32 0xCEBEDB

  个人觉得,归根结底到底层的实现肯定都是通过配置寄存器解决的,只是海思在驱动或者应用层的某些函数上帮我们封装好了,所以这个看似粗暴的办法,在分析清楚实现原理后,也是可以使用的

第二种方式

  第二种就是忽略掉parse_sensor_index的报错往下走,将coms_clock_config修改正确,官方的SDK包里这个配置是不正确的!!
  修改为

static void coms_clock_config(int index)
{if(0 == index){reg_write32(0x5 << 15, 0x7 << 15, (unsigned long)reg_crg_base+0x0104);}else if(1 == index){reg_write32(0x6 << 21, 0x7 << 21, (unsigned long)reg_crg_base+0x0104);}else if(2 == index){reg_write32(0x7 << 9, 0x7 << 9, (unsigned long)reg_crg_base+0x0104);}}

  重新编译sysconfig.ko即可,这个就不需要单独配置寄存器了

代码部分

sample/comoon路径下的samplecomm.h新增BT656枚举

typedef enum hiSAMPLE_SNS_TYPE_E
{SONY_IMX477_MIPI_12M_30FPS_12BIT,SONY_IMX477_MIPI_9M_50FPS_10BIT,SONY_IMX477_MIPI_8M_60FPS_12BIT,SONY_IMX477_MIPI_8M_30FPS_12BIT,SONY_IMX290_MIPI_2M_30FPS_12BIT,SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1,SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT,SONY_IMX334_MIPI_8M_30FPS_12BIT,SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1,SONY_IMX277_SLVS_8M_120FPS_10BIT,SONY_IMX277_SLVS_8M_30FPS_12BIT,SONY_IMX277_SLVS_8M_60FPS_12BIT,SONY_IMX277_SLVS_12M_30FPS_12BIT,SONY_IMX277_SLVS_2M_240FPS_12BIT,FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P,FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P,BT656_HX_TEST,SAMPLE_SNS_TYPE_BUTT,
} SAMPLE_SNS_TYPE_E;

sample/common路径下的sample_comm_vi.c

VI MIPI设置

  Hi3559AV100 第 0, 1 路 BT.656 与 MIPI 无关, 无需配置, 第 2 路需要配置 MIPI 输入模式为 INPUT_MODE_BT656, 且 devno 为对应的 CMOS 编号。

/* xin.han add BT656 */
combo_dev_attr_t MIPI_BT656_ATTR_HX =
{.devno = 2,.input_mode = INPUT_MODE_BT656,.data_rate = DATA_RATE_X1,.img_rect = {0, 0, 720, 576},{.mipi_attr ={DATA_TYPE_RAW_12BIT,// DATA_TYPE_YUV422_8BIT,// DATA_TYPE_RAW_8BIT,// DATA_TYPE_RAW_16BIT,HI_MIPI_WDR_MODE_NONE,{0, 1, 2, 3, -1, -1, -1, -1}}}//怀疑mipi属性这部分没起作用,毕竟也没用mipi
};

VI DEV 配置

接口模式: VI_MODE_BT656
Mask 设置: 只需设置 au32ComponentMask[0] = 0xFF000000
扫描格式: 只支持逐行 VI_SCAN_PROGRESSIVE
UV 顺序: UV 顺序根据实际输入时序确定,
VI_DATA_SEQ_UYVY/VI_DATA_SEQ_VYUY/VI_DATA_SEQ_YUYV/VI_DATA_
SEQ_YVYU。
数据类型: BT656 进 YUV 数据,因此是 VI_DATA_TYPE_YUV

VI_DEV_ATTR_S DEV_BT656_ATTR_HX =
{VI_MODE_BT656,VI_WORK_MODE_1Multiplex,{0x00FF0000, 0},//此处和官方手册的不一致VI_SCAN_PROGRESSIVE,{ -1, -1, -1, -1},VI_DATA_SEQ_YUYV,{VI_VSYNC_PULSE, VI_VSYNC_NEG_LOW, VI_HSYNC_VALID_SINGNAL,VI_HSYNC_NEG_HIGH, VI_VSYNC_VALID_SINGAL, VI_VSYNC_VALID_NEG_HIGH,{/*hsync_hfb    hsync_act    hsync_hhb*/0,            720,        0,/*vsync0_vhb vsync0_act vsync0_hhb*/0,            576,        0,/*vsync1_vhb vsync1_act vsync1_hhb*/0,            0,          0}},VI_DATA_TYPE_YUV,HI_FALSE,{720 , 576},{{{720 , 576},},{VI_REPHASE_MODE_NONE,VI_REPHASE_MODE_NONE}},{WDR_MODE_NONE,576},DATA_RATE_X1
};

掩码问题

在这里插入图片描述

VI PIPE 配置

 PIPE 的 bIspBypass 设置为 HI_TRUE。
 PIPE 的像素格式设置为 PIXEL_FORMAT_YVU_SEMIPLANAR_422。
 PIPE 的 bit 位宽 nBitWidth 设置为 DATA_BITWIDTH_8。

VI_PIPE_ATTR_S PIPE_BT656_ATTR_HX =
{VI_PIPE_BYPASS_NONE,HI_FALSE,//UV skip enableHI_TRUE,//ISP Bypass 不需要ISP所以TRUE720, 576,PIXEL_FORMAT_YVU_SEMIPLANAR_422,COMPRESS_MODE_NONE,DATA_BITWIDTH_8,HI_FALSE,{PIXEL_FORMAT_YVU_SEMIPLANAR_422,DATA_BITWIDTH_8,VI_NR_REF_FROM_RFR,COMPRESS_MODE_NONE},HI_FALSE,{-1, -1}
};

VI CHN设置

VI_CHN_ATTR_S CHN_BT656_ATTR_HX =
{{720, 576},PIXEL_FORMAT_YVU_SEMIPLANAR_422,DYNAMIC_RANGE_SDR8,VIDEO_FORMAT_LINEAR,COMPRESS_MODE_NONE,0,      0,1,{ -1, -1}
};

(2)新增sensor类型

static input_mode_t SAMPLE_COMM_VI_GetSnsInputMode(SAMPLE_SNS_TYPE_E enSnsType)
{input_mode_t enInputMode;switch (enSnsType){// printf("!!!!!!!!!!!!!!!enSnsTypeis %d!",enSnsType);case SONY_IMX277_SLVS_8M_120FPS_10BIT:  /*imx277 test*/case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:case SONY_IMX277_SLVS_12M_30FPS_12BIT:case SONY_IMX277_SLVS_2M_240FPS_12BIT:enInputMode = INPUT_MODE_SLVS;break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:enInputMode=INPUT_MODE_LVDS;break;case BT656_HX_TEST:enInputMode=INPUT_MODE_BT656;break;default:enInputMode = INPUT_MODE_MIPI;break;}return enInputMode;
}

(3)memcpy BT656的combo_dev_attr_t结构体

HI_S32 SAMPLE_COMM_VI_GetComboAttrBySns(SAMPLE_SNS_TYPE_E enSnsType, combo_dev_t MipiDev, combo_dev_attr_t* pstComboAttr)
{switch (enSnsType){// SAMPLE_PRT("!!!!!!!!!!!!!!!enSnsTypeis %d!",enSnsType);case SONY_IMX477_MIPI_12M_30FPS_12BIT:if (0 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX477_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (2 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (4 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN4_SENSOR_IMX477_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (6 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN6_SENSOR_IMX477_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else{SAMPLE_PRT("unsupported mipi dev :%d for SnsType :%d\n", MipiDev, enSnsType);}break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:if (0 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX477_10BIT_9M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (2 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_10BIT_9M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (4 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN4_SENSOR_IMX477_10BIT_9M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (6 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN6_SENSOR_IMX477_10BIT_9M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else{SAMPLE_PRT("unsupported mipi dev :%d for SnsType :%d\n", MipiDev, enSnsType);}break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:if (0 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX477_10BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (2 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_10BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (4 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_10BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (6 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN4_SENSOR_IMX477_10BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else{SAMPLE_PRT("unsupported mipi dev :%d for SnsType :%d\n",MipiDev, enSnsType);}break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:if (0 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX477_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (2 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (4 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN2_SENSOR_IMX477_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (6 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN4_SENSOR_IMX477_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else{SAMPLE_PRT("unsupported mipi dev :%d for SnsType :%d\n",MipiDev, enSnsType);}break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:if (0 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX290_12BIT_2M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else if (1 == MipiDev){hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN1_SENSOR_IMX290_12BIT_2M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}else{SAMPLE_PRT("unsupported mipi dev :%d for SnsType :%d\n",MipiDev, enSnsType);}break;case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX290_10BIT_2M_WDR3to1_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX334_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX334_12BIT_8M_WDR2to1_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &SLVS_8lane_CHN0_SENSOR_IMX277_10BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &SLVS_6lane_CHN0_SENSOR_IMX277_12BIT_8M_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &SLVS_6lane_CHN0_SENSOR_IMX277_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &SLVS_6lane_CHN0_SENSOR_IMX277_12BIT_2M_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &LVDS_4lane_CHN0_FPGA_CYCLONE_16BIT_xM_1080P_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &LVDS_4lane_CHN1_FPGA_CYCLONE_16BIT_xM_720P_NOWDR_ATTR, sizeof(combo_dev_attr_t));break;case BT656_HX_TEST:hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_BT656_ATTR_HX, sizeof(combo_dev_attr_t));break;default:SAMPLE_PRT("not support enSnsType: %d\n", enSnsType);hi_memcpy(pstComboAttr, sizeof(combo_dev_attr_t), &MIPI_4lane_CHN0_SENSOR_IMX477_12BIT_12M_NOWDR_ATTR, sizeof(combo_dev_attr_t));}return HI_SUCCESS;
}

(4)memcpy BT656的VI_DEV_ATTR_S结构体

HI_S32 SAMPLE_COMM_VI_GetDevAttrBySns(SAMPLE_SNS_TYPE_E enSnsType, VI_DEV_ATTR_S* pstViDevAttr)
{switch (enSnsType){// SAMPLE_PRT("!!!!!!!!!!!!!!!enSnsTypeis %d!",enSnsType);case SONY_IMX477_MIPI_12M_30FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX477_12M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX477_9M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX477_8M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX477_8M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX290_2M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX290_2M_BASE, sizeof(VI_DEV_ATTR_S));pstViDevAttr->au32ComponentMask[0] = 0xFFC00000;break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX334_8M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX334_8M_WDR2TO1_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX277_SLVS_8M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX277_SLVS_12M_BASE, sizeof(VI_DEV_ATTR_S));break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX277_SLVS_2M_BASE, sizeof(VI_DEV_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_FPGA_CYCLONE_1920x1080_BASE, sizeof(VI_DEV_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_FPGA_CYCLONE_720x576_BASE, sizeof(VI_DEV_ATTR_S));break;case BT656_HX_TEST:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_BT656_ATTR_HX, sizeof(VI_DEV_ATTR_S));break;default:hi_memcpy(pstViDevAttr, sizeof(VI_DEV_ATTR_S), &DEV_ATTR_IMX477_8M_BASE, sizeof(VI_DEV_ATTR_S));}return HI_SUCCESS;
}

(5)memcpy BT656的VI_PIPE_ATTR_S结构体

HI_S32 SAMPLE_COMM_VI_GetPipeAttrBySns(SAMPLE_SNS_TYPE_E enSnsType, VI_PIPE_ATTR_S* pstPipeAttr)
{switch (enSnsType){// printf("warning:!!!!!!!!!!!!!!!enSnsTypeis %d!",enSnsType);case SONY_IMX477_MIPI_12M_30FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_4000x3000_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3000x3000_RAW10_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW10_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_1920x1080_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_1920x1080_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));pstPipeAttr->enPixFmt = PIXEL_FORMAT_RGB_BAYER_10BPP;pstPipeAttr->enBitWidth = DATA_BITWIDTH_10;break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW10_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_4000x3000_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_1920x1080_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_FPGA_CYCLONE_ATTR_1920x1080_RAW16_422_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_FPGA_CYCLONE_ATTR_720x576_RAW16_422_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));break;case BT656_HX_TEST:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_BT656_ATTR_HX, sizeof(VI_PIPE_ATTR_S));break;default:hi_memcpy(pstPipeAttr, sizeof(VI_PIPE_ATTR_S), &PIPE_ATTR_3840x2160_RAW12_420_3DNR_RFR, sizeof(VI_PIPE_ATTR_S));}return HI_SUCCESS;
}

(6)memcpy BT656的VI_CHN_ATTR_S结构体

HI_S32 SAMPLE_COMM_VI_GetChnAttrBySns(SAMPLE_SNS_TYPE_E enSnsType, VI_CHN_ATTR_S* pstChnAttr)
{switch (enSnsType){// SAMPLE_PRT("!!!!!!!!!!!!!!!enSnsTypeis %d!",enSnsType);case SONY_IMX477_MIPI_12M_30FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_4000x3000_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3000x3000_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_1920x1080_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_1920x1080_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_4000x3000_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_1920x1080_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_FPGA_ATTR_1920x1080_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_FPGA_ATTR_720x576_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));break;case BT656_HX_TEST:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_BT656_ATTR_HX, sizeof(VI_CHN_ATTR_S));break;default:hi_memcpy(pstChnAttr, sizeof(VI_CHN_ATTR_S), &CHN_ATTR_3840x2160_420_SDR8_LINEAR, sizeof(VI_CHN_ATTR_S));}return HI_SUCCESS;
}

(7)根据模式选择不同分辨率

HI_S32 SAMPLE_COMM_VI_GetSizeBySensor(SAMPLE_SNS_TYPE_E enMode, PIC_SIZE_E* penSize)
{HI_S32 s32Ret = HI_SUCCESS;if (!penSize){return HI_FAILURE;}switch (enMode){SAMPLE_PRT("!!!!!!!!!!!!!!!enMode %d!",enMode);case SONY_IMX477_MIPI_12M_30FPS_12BIT:*penSize = PIC_4000x3000;break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:*penSize = PIC_3000x3000;break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:*penSize = PIC_3840x2160;break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:*penSize = PIC_3840x2160;break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:*penSize = PIC_1080P;break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:*penSize = PIC_3840x2160;break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:*penSize = PIC_3840x2160;break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:*penSize = PIC_4000x3000;break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:*penSize = PIC_1080P;break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:*penSize=PIC_1080P;break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:*penSize=PIC_D1_PAL;break;case BT656_HX_TEST:*penSize=PIC_D1_PAL;break;default:*penSize = PIC_3840x2160;break;}return s32Ret;
}

(8)根据模式选择正确的设备号

combo_dev_t SAMPLE_COMM_VI_GetComboDevBySensor(SAMPLE_SNS_TYPE_E enMode, HI_S32 s32SnsIdx)
{combo_dev_t dev = 0;switch (enMode){SAMPLE_PRT("!!!!!!!!!!!!!!!enMode %d!",enMode);case SONY_IMX477_MIPI_12M_30FPS_12BIT:case SONY_IMX477_MIPI_9M_50FPS_10BIT:case SONY_IMX477_MIPI_8M_60FPS_12BIT:case SONY_IMX477_MIPI_8M_30FPS_12BIT:case SONY_IMX290_MIPI_2M_30FPS_12BIT:case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:if(0 == s32SnsIdx){dev= 0;}else if(1 == s32SnsIdx){dev= 2;}else if(2 == s32SnsIdx){dev= 4;}else if(3 == s32SnsIdx){dev= 6;}break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:dev= 0;break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:dev= 2;break;case BT656_HX_TEST:dev= 2;break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:case SONY_IMX277_SLVS_8M_30FPS_12BIT:case SONY_IMX277_SLVS_8M_60FPS_12BIT:case SONY_IMX277_SLVS_12M_30FPS_12BIT:case SONY_IMX277_SLVS_2M_240FPS_12BIT:if(0 == s32SnsIdx){dev= 0;}else if(1 == s32SnsIdx){dev= 2; //8;}break;default:dev= 0;break;}return dev;
}

关于返回的dev的值
在这里插入图片描述
  结合手册之前的描述,推断:结构体combo_dev_attr_t的devno不是VI DEV号,也不是MIPI RX设备号(这里也根本没使用MIPI接口),而是VI CMOS号,本案例使用的是Hi3559A的VI CMOS2,因此devno = 2所以对应这里也返回的是2。

sample/common路径下的sampl_comm_isp.c

(1)新增结构体ISP_PUB_ATTR_S

ISP_PUB_ATTR_S BT656_HX_TEST =
{{0, 0, 720, 576},{720, 576},30,BAYER_GRBG,WDR_MODE_NONE,0,
};

(2)memcpy新增的ISP_PUB_ATTR_S结构体

HI_S32 SAMPLE_COMM_ISP_GetIspAttrBySns(SAMPLE_SNS_TYPE_E enSnsType, ISP_PUB_ATTR_S* pstPubAttr)
{switch (enSnsType){case SONY_IMX477_MIPI_12M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX477_12M_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX477_MIPI_9M_50FPS_10BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX477_9M_50FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX477_MIPI_8M_60FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX477_8M_60FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX477_MIPI_8M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX477_8M_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX290_2M_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX290_MIPI_2M_30FPS_12BIT_WDR3TO1:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX290_MIPI_2M_30FPS_WDR3TO1_LINE, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX334_SLAVE_MIPI_8M_30FPS_12BIT:case SONY_IMX334_MIPI_8M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX334_4K_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX334_MIPI_8M_30FPS_12BIT_WDR2TO1:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX334_4K_30FPS_WDR2TO1_LINE, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX277_SLVS_8M_120FPS_10BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX277_SLVS_8M_120FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX277_SLVS_8M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX277_SLVS_8M_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX277_SLVS_8M_60FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX277_SLVS_8M_60FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX277_SLVS_12M_30FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX277_SLVS_12M_30FPS, sizeof(ISP_PUB_ATTR_S));break;case SONY_IMX277_SLVS_2M_240FPS_12BIT:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX277_SLVS_2M_240FPS, sizeof(ISP_PUB_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_1080P:memcpy(pstPubAttr, &ISP_PUB_ATTR_FPGA_LVDS_xM_xFPS_1080P, sizeof(ISP_PUB_ATTR_S));break;case FPGA_CYCLONE_LVDS_XM_XFPS_16BIT_720P:memcpy(pstPubAttr, &ISP_PUB_ATTR_FPGA_LVDS_xM_xFPS_720P, sizeof(ISP_PUB_ATTR_S));break;case BT656_HX_TEST:memcpy(pstPubAttr, &BT656_HX_TEST, sizeof(ISP_PUB_ATTR_S));break;default:memcpy(pstPubAttr, &ISP_PUB_ATTR_IMX477_8M_30FPS, sizeof(ISP_PUB_ATTR_S));break;}return HI_SUCCESS;
}

修改makefile sample/Makefile.param,修改sensor类型

SENSOR0_TYPE ?= BT656_HX_TEST
SENSOR1_TYPE ?= BT656_HX_TEST
SENSOR2_TYPE ?= BT656_HX_TEST
SENSOR3_TYPE ?= BT656_HX_TEST

  加载ko文件时还是正常操作就可以

VI日志

  这些改完后就可以看到正确的VI日志而不是一团空白了
在这里插入图片描述
  作为软件部分可以确定一定以及肯定,已经全部修改完毕了。
  再出不来图像就需要联合硬件工程师排查电源,时钟,复位,甚至接线等问题(并口线在高速时要求相对会严格一些),联合逻辑工程师排查图像是否逐行,时钟可以测量到但是性能是否满足要求,物理层是否有数据流通。涉及匹配的电阻
  如果硬件确认无误后,结合当前的配置环境,可以在vi的日志上,查看中断的是否增长,图像有无丢失,帧率是否稳定,基本就可以确定vi调试OK了,后续vi绑定vpss,vpss在绑定venc参考venc的sample或者之前的rtsp拉流或者本地保存,就可以直接看到图像来进一步确定最后结果和成像质量了
在这里插入图片描述

相关文章:

海思3559:BT656调试笔记

前言 海思3559a的sdk例子是没有提供BT1120和BT656视频接入的&#xff0c;但实际上硬件是可以支持接入的。不过前提是只支持逐行方式输入&#xff0c;不支持隔行视频&#xff0c;如果想输入PAL制式的隔行视频&#xff0c;请先用芯片转成逐行再接入。不知道是官方手册有意无意的忽…...

reactor之hooks

Hooks 是一个工具类&#xff0c;它提供了一些方法&#xff0c;用来在 Reactor 的各个阶段添加回调函数&#xff0c;进行全局性的操作。总体来说分为三类&#xff1a; 本部分算是reactor中比较高级的部分&#xff0c;建议在开始上手用reactor做项目前&#xff0c;大概知道有这么…...

单片AR眼镜Monocle揭秘:基于反射棱镜,重15g续航1小时

提问&#xff1a;一个戴近视眼镜的人&#xff0c;会愿意再同时戴一副AR眼镜吗&#xff1f;这个问题对于VR来说并不难&#xff0c;通常VR头显为镜框留出了空间&#xff08;一些Pancake VR自带屈光调节机制&#xff09;&#xff0c;因此二者并不冲突。然而AR眼镜体积更紧凑&#…...

计算机视觉框架OpenMMLab开源学习(五):目标检测实战

✨写在前面&#xff1a;强烈推荐给大家一个优秀的人工智能学习网站&#xff0c;内容包括人工智能基础、机器学习、深度学习神经网络等&#xff0c;详细介绍各部分概念及实战教程&#xff0c;通俗易懂&#xff0c;非常适合人工智能领域初学者及研究者学习。➡️点击跳转到网站。…...

SpringIOC推导IOC初步

了解准备 什么是Spring&#xff1f; Spring是一款轻量级的控制反转&#xff08;IOC&#xff09;和面向切面编程&#xff08;AOP&#xff09;的非入侵式开源框架 2002年Spring的前身interface21发布&#xff0c;随后在2004年3月24日正式更名发布Spring1.0版本Spring Frameword缔…...

Linux(centOS7)虚拟机中配置 vim

&#x1f44f;作者简介&#xff1a;大家好&#xff0c;我是小童&#xff0c;Java开发工程师&#xff0c;CSDN博客博主&#xff0c;Java领域新星创作者 &#x1f4d5;系列专栏&#xff1a;前端、Java、Java中间件大全、微信小程序、微信支付、若依框架、Spring全家桶 &#x1f4…...

消息中间件-RocketMQ入门 消息发送的三种方式

消息中间件-RocketMQ入门 消息发送的三种方式消息中间件简介应用场景常用消息中间件RocketMQ核心概念入门案例-生产者和消费者代码逻辑消息发送的三种方式同步发送异步发送一次性消息消息中间件简介 应用场景 假设现在有订单微服务和积分微服务,正常请求流程之后是不是一个订…...

【FLASH存储器系列十九】固态硬盘掉电后如何恢复掉电前状态?

掉电分两种&#xff0c;一种是正常掉电&#xff0c;另一种是异常掉电。不管是哪种原因导致的掉电&#xff0c;我们都希望&#xff0c;重新上电后&#xff0c;SSD都需要能从掉电中恢复过来&#xff0c;继续正常工作。正常掉电恢复&#xff0c;这个好理解&#xff0c;主机通知SSD…...

Java知识点细节简易汇总——(7)面向对象编程(高级部分)

一、类变量、静态变量static static访问方式&#xff1a; public class VisitStatic {public static void main(String[] args) {//方法一://类名.类变量名//说明&#xff1a;类变量是随着类的加载而创建&#xff0c;所以即使没有创建对象实例也可以访问System.out.println(A.…...

阻塞式队列-生产者消费者模型

1.阻塞队列是什么 阻塞队列是一种特殊的队列. 也遵守 "先进先出" 的原则. 阻塞队列能是一种线程安全的数据结构, 并且具有以下特性: 当队列满的时候, 继续入队列就会阻塞, 直到有其他线程从队列中取走元素.当队列空的时候, 继续出队列也会阻塞, 直到有其他线程往队…...

引导滤波code

文章目录1. 原理概述2. 实验环节2.1 验证与opencv 库函数的结果一致2.2 与 双边滤波比较2.3 引导滤波应用&#xff0c;fathering2.3 引导滤波应用&#xff0c;图像增强2.4 灰度图引导&#xff0c;和各自通道引导的效果差异2.5 不同参数设置影响3. 参考引导滤波1. 原理概述 引导…...

Leetcode.2353 设计食物评分系统

题目链接 Leetcode.2353 设计食物评分系统 Rating &#xff1a; 1782 题目描述 设计一个支持下述操作的食物评分系统&#xff1a; 修改 系统中列出的某种食物的评分。 返回系统中某一类烹饪方式下评分最高的食物。 实现 FoodRatings类&#xff1a; FoodRatings(String[] foo…...

C语言学习_DAY_2_变量的定义_输入与输出

高质量博主&#xff0c;点个关注不迷路&#x1f338;&#x1f338;&#x1f338;&#xff01; 目录 I. 变量的定义 II. 变量的赋值 III. 输出 IV. 输入 I. 变量的定义 首先&#xff0c;我们新建一个.c文件在Dev C中&#xff0c;并把之前定义好的程序框架放进去。 此时我…...

mac 安装navicat

由于各种原因发布不了链接&#xff0c;这里记录下&#xff0c;保存在了阿里云里...

RocketMQ快速入门

2.1 消息生产和消费介绍使用RocketMQ可以发送普通消息、顺序消息、事务消息&#xff0c;顺序消息能实现有序消费&#xff0c;事务消息可以解决分布式事务实现数据最终一致。RocketMQ有2种常见的消费模式,分别是DefaultMQPushConsumer和DefaultMQPullConsumer模式&#xff0c;这…...

【虚拟仿真】Unity3D实现从浏览器拉起本地exe程序并传参数

推荐阅读 CSDN主页GitHub开源地址Unity3D插件分享简书地址我的个人博客 大家好&#xff0c;我是佛系工程师☆恬静的小魔龙☆&#xff0c;不定时更新Unity开发技巧&#xff0c;觉得有用记得一键三连哦。 一、前言 最近有项目需求&#xff0c;从浏览器调起来本地的exe程序&…...

Intel中断体系(1)中断与异常处理

文章目录概述中断与异常中断可屏蔽中断与不可屏蔽中断&#xff08;NMI&#xff09;异常异常分类中断与异常向量中断描述符表中断描述符中断与异常处理中断与异常处理过程堆栈切换错误码64位模式下的中断异常处理64位中断描述符64位处理器下的堆栈切换相关参考概述 中断是现代计…...

财报解读:四季度营收超预期,优步却越来越“不务正业”了

“公司第四季度的业绩表现将是强劲的”。 公布2022年第三季度财报时&#xff0c;优步的高管给出了这样的预告&#xff0c;给资本市场打了一针“强心剂”。然而有人对此表示质疑&#xff0c;后疫情时代&#xff0c;带着新模式、新车型的全新网约车公司层出不穷&#xff0c;车企…...

C语言-程序环境和预处理(14.2)

目录 预处理详解 1.预定义符号 2. #define 2.1 #define定义标识符 2.2 #define 定义宏 2.3 #define 替换规则 注意事项&#xff1a; 2.4 #和## 2.5 带副作用的宏参数 2.6 宏和函数对比 3. #undef 4. 条件编译 4.1 单分支条件编译 4.2 多分支条件编译 4.3 判断是…...

VHDL语言基础-时序逻辑电路-计数器

目录 计数器的设计&#xff1a; 计数器的作用&#xff1a; 计数器的实现&#xff1a; 1、用“”函数描述&#xff1a; 用T触发器级联构成的串行进位的二进制加法计数器的仿真波形&#xff1a; 计数器的仿真&#xff1a; 计数器的设计&#xff1a; 计数是一种最简单基本的…...

MySQL数据库07——高级条件查询

前面一章介绍了基础的一个条件的查询&#xff0c;如果多条件&#xff0c;涉及到逻辑运算&#xff0c;and or 之类的。就是高级一点的条件查询。本章来介绍复杂的条件搜索表达式。 AND运算符 AND运算符只有当两边操作数均为True时&#xff0c;最后结果才为True。人们使用AND描述…...

《Terraform 101 从入门到实践》 第四章 States状态管理

《Terraform 101 从入门到实践》这本小册在南瓜慢说官方网站和GitHub两个地方同步更新&#xff0c;书中的示例代码也是放在GitHub上&#xff0c;方便大家参考查看。 军书十二卷&#xff0c;卷卷有爷名。 为什么需要状态管理 Terraform的主要作用是管理云平台上的资源&#xff…...

数据结构之二叉树

&#x1f388;一.二叉树相关概念 1.树 树是一种非线性的数据结构&#xff0c;它是由n&#xff08;n>0&#xff09;个有限结点组成一个具有层次关系的集合&#xff0c;树结构通常用来存储逻辑关系为 "一对多" 的数据。例如&#xff1a; 关于树的几个重要概念&…...

上海亚商投顾:三大指数集体调整 消费板块逆市活跃

上海亚商投顾前言&#xff1a;无惧大盘涨跌&#xff0c;解密龙虎榜资金&#xff0c;跟踪一线游资和机构资金动向&#xff0c;识别短期热点和强势个股。市场情绪三大指数今日集体调整&#xff0c;沪指全天弱势震荡&#xff0c;创业板指盘中跌超1%。旅游、食品、乳业等大消费板块…...

【2023unity游戏制作-mango的冒险】-开始画面API制作

&#x1f468;‍&#x1f4bb;个人主页&#xff1a;元宇宙-秩沅 hallo 欢迎 点赞&#x1f44d; 收藏⭐ 留言&#x1f4dd; 加关注✅! 本文由 秩沅 原创 收录于专栏&#xff1a;游戏制作 ⭐mango的冒险-开始画面制作⭐ 文章目录⭐mango的冒险-开始画面制作⭐&#x1f468;‍&…...

【微服务】Nacos配置管理

&#x1f6a9;本文已收录至专栏&#xff1a;微服务探索之旅 &#x1f44d;希望您能有所收获 Nacos除了可以做配置管理&#xff0c;同样可以当作注册中心来使用。 了解注册中心用法点击跳转&#x1f449;【微服务】Nacos注册中心 一.引入 当微服务部署的实例越来越多&#xff0…...

【C++】类与对象理解和学习(上)

专栏放在【C知识总结】&#xff0c;会持续更新&#xff0c;期待支持&#x1f339;类是什么&#xff1f;类是对对象进行描述的&#xff0c;是一个模型一样的东西&#xff0c;限定了类有哪些成员&#xff0c;定义出一个类并没有分配实际的内存空间来存储它&#xff08;实例化后才…...

Pyqt5小案例,界面与逻辑分离的小计算器程序

直接看下最终效果&#xff1a; 使用技术总结 使用Designer设计界面 使用pyuic5命令导出到python文件 新建逻辑处理文件&#xff0c;继承pyuic5导出的文件的类&#xff0c;在里面编写信号与槽的处理逻辑 使用Designer设计界面 要使用Designer&#xff0c;安装一个Python库即…...

leaflet加载KML文件,显示图形(方法2)

第049个 点击查看专栏目录 本示例的目的是介绍演示如何在vue+leaflet中加载KML文件,将图形显示在地图上。 直接复制下面的 vue+openlayers源代码,操作2分钟即可运行实现效果; 注意如果OpenStreetMap无法加载,请加载其他来练习 文章目录 示例效果配置方式示例源代码(共66…...

Mysql 部署 MGR 集群

0. 参考文章 官方文档&#xff1a; MySQL :: MySQL 8.0 Reference Manual :: 18.2 Getting Started 博客&#xff1a; MGR 单主模式部署教程&#xff08;基于 MySQL 8.0.28&#xff09; - 墨天轮 (modb.pro) mysql MGR单主模式的搭建 - 墨天轮 (modb.pro) MySQL 5.7 基于…...

低价做网站/佛山网站建设模板

写入文件操作 加载文件模块操作 const fs require(fs/promises);实现写文件操作 let msg Hello World, 你好世界!;调用 fs.writeFile() 进行文件写入 // fs.writeFile(file, data[, options], callback) fs.writeFile(./hello.txt, msg, utf8, function(err) {// console.log…...

网站建设服务器百度云/竞价推广培训课程

2019独角兽企业重金招聘Python工程师标准>>> 公司有同事用foxmail无法正常收取james的邮件。而且在收取时&#xff0c;其他服务部的同事表示后台连接不上。判断是数据库连接问题或james连接并发的问题。 当你在具有很多TCP/IP连接的Windows上运行MySQL服务器&#x…...

无锡网站推广公司/app制作公司

转载于:https://www.cnblogs.com/nkwy2012/p/7975808.html...

上海网站建设领导品牌/广东企业网站seo哪里好

不等待即关注简介硫化天然橡胶是一种非线性材料&#xff0c;具有低剪切模量、低弹性模量、几乎不可压缩和断裂伸长率高的特点。典型的橡胶单轴拉伸应力应变曲线如下图所示&#xff0c;我们可以通过宏观单元对于橡胶支座进行模拟&#xff0c;详情请看&#xff08;【JY】基于Rmbe…...

查看网站用什么语言做的/科学新概念seo外链平台

Javascript for循环例题(26道) for循环案例 JavaScript for循环 26题目录 转载注明出处Javascript for循环例题(26道) for循环案例1、输出1-1002、求1-100所有数的平均值3、求1-100所有奇数和偶数的和4、求1-100所有能被3整除的数字的和5、用户输入打印相对应行列的星星6、假如…...

重庆网站建设与网络推广/怎样制作一个网站

Java几种常见的四舍五入的方法 题目要CSS布局HTML小编今天和大家分享编写一个四舍五入的函数,要CSS布局HTML小编今天和大家分享可以保留到小数点后面的任意一位。 java四舍五入的函数:Math.round 语法: Math.round(x); 参数: x 为一数值。 解释: 方法。返回对参数x四舍五入…...