ESP32S3+HX8347+RGB运行LVGL例程

        之前用3线SPI驱动的HX8347屏其实是一个RGB屏,SPI只是用来给RGB屏幕的做配置的,当然也可以用来驱动屏幕,但是3线SPI驱动能力终究有限。本文谈一下用RGB方式来驱动。

        RGB接线比较多,为此做了个转接板:

71b5cf3d02284036915a5b39948e1ef3.png 07ea742514b640849753d2904bd1cd82.jpg

一、源码

1、screen_rgb_spi.c用于SPI初始化屏幕

screen_rgb_spi.h

#ifndef SCREEN_RGB_SPI_H_
#define SCREEN_RGB_SPI_H_void rgb_spi_init(void) ;#endif

 screen_rgb_spi.c

#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "soc/soc_caps.h"
#include "driver/gpio.h"
#include "driver/spi_master.h"
#include "esp_log.h"
#include "screen_rgb_spi.h"static const char *TAG = "SCREN_REG_SPI";#define LCD_HOST    SPI2_HOST#define PIN_NUM_MISO 4 //37
#define PIN_NUM_MOSI 5 //36
#define PIN_NUM_CLK  3 //38
#define PIN_NUM_CS   6 //35#define PIN_NUM_DC   -1
#define PIN_NUM_RST  2 //39
#define PIN_NUM_BCKL 1static spi_device_handle_t g_screen_spi;static int lcd_cs_port(int status)
{if (status) {gpio_set_level(PIN_NUM_CS, 1);} else {gpio_set_level(PIN_NUM_CS, 0);}return 0;
}static void spi_writeData(spi_device_handle_t spi,uint8_t data)
{esp_err_t ret;spi_transaction_t t;memset(&t, 0, sizeof(t));t.length = 8;t.tx_buffer = &data;ret = spi_device_polling_transmit(spi, &t);  //Transmit!assert(ret==ESP_OK);
}static void lcd_cmd(spi_device_handle_t spi, const uint8_t data) {lcd_cs_port(0);spi_writeData(spi,0x70);spi_writeData(spi,data);lcd_cs_port(1);
}static void lcd_data(spi_device_handle_t spi, const uint8_t data) {lcd_cs_port(0);spi_writeData(spi,0x72);spi_writeData(spi,data);lcd_cs_port(1);
}static void LCD_WriteComm(uint8_t cmd) {lcd_cmd(g_screen_spi, cmd);
}static void LCD_WriteData(uint8_t data) {lcd_data(g_screen_spi, data);
}void LCD_WriteData_16Bit(uint16_t Data)
{lcd_cs_port(0);spi_writeData(g_screen_spi,0x72);spi_writeData(g_screen_spi,Data>>8);spi_writeData(g_screen_spi,Data);lcd_cs_port(1);
}
void Lcd_Write_REG(uint8_t Index,uint8_t Data)
{LCD_WriteComm(Index);LCD_WriteData(Data);
}void LCD_Init(void)
{gpio_set_level(PIN_NUM_BCKL,1);gpio_set_level(PIN_NUM_RST, 0);vTaskDelay(100/portTICK_PERIOD_MS);gpio_set_level(PIN_NUM_RST, 1);vTaskDelay(100/portTICK_PERIOD_MS);Lcd_Write_REG(0x18,0xff);        //UADJ 75HzLcd_Write_REG(0x19,0x01);        //OSC_EN='1', start Osc//Power Voltage SettingLcd_Write_REG(0x1B,0x1E); // 1e VRH=4.60VLcd_Write_REG(0x1C,0x07); //AP Crosstalk    04Lcd_Write_REG(0x1A,0x01); //BT (VGH~15V,VGL~-10V,DDVDH~5V)Lcd_Write_REG(0x24,0x38); //VMH 27Lcd_Write_REG(0x25,0x5F); //VML//VCOM offsetLcd_Write_REG(0x23,0x8C); //for Flicker adjustLcd_Write_REG(0x1F,0x88);// GAS=1, VOMG=00, PON=0, DK=1, XDK=0, DVDH_TRI=0, STB=0vTaskDelay(5/portTICK_PERIOD_MS);Lcd_Write_REG(0x1F,0x80);// GAS=1, VOMG=00, PON=0, DK=0, XDK=0, DVDH_TRI=0, STB=0vTaskDelay(5/portTICK_PERIOD_MS);Lcd_Write_REG(0x1F,0x90);// GAS=1, VOMG=00, PON=1, DK=0, XDK=0, DVDH_TRI=0, STB=0vTaskDelay(5/portTICK_PERIOD_MS);Lcd_Write_REG(0x1F,0xD0);// GAS=1, VOMG=10, PON=1, DK=0, XDK=0, DDVDH_TRI=0, STB=0vTaskDelay(5/portTICK_PERIOD_MS);//Display ON SettingLcd_Write_REG(0x28,0x38);   //GON=1, DTE=1, D=1000vTaskDelay(40/portTICK_PERIOD_MS);Lcd_Write_REG(0x28,0x3C);   //GON=1, DTE=1, D=1100Lcd_Write_REG(0x36,0x09);   //09 REV, BGR 翻转 RGB控制Lcd_Write_REG(0x17,0x50);  //16BIT/PIXEL
// //Gamma 2.2 Setting
Lcd_Write_REG(0x40,0x01); //
Lcd_Write_REG(0x41,0x00); //
Lcd_Write_REG(0x42,0x00); //
Lcd_Write_REG(0x43,0x10); //
Lcd_Write_REG(0x44,0x0E); //
Lcd_Write_REG(0x45,0x24); //
Lcd_Write_REG(0x46,0x04); //
Lcd_Write_REG(0x47,0x50); //
Lcd_Write_REG(0x48,0x02); //
Lcd_Write_REG(0x49,0x13); //
Lcd_Write_REG(0x4A,0x19); //
Lcd_Write_REG(0x4B,0x19); //
Lcd_Write_REG(0x4C,0x16); //
Lcd_Write_REG(0x50,0x1B); //
Lcd_Write_REG(0x51,0x31); //
Lcd_Write_REG(0x52,0x2F); //
Lcd_Write_REG(0x53,0x3F); //
Lcd_Write_REG(0x54,0x3F); //
Lcd_Write_REG(0x55,0x3E); //
Lcd_Write_REG(0x56,0x2F); //
Lcd_Write_REG(0x57,0x7B); //
Lcd_Write_REG(0x58,0x09); //
Lcd_Write_REG(0x59,0x06); //
Lcd_Write_REG(0x5A,0x06); //
Lcd_Write_REG(0x5B,0x0C); //
Lcd_Write_REG(0x5C,0x1D); //
Lcd_Write_REG(0x5D,0xCC); ////Set Window Area
Lcd_Write_REG(0x02,0x00);
Lcd_Write_REG(0x03,0x00); //Column Start
Lcd_Write_REG(0x04,0x00);
Lcd_Write_REG(0x05,0xEF); //Column End
Lcd_Write_REG(0x06,0x00);
Lcd_Write_REG(0x07,0x00); //Row Start
Lcd_Write_REG(0x08,0x01);
Lcd_Write_REG(0x09,0x3F); //Row EndLcd_Write_REG(0x31,0x02); //RGB Interface(1) (VS+HS+DE)
Lcd_Write_REG(0x32,0x00);  //DPL:(08) HSPL(04)VSPL(02) EPL (01)
Lcd_Write_REG(0x33,0x02);
Lcd_Write_REG(0x34,0x02);}void rgb_spi_init(void)
{esp_err_t ret;gpio_config_t io_conf = {};spi_bus_config_t buscfg={.miso_io_num=PIN_NUM_MISO,.mosi_io_num=PIN_NUM_MOSI,.sclk_io_num=PIN_NUM_CLK,.quadwp_io_num=-1,.quadhd_io_num=-1,.max_transfer_sz=16*320};spi_device_interface_config_t devcfg={.clock_speed_hz=40*1000*1000,           //Clock out at 10 MHz.mode=0,                                //SPI mode 0//.spics_io_num=PIN_NUM_CS,               //CS pin.queue_size=1,                          //We want to be able to queue 7 transactions at a time};//Initialize the lcd gpioio_conf.pin_bit_mask = ( (1ULL<<PIN_NUM_RST) |(1ULL<<PIN_NUM_CS)|(1ULL<<PIN_NUM_BCKL));io_conf.mode = GPIO_MODE_OUTPUT;io_conf.pull_up_en = true;gpio_config(&io_conf);//Initialize the SPI busret=spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO);ESP_ERROR_CHECK(ret);// //Attach the LCD to the SPI busret=spi_bus_add_device(LCD_HOST, &devcfg, &g_screen_spi);ESP_ERROR_CHECK(ret);//Initialize the LCDLCD_Init();spi_bus_remove_device(g_screen_spi);spi_bus_free(LCD_HOST);}

2、rgb_lcd_example_main.c主程序

/** SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD** SPDX-License-Identifier: CC0-1.0*/#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_timer.h"
#include "esp_lcd_panel_ops.h"
#include "esp_lcd_panel_rgb.h"
#include "driver/gpio.h"
#include "esp_err.h"
#include "esp_log.h"
#include "lvgl.h"
#include "screen_rgb_spi.h"#include "demos/lv_demos.h"static const char *TAG = "example";Please update the following configuration according to your LCD spec //#define EXAMPLE_LCD_PIXEL_CLOCK_HZ     (15 * 1000 * 1000)
#define EXAMPLE_LCD_BK_LIGHT_ON_LEVEL  1
#define EXAMPLE_LCD_BK_LIGHT_OFF_LEVEL !EXAMPLE_LCD_BK_LIGHT_ON_LEVEL
#define EXAMPLE_PIN_NUM_BK_LIGHT       1
#define EXAMPLE_PIN_NUM_HSYNC          47
#define EXAMPLE_PIN_NUM_VSYNC          48
#define EXAMPLE_PIN_NUM_DE             45
#define EXAMPLE_PIN_NUM_PCLK           21//D1-D11,D13-D17
//D0x  D12x#define EXAMPLE_PIN_NUM_DATA0          36 // B0
#define EXAMPLE_PIN_NUM_DATA1          37 // B1
#define EXAMPLE_PIN_NUM_DATA2          38 // B2
#define EXAMPLE_PIN_NUM_DATA3          39// B3
#define EXAMPLE_PIN_NUM_DATA4          40// B4
#define EXAMPLE_PIN_NUM_DATA5          41// G0
#define EXAMPLE_PIN_NUM_DATA6          42// G1
#define EXAMPLE_PIN_NUM_DATA7          15// G2
#define EXAMPLE_PIN_NUM_DATA8          16// G3
#define EXAMPLE_PIN_NUM_DATA9          17// G4
#define EXAMPLE_PIN_NUM_DATA10         18 // G5#define EXAMPLE_PIN_NUM_DATA11         10 // R0
#define EXAMPLE_PIN_NUM_DATA12         11 // R1
#define EXAMPLE_PIN_NUM_DATA13         12 // R2
#define EXAMPLE_PIN_NUM_DATA14         13 // R3
#define EXAMPLE_PIN_NUM_DATA15         14 // R4
#define EXAMPLE_PIN_NUM_DISP_EN        -1// The pixel number in horizontal and vertical
#define EXAMPLE_LCD_H_RES              240
#define EXAMPLE_LCD_V_RES              320#if CONFIG_EXAMPLE_DOUBLE_FB
#define EXAMPLE_LCD_NUM_FB             2
#else
#define EXAMPLE_LCD_NUM_FB             1
#endif // CONFIG_EXAMPLE_DOUBLE_FB#define EXAMPLE_LVGL_TICK_PERIOD_MS    1// we use two semaphores to sync the VSYNC event and the LVGL task, to avoid potential tearing effect
#if CONFIG_EXAMPLE_AVOID_TEAR_EFFECT_WITH_SEM
SemaphoreHandle_t sem_vsync_end;
SemaphoreHandle_t sem_gui_ready;
#endifextern void example_lvgl_demo_ui(lv_disp_t *disp);static bool example_on_vsync_event(esp_lcd_panel_handle_t panel, const esp_lcd_rgb_panel_event_data_t *event_data, void *user_data)
{BaseType_t high_task_awoken = pdFALSE;
#if CONFIG_EXAMPLE_AVOID_TEAR_EFFECT_WITH_SEMif (xSemaphoreTakeFromISR(sem_gui_ready, &high_task_awoken) == pdTRUE) {xSemaphoreGiveFromISR(sem_vsync_end, &high_task_awoken);}
#endifreturn high_task_awoken == pdTRUE;
}static void example_lvgl_flush_cb(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map)
{esp_lcd_panel_handle_t panel_handle = (esp_lcd_panel_handle_t) drv->user_data;int offsetx1 = area->x1;int offsetx2 = area->x2;int offsety1 = area->y1;int offsety2 = area->y2;ESP_LOGI(TAG, "example_lvgl_flush_cb:%d,%d,%d,%d",offsetx1,offsetx2,offsety1,offsety2);
#if CONFIG_EXAMPLE_AVOID_TEAR_EFFECT_WITH_SEMxSemaphoreGive(sem_gui_ready);xSemaphoreTake(sem_vsync_end, portMAX_DELAY);
#endif// pass the draw buffer to the driveresp_lcd_panel_draw_bitmap(panel_handle, offsetx1, offsety1, offsetx2 + 1, offsety2 + 1, color_map);lv_disp_flush_ready(drv);
}static void example_increase_lvgl_tick(void *arg)
{/* Tell LVGL how many milliseconds has elapsed */lv_tick_inc(EXAMPLE_LVGL_TICK_PERIOD_MS);
}void app_main(void)
{static lv_disp_draw_buf_t disp_buf; // contains internal graphic buffer(s) called draw buffer(s)static lv_disp_drv_t disp_drv;      // contains callback functions//rgb_spi_init();//
#if CONFIG_EXAMPLE_AVOID_TEAR_EFFECT_WITH_SEMESP_LOGI(TAG, "Create semaphores");sem_vsync_end = xSemaphoreCreateBinary();assert(sem_vsync_end);sem_gui_ready = xSemaphoreCreateBinary();assert(sem_gui_ready);
#endif#if EXAMPLE_PIN_NUM_BK_LIGHT >= 0ESP_LOGI(TAG, "Turn off LCD backlight");gpio_config_t bk_gpio_config = {.mode = GPIO_MODE_OUTPUT,.pin_bit_mask = 1ULL << EXAMPLE_PIN_NUM_BK_LIGHT};ESP_ERROR_CHECK(gpio_config(&bk_gpio_config));
#endifESP_LOGI(TAG, "Install RGB LCD panel driver");esp_lcd_panel_handle_t panel_handle = NULL;esp_lcd_rgb_panel_config_t panel_config = {.data_width = 16, // RGB565 in parallel mode, thus 16bit in width.psram_trans_align = 64,.num_fbs = EXAMPLE_LCD_NUM_FB,
#if CONFIG_EXAMPLE_USE_BOUNCE_BUFFER.bounce_buffer_size_px = 10 * EXAMPLE_LCD_H_RES,
#endif.clk_src = LCD_CLK_SRC_DEFAULT,.disp_gpio_num = EXAMPLE_PIN_NUM_DISP_EN,.pclk_gpio_num = EXAMPLE_PIN_NUM_PCLK,.vsync_gpio_num = EXAMPLE_PIN_NUM_VSYNC,.hsync_gpio_num = EXAMPLE_PIN_NUM_HSYNC,.de_gpio_num = EXAMPLE_PIN_NUM_DE,.data_gpio_nums = {EXAMPLE_PIN_NUM_DATA0,EXAMPLE_PIN_NUM_DATA1,EXAMPLE_PIN_NUM_DATA2,EXAMPLE_PIN_NUM_DATA3,EXAMPLE_PIN_NUM_DATA4,EXAMPLE_PIN_NUM_DATA5,EXAMPLE_PIN_NUM_DATA6,EXAMPLE_PIN_NUM_DATA7,EXAMPLE_PIN_NUM_DATA8,EXAMPLE_PIN_NUM_DATA9,EXAMPLE_PIN_NUM_DATA10,EXAMPLE_PIN_NUM_DATA11,EXAMPLE_PIN_NUM_DATA12,EXAMPLE_PIN_NUM_DATA13,EXAMPLE_PIN_NUM_DATA14,EXAMPLE_PIN_NUM_DATA15,},.timings = {.pclk_hz = EXAMPLE_LCD_PIXEL_CLOCK_HZ,.h_res = EXAMPLE_LCD_H_RES,.v_res = EXAMPLE_LCD_V_RES,// The following parameters should refer to LCD spec.hsync_back_porch = 40,.hsync_front_porch = 20,.hsync_pulse_width = 1,.vsync_back_porch = 8,.vsync_front_porch = 4,.vsync_pulse_width = 1,.flags.pclk_active_neg = true,},.flags.fb_in_psram = true, // allocate frame buffer in PSRAM};ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&panel_config, &panel_handle));ESP_LOGI(TAG, "Register event callbacks");esp_lcd_rgb_panel_event_callbacks_t cbs = {.on_vsync = example_on_vsync_event,};ESP_ERROR_CHECK(esp_lcd_rgb_panel_register_event_callbacks(panel_handle, &cbs, &disp_drv));ESP_LOGI(TAG, "Initialize RGB LCD panel");ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));#if EXAMPLE_PIN_NUM_BK_LIGHT >= 0ESP_LOGI(TAG, "Turn on LCD backlight");gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_ON_LEVEL);
#endifESP_LOGI(TAG, "Initialize LVGL library");lv_init();lv_color_t *buf1 = NULL;lv_color_t *buf2 = NULL;
#if CONFIG_EXAMPLE_DOUBLE_FBESP_LOGI(TAG, "Use frame buffers as LVGL draw buffers");ESP_ERROR_CHECK(esp_lcd_rgb_panel_get_frame_buffer(panel_handle, 2, &buf1, &buf2));// initialize LVGL draw bufferslv_disp_draw_buf_init(&disp_buf, buf1, buf2, EXAMPLE_LCD_H_RES * EXAMPLE_LCD_V_RES);
#elseESP_LOGI(TAG, "Allocate separate LVGL draw buffers from PSRAM");buf1 = heap_caps_malloc(EXAMPLE_LCD_H_RES *50*  sizeof(lv_color_t), MALLOC_CAP_INTERNAL);assert(buf1);buf2 = heap_caps_malloc(EXAMPLE_LCD_H_RES *50*  sizeof(lv_color_t), MALLOC_CAP_INTERNAL);assert(buf2);// initialize LVGL draw bufferslv_disp_draw_buf_init(&disp_buf, buf1, buf2, EXAMPLE_LCD_H_RES * 50);
#endif // CONFIG_EXAMPLE_DOUBLE_FBESP_LOGI(TAG, "Register display driver to LVGL");lv_disp_drv_init(&disp_drv);disp_drv.hor_res = EXAMPLE_LCD_H_RES;disp_drv.ver_res = EXAMPLE_LCD_V_RES;disp_drv.flush_cb = example_lvgl_flush_cb;disp_drv.draw_buf = &disp_buf;disp_drv.user_data = panel_handle;
#if CONFIG_EXAMPLE_DOUBLE_FBdisp_drv.full_refresh = true; // the full_refresh mode can maintain the synchronization between the two frame buffers
#endiflv_disp_t *disp = lv_disp_drv_register(&disp_drv);ESP_LOGI(TAG, "Install LVGL tick timer");// Tick interface for LVGL (using esp_timer to generate 2ms periodic event)const esp_timer_create_args_t lvgl_tick_timer_args = {.callback = &example_increase_lvgl_tick,.name = "lvgl_tick"};esp_timer_handle_t lvgl_tick_timer = NULL;ESP_ERROR_CHECK(esp_timer_create(&lvgl_tick_timer_args, &lvgl_tick_timer));ESP_ERROR_CHECK(esp_timer_start_periodic(lvgl_tick_timer, EXAMPLE_LVGL_TICK_PERIOD_MS * 1000));ESP_LOGI(TAG, "Display LVGL Scatter Chart");//example_lvgl_demo_ui(disp);//lv_demo_widgets();lv_demo_benchmark();while (1) {// raise the task priority of LVGL and/or reduce the handler period can improve the performancevTaskDelay(pdMS_TO_TICKS(1));// The task running lv_timer_handler should have lower priority than that running `lv_tick_inc`lv_timer_handler();}
}

二、说明

1、ESP32S3只支持RGB565,因此HX8347的17H寄存器必须设置为50h。

需要特别注意的是连线不是连续的,要跳过D12和D0连接剩余的16根线。

af6d20a8ea944e20ba5709275ea08f61.png

2、HX8347关于RGB的配置涉及4个寄存器31h,32h,33h,34h

Lcd_Write_REG(0x31,0x02); //RGB Interface(1) (VS+HS+DE) 进入RGB模式1

Lcd_Write_REG(0x32,0x00);  //DPL:(08) HSPL(04)VSPL(02) EPL (01)好像必须设置0x00

Lcd_Write_REG(0x33,0x02);        //瞎设的

Lcd_Write_REG(0x34,0x02);        //瞎设的

97cc8183a35d4bb98cc43072b8515d04.png

2bbff3fc5e2540ad822f04e79ccd67fd.png

3、这几个参数应该好好设一下的,现在用的是DEMO中缺省的

 .hsync_back_porch = 40,
 .hsync_front_porch = 20,
 .hsync_pulse_width = 1,
 .vsync_back_porch = 8,
 .vsync_front_porch = 4,
 .vsync_pulse_width = 1,
 .flags.pclk_active_neg = true,

但是好像需要看懂下面这个图才能设,以后再研究吧

4、所用程序改自官方RGB demo程序。

180863a218624604a29429e35f760ca4.jpg

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/613796.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

超维空间M1无人机使用说明书——53、ROS无人机二维码识别与降落——V2升级版本

引言&#xff1a;使用二维码引导无人机实现精准降落&#xff0c;首先需要实现对二维码的识别和定位&#xff0c;可以参考博客的二维码识别和定位内容。本小节主要是通过获取拿到的二维码位置&#xff0c;控制无人机全向的移动和降落&#xff0c;本小节再V1版本的基础上增加了动…

实现稳定的联合显著性检测和联合目标分割

1 Title Toward Stable Co-Saliency Detection and Object Co-Segmentation(Bo Li; Lv Tang; Senyun Kuang; Mofei Song; Shouhong Ding)【IEEE Transactions on Image Processing 2022】 2 Conclusion This paper present a novel model for simultaneous stable co-saliency…

基础_函数_流程函数

流程函数也是很常用的一类函数&#xff0c;可以在SQL语句中实现条件筛选&#xff0c;从而提高语句效率.

【HarmonyOS4.0】第七篇-ArkUI系统组件(二)

鸿蒙开发系统组件详细剖析 五、进度条组件 进度条也是UI开发最常用的组件之一&#xff0c;ArkUI开发框架提供了两种类型的进度条&#xff1a; Progress 和LoadingProgress &#xff0c;前者可以精准指定进度&#xff0c;后者表示正在加载的状态&#xff0c;我们接下来对它们分…

Spring MVC 参数接收

参数接收 Springmvc中&#xff0c;接收页面提交的数据是通过方法形参来接收&#xff1a; 处理器适配器调用springmvc使用反射将前端提交的参数传递给controller方法的形参 springmvc接收的参数都是String类型&#xff0c;所以spirngmvc提供了很多converter&#xff08;转换器…

LightGBM原理和调参

背景知识 LightGBM(Light Gradient Boosting Machine)是一个实现GBDT算法的框架&#xff0c;具有支持高效率的并行训练、更快的训练速度、更低的内存消耗、更好的准确率、支持分布式可以处理海量数据等优点。 普通的GBDT算法不支持用mini-batch的方式训练&#xff0c;在每一次…

Google Pixel 与 iPhone手机:哪个更好?

iPhone稳定可靠&#xff0c;Pixel性价比高且创新。两者各有千秋&#xff0c;满足不同需求 谷歌的 Pixel 手机是 Android 最接近 iPhone 的手机&#xff0c;也是真正原生的Android手机。在iPhone 15 Pro Max 与华为 Mate 60 Pro的比较中不难看出&#xff0c;iPhone依然有着极强…

杨中科 .NETCORE 异步编程

一、 为什么需要异步编程 异步点餐的优点&#xff1a;能同时服务多个客人 异步点餐一定会提升单个客户点餐速度吗&#xff1f; 答案理所当然&#xff1a;不能 图片美化服务例子服务器能够同时服务的请求数量有限 void BeautifyPic (File photo, Response response) {byte[] …

Nginx配置反向代理实例二

Mac 安装Nginx教程 Nginx配置反向代理实例一 提醒一下&#xff1a;下面实例讲解是在Mac系统演示的&#xff1b; 反向代理实例二实现的效果 使用nginx 反向代理&#xff0c;根据访问的地址跳转到不同端口的服务中 nginx 监听端口为81&#xff1b; 访问地址1&#xff1a;http:/…

postman使用-06断言

文章目录 一、断言定义二、 常用的断言三、断言-状态码&#xff08;1&#xff09;单一状态码断言&#xff1a;Status code:Code is 200 检查返回的状态码是否为200原始模板&#xff1a;修改后&#xff1a;括号里的200也可以改成自己要断言的状态码具体步骤&#xff1a;断言成功…

字体图标 iconFont

字体图标使用场景︰主要用于显示网页中通用、常用的一些小图标 精灵图是有诸多优点的&#xff0c;但是缺点很明显。 图片文件还是比较大的。图片本身放大和缩小会失真。一旦图片制作完毕想要更换非常复杂。 此时&#xff0c;有一种技术的出现很好的解决了以上问题&#xff0c…

springboot虹软人脸识别集成

准备工作 虹软开放平台中创建一个新的应用 虹软开发平台【点我跳转】 开始上代码 基本配置 将下载的jar包放到src同级目录下 <!-- 虹软--><dependency><groupId>com.arcsoft.face</groupId><artifactId>arcsoft-sdk-face</artifactI…

力扣日记1.10-【二叉树篇】701. 二叉搜索树中的插入操作

力扣日记&#xff1a;【二叉树篇】701. 二叉搜索树中的插入操作 日期&#xff1a;2024. 参考&#xff1a;代码随想录、力扣 —————————————————————— 天哪&#xff0c;上次打开力扣还是2023&#xff0c;转眼已经2024&#xff1f;&#xff01; 两个星期过去…

【提示学习论文六】MaPLe: Multi-modal Prompt Learning论文原理

文章目录 MaPLe: Multi-modal Prompt Learning 多模式提示学习文章介绍动机MaPLe:Multi-modal Prompt Learning 模型结构1、Deep Language Prompting 深度语言提示2、Deep Vision Prompting 深度视觉提示3、Vision Language Prompt Coupling 视觉语言提示耦合提示耦合过程 实验…

232Modbus转Profinet应用案例分享

现场需求&#xff1a;现场需要将多台伺服接到控制器&#xff08;1200PLC&#xff09;上&#xff0c;用Modbus协议。 根据现场的描述&#xff0c;我们给出一个方案&#xff0c;在PLC和伺服中间加入232Modbus转Profinet&#xff08;XD-PNR200&#xff09;网关&#xff0c;232Modb…

如何进行大数据系统测试

大数据系统常见的架构形式有如下几种&#xff1a; Hadoop架构&#xff1a; Hadoop Distributed File System (HDFS)&#xff1a;这是一种分布式文件系统&#xff0c;设计用于存储海量数据并允许跨多台机器进行高效访问。 MapReduce&#xff1a;作为Hadoop的核心计算框架&#…

基于css实现动画效果

介绍 本文将会基于css&#xff0c;实现各种动画效果&#xff0c;接下来会从简单几个例子入手。 案例 三颗球 <!DOCTYPE html> <html lang"en"><head><meta charset"utf-8" /><title>React App</title><style>…

【scala】编译build报错 “xxx is not an enclosing class“

private[sources] val creationTimeMs: Long {val session SparkSession.getActiveSession.orElse(SparkSession.getDefaultSession)require(session.isDefined)private[xxx]是访问权限控制在xxxx包的意思。 解决办法&#xff1a; 把[sources]删掉&#xff0c;或者改成和包名…

vim升级和配置

vim升级和配置 1、背景2、环境说明3、操作3.1 升级VIM3.2 配置VIM3.2.1、编辑vimrc文件3.2.2、安装插件 1、背景 日常工作跟linux系统打交道比较多&#xff0c;目前主要用到的是Cenots7和Ubuntu18这两个版本的linux系统&#xff0c;其中Centos7主要是服务器端&#xff0c;Ubun…

VMware正被博通“收拾”,我们是不是可以“嚣张”一点?

引言&#xff1a;一朝躺在大佬怀&#xff0c;今生荣华伸手来。 【全球存储观察 &#xff5c; 科技热点关注】 如是所闻&#xff0c;2023年元旦前两个月&#xff0c;大家看到博通以610亿美元的高价&#xff0c;成功完成收购了闻名遐迩的虚拟化大佬VMware。日期为2023年11月22日。…