FT2232调试记录(3)

FT2232调试记录(1):
FT2232调试记录(2):
FT2232调试记录(3):

FT2232 SPI读写函数:

参照SPI提供的文档:
在这里插入图片描述

工程:在这里插入图片描述

SPI 写函数:

FT_STATUS write_byte(FT_HANDLE handle,uint8_t address, uint16_t data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered=0;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x9F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xA0;/* Write command (3bits) */
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write 3 least sig address bits */
sizeToTransfer=3;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/* Write 2 byte data + CS_Low */
sizeToTransfer=2;
sizeTransfered=0;
byOutputBuffer[0] = (uint8_t)(data & 0xFF);
byOutputBuffer[1] = (uint8_t)((data & 0xFF00)>>8);
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);/* Wait until D0 is high */
#if 1/* Strobe Chip Select */
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
#ifndef __linux__
Sleep(10);
#endif
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
#else
retry=0;
state=FALSE;
SPI_IsBusy(handle,&state);
while((FALSE==state) && (retry<SPI_WRITE_COMPLETION_RETRY))
{
printf("SPI device is busy(%u)\n",(unsigned)retry);
SPI_IsBusy(ftHandle,&state);
retry++;
}
#endif/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x8F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
return status;
}

SPI 读函数:

FT_STATUS read_byte(FT_HANDLE handle, uint8_t address, uint16_t *data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xC0;/* Write command (3bits)*/
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write partial address bits */
sizeToTransfer=4;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/*Read 2 bytes*/
sizeToTransfer=2;
sizeTransfered=0;
status = SPI_Read(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
*data = (uint16_t)(byOutputBuffer[1]<<8);
*data = (*data & 0xFF00) | (0x00FF & (uint16_t)byOutputBuffer[0]);
return status;
}

SPI flash读写实验:

在这里插入图片描述

相关源码

bsp_ft2232.h

#ifndef BSP_FT2232_H
#define BSP_FT2232_H#include "mainwindow.h"
//#include "ui_mainwindow.h"#include<stdio.h>
#include<stdlib.h>
///* OS specific libraries */
#ifdef _WIN32
#include<windows.h>
#endif#include <windows.h>#include "../lib/ftd2xx.h"
#include "../lib/libmpsse_spi.h"
//#include "../lib/libmpsse_i2c.h"class bsp_ft2232
{
private:public:enum typePinA{pinA3=3,pinA4=4};enum typePinB{pinB3=3,pinB4=4};bsp_ft2232();int bsp_GetDevcieNumber();void bsp_ledA(enum typePinA chl,bool highlow);void bsp_ledB(enum typePinB chl,bool highlow);void bsp_ledtest(bool highlow);
};#endif // BSP_FT2232_H

bsp_ft2232.c

#include "bsp_ft2232.h"/******************************************************************************/
/* Macro and type defines*/
/******************************************************************************/
/* Helper macros */
#define APP_CHECK_STATUS(exp) {                                                                              \if(exp!=FT_OK){                                                                                          \qDebug("%s:%d:%s(): status(0x%x) != FT_OK\n",__FILE__, __LINE__, __FUNCTION__,exp);          \exit(1);                                                                                     \}else{ qDebug ("status ok!");                                                              \}                                                                                           \
};
#define CHECK_NULL(exp){                                                                                     \if(exp==NULL){                                                                                           \qDebug("%s:%d:%s(): NULL expression encountered \n",__FILE__, __LINE__, __FUNCTION__);       \exit(1);                                                                                     \}else{   qDebug ("not null !");                                                              \}                                                                                            \
};#define SPI_DEVICE_BUFFER_SIZE 256
FT_HANDLE ftHandle[2];
FT_STATUS status;
DWORD     numDevs;
ChannelConfig channelConf;
uint8_t gpio_setting[2]={0xff,0xff}; //0001 1000 =0x18;
uint8_t byOutputBuffer[SPI_DEVICE_BUFFER_SIZE];DWORD dwNumBytesToSend = 0; //Index of output buffer
DWORD dwNumBytesSent = 0;
DWORD dwNumBytesRead = 0;
DWORD dwNumInputBuffer = 0;FT_STATUS read_byte(FT_HANDLE handle, uint8_t address, uint16_t *data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xC0;/* Write command (3bits)*/
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write partial address bits */
sizeToTransfer=4;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/*Read 2 bytes*/
sizeToTransfer=2;
sizeTransfered=0;
status = SPI_Read(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
*data = (uint16_t)(byOutputBuffer[1]<<8);
*data = (*data & 0xFF00) | (0x00FF & (uint16_t)byOutputBuffer[0]);
return status;
}FT_STATUS write_byte(FT_HANDLE handle,uint8_t address, uint16_t data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered=0;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x9F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xA0;/* Write command (3bits) */
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write 3 least sig address bits */
sizeToTransfer=3;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/* Write 2 byte data + CS_Low */
sizeToTransfer=2;
sizeTransfered=0;
byOutputBuffer[0] = (uint8_t)(data & 0xFF);
byOutputBuffer[1] = (uint8_t)((data & 0xFF00)>>8);
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);/* Wait until D0 is high */
#if 1/* Strobe Chip Select */
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
#ifndef __linux__
Sleep(10);
#endif
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
#else
retry=0;
state=FALSE;
SPI_IsBusy(handle,&state);
while((FALSE==state) && (retry<SPI_WRITE_COMPLETION_RETRY))
{
printf("SPI device is busy(%u)\n",(unsigned)retry);
SPI_IsBusy(ftHandle,&state);
retry++;
}
#endif/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x8F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
return status;
}bsp_ft2232::bsp_ft2232()
{FT_STATUS status;#ifdef _MSC_VER
//Init_libMPSSE();
#endifuint32_t channels;channelConf.ClockRate = 5000;channelConf.LatencyTimer= 255;channelConf.configOptions = SPI_CONFIG_OPTION_MODE0 | SPI_CONFIG_OPTION_CS_DBUS3;channelConf.Pin = 0x00000000;/*FinalVal-FinalDir-InitVal-InitDir (for dir 0=in, 1=out)*/status = SPI_GetNumChannels((DWORD *)&channels);APP_CHECK_STATUS(status);qDebug("Number of available SPI channels = %d\n",channels);/* Open the first available channel */status = SPI_OpenChannel(0,&ftHandle[0]);APP_CHECK_STATUS(status);qDebug("\nhandle=0x%x status=0x%x\n",ftHandle[0],status);status = SPI_InitChannel(ftHandle[0],&channelConf);APP_CHECK_STATUS(status);//    status = SPI_CloseChannel(ftHandle[0]);/* Open the first available channel */status = SPI_OpenChannel(1,&ftHandle[1]);APP_CHECK_STATUS(status);qDebug("\nhandle=0x%x status=0x%x\n",ftHandle[1],status);status = SPI_InitChannel(ftHandle[1],&channelConf);APP_CHECK_STATUS(status);//    status = SPI_CloseChannel(ftHandle[1]);//    FT_DEVICE_LIST_INFO_NODE devList[2];
//    status = SPI_GetChannelInfo(0,&devList[0]);
//    APP_CHECK_STATUS(status);
//    qDebug("Information on channel number %d:\n",0);
//    /* print the dev info */
//    qDebug(" Flags=0x%x\n",devList[0].Flags);
//    qDebug(" Type=0x%x\n",devList[0].Type);
//    qDebug(" ID=0x%x\n",devList[0].ID);
//    qDebug(" LocId=0x%x\n",devList[0].LocId);
//    qDebug(" SerialNumber=%s\n",devList[0].SerialNumber);
//    qDebug(" Description=%s\n",devList[0].Description);
//    qDebug(" ftHandle=0x%x\n",devList[0].ftHandle);/*is 0 unless open*///    status = SPI_GetChannelInfo(1,&devList[1]);
//    APP_CHECK_STATUS(status);
//    qDebug("Information on channel number %d:\n",1);
//    /* print the dev info */
//    qDebug(" Flags=0x%x\n",devList[1].Flags);
//    qDebug(" Type=0x%x\n",devList[1].Type);
//    qDebug(" ID=0x%x\n",devList[1].ID);
//    qDebug(" LocId=0x%x\n",devList[1].LocId);
//    qDebug(" SerialNumber=%s\n",devList[1].SerialNumber);
//    qDebug(" Description=%s\n",devList[1].Description);
//    qDebug(" ftHandle=0x%x\n",devList[1].ftHandle);/*is 0 unless open*/}int bsp_ft2232::bsp_GetDevcieNumber()
{status = FT_CreateDeviceInfoList(&numDevs);		// Get the number of FTDI devicesAPP_CHECK_STATUS(status);qDebug("%d FTDI devices found - the count includes individual ports on a single chip\n", (int)numDevs);return  numDevs;
}void bsp_ft2232::bsp_ledA(enum typePinA chl, bool highlow)
{
uint8_t val=0;
FT_ReadGPIO(ftHandle[0],&val);
FT_WriteGPIO(ftHandle[0],gpio_setting[0], ( highlow ? (val|(0x1<<(chl)) ) : (val&(~(0x1<<(chl))) ) ) );
}void bsp_ft2232::bsp_ledB(enum typePinB chl, bool highlow)
{uint8_t val=0;FT_ReadGPIO(ftHandle[1],&val);FT_WriteGPIO(ftHandle[1],gpio_setting[1], ( highlow ? (val|(0x1<<(chl)) ) : (val&(~(0x1<<(chl))) ) ) );
}void bsp_ft2232::bsp_ledtest(bool highlow)
{if(highlow){dwNumBytesToSend = 0;byOutputBuffer[dwNumBytesToSend++] = 0x82;byOutputBuffer[dwNumBytesToSend++] = 0xFF;byOutputBuffer[dwNumBytesToSend++] = 0xFF;status = FT_Write(ftHandle[0], byOutputBuffer, dwNumBytesToSend, &dwNumBytesSent);qDebug("on %d\r\n",dwNumBytesSent);dwNumBytesSent=0;dwNumBytesToSend = 0;}else{dwNumBytesToSend = 0;byOutputBuffer[dwNumBytesToSend++] = 0x82;byOutputBuffer[dwNumBytesToSend++] = 0x00;byOutputBuffer[dwNumBytesToSend++] = 0xFF;status = FT_Write(ftHandle[0], byOutputBuffer, dwNumBytesToSend, &dwNumBytesSent);qDebug("off %d\r\n",dwNumBytesSent);dwNumBytesSent=0;dwNumBytesToSend = 0;}
}

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

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

相关文章

再利用系统盘时,如何删除恢复分区(Recovery Partition)

系统盘有一个Recovery Partition&#xff0c;记录了重要的系统信息&#xff0c;不能删除。 Windows 10的 Disk Managment 不提供用户删除这个Partition的选项。 近日我插入一块原系统盘&#xff0c;Format后作为DataDisk&#xff0c;此时需要删除这块硬盘上的RecoveryPartition…

机器学习系列——(二十一)神经网络

引言 在当今数字化时代&#xff0c;机器学习技术正日益成为各行各业的核心。而在机器学习领域中&#xff0c;神经网络是一种备受瞩目的模型&#xff0c;因其出色的性能和广泛的应用而备受关注。本文将深入介绍神经网络&#xff0c;探讨其原理、结构以及应用。 一、简介 神经网…

【碎片知识点】安装Linux系统 VMware与kali

天命&#xff1a;VMware就是可以运行操作系统的载体&#xff0c;kali就是Linux的其中一个分支 天命&#xff1a;Linux有两个分支版本&#xff1a;centos与ubuntu&#xff0c;kali底层就是ubuntu&#xff08;所有Linux用起来都差不多&#xff0c;没啥区别&#xff09; 天命&…

CSS之选择器、优先级、继承

1.CSS选择器 常用的选择器 <body><div class"parent"><div id"one" style"background: blue" class"child">1<div class"one_one">11</div><div style"background-color: blueviole…

2024LeetCode分类刷题

一、数组 88. 合并两个有序数组 public void merge(int[] nums1, int m, int[] nums2, int n) {int p1 0, p2 0;int[] sorted new int[m n];while (p1 < m || p2 < n) {int current;if (p1 m) {current nums2[p2];} else if (p2 n) {current nums1[p1];} else i…

每日一题——数字翻转

题目; 这道题看似是很简单的回文数 实则就是很简单的回文数 但是需要注意的一点是负数 可以在开头就进行判断&#xff0c;如果N<0的话就令N-N&#xff0c;将所有数都转成正数就好办了 上代码&#xff1a; #include <iostream> #include<string> #include<…

4核16G服务器价格腾讯云PK阿里云

4核16G服务器租用优惠价格26元1个月&#xff0c;腾讯云轻量4核16G12M服务器32元1个月、96元3个月、156元6个月、312元一年&#xff0c;阿腾云atengyun.com分享4核16服务器租用费用价格表&#xff0c;阿里云和腾讯云详细配置报价和性能参数表&#xff1a; 腾讯云4核16G服务器价…

计算机网络概述习题拾遗

学习目标&#xff1a; 自下而上第一个提供端到端服务的层次 路由器、交换机、集线器实现的功能层 TCP/IP体系结构的网络接口层对应OSI体系结构的哪两个层次 分组数量对总时延的影响 如果这篇文章对您有帮助&#xff0c;麻烦点赞关注支持一下动力猿吧&#xff01; 学习内容…

4核16g云服务器多少钱?

4核16G服务器租用优惠价格26元1个月&#xff0c;腾讯云轻量4核16G12M服务器32元1个月、96元3个月、156元6个月、312元一年&#xff0c;阿腾云atengyun.com分享4核16服务器租用费用价格表&#xff0c;阿里云和腾讯云详细配置报价和性能参数表&#xff1a; 腾讯云4核16G服务器价…

MyBatisPlus - 润物无声、效率至上、丰富功能

目录 一、简介 1.1、为什么要使用 MybatisPlus 二、使用指南 2.1、依赖 2.2、配置 2.3、常用注解 2.4、BaseMapper 的使用 2.4.1、定义 Mapper 接口 2.4.2、基于 QueryWrapper 的查询&#xff08;不推荐&#xff09; 2.4.3、基于 UpdateWrapper 的修改&#xff08;不…

Sentinel 流控-链路模式

链路模式 A B C 三个服务 A 调用 C B 调用 C C 设置流控 ->链路模式 -> 入口资源是 A A、B 服务 package com.learning.springcloud.order.controller;import com.learning.springcloud.order.service.BaseService; import org.springframework.beans.factory.annotatio…

腾讯云4核8G服务器3年600元?

腾讯云4核8G服务器3年600元&#xff1f;目前的价格是轻量应用服务器4核8G12M带宽一年446元、646元15个月&#xff0c;云服务器CVM标准型S5实例4核8G配置价格15个月1437.3元&#xff0c;5年6490.44元&#xff0c;标准型SA2服务器1444.8元一年&#xff0c;在txy.wiki可以查询详细…

Excel一键导入导出-EasyPOI

EasyPOI是一款优秀的开源Java库&#xff0c;专为简化和优化Excel文件的导入导出操作而设计。下面&#xff0c;我会介绍EasyPOI在项目中使用EasyPOI&#xff0c;实现Excel文件的高效操作。帮助读者全面了解和掌握这一工具。 EasyPOI简介 官网&#xff1a; http://www.wupaas.co…

windows服务启动

一.NetCore 1.创建启动脚本run_instal.bat,例如程序文件为ApiDoc.exe set serviceName"Apidoc Web 01" set serviceFilePath%~dp0ApiDoc.exe set serviceDescription"ApiDoc 动态接口服务 web 01"sc create %serviceName% BinPath%serviceFilePath% sc c…

如何在Django中使用分布式定时任务并结合消息队列

如何在Django中使用分布式定时任务并结合消息队列 如何在Django中使用分布式定时任务并结合消息队列项目背景与意义实现步骤1. 安装Celery和Django-celery-beat2. 配置Celery3. 配置Django-celery-beat4. 定义定时任务5. 启动Celery worker 和 beat6. Celery 指令7. 对接消息队…

「软件设计师」操作系统基本原理

操作系统概述 操作系统与计算机体系结构之间的关系 操作系统具备的管理职能 进程管理 进程的状态前趋图pv操作死锁问题存储管理 段页式存储页面置换算法文件管理 索引文件位示图作业管理设备管理 数据传输控制方式微内核操作系统 虚设备与SPOOLING技术 进程管理 进程的状态…

【OrangePi Zero2 智能家居】智能家居项目的软件实现

一、项目整体设计 二、项目代码的前期准备 三、实现语音监听接口 四、实现socket监听接口 五、实现烟雾报警监听接口 六、实现设备节点代码 七、实现接收消息处理接口 一、项目整体设计 整体的软件框架大致如下&#xff1a; 整个项目开启4个监听线程&#xff0c; 分别是&…

奇异值分解(SVD)

对于一个方阵而言&#xff0c;采用的是特征分解&#xff0c;参考《矩阵特征值分解&#xff08;EVD&#xff09;-CSDN博客》

高程 | 数据的共享与保护(c++)

文章目录 &#x1f4da;标识符的作用域与可见性&#x1f407;作用域&#x1f407;可见性 &#x1f4da;对象的生存期&#x1f407;静态生存期&#x1f407;动态生存期 &#x1f4da;类的静态成员&#x1f407;静态数据成员&#x1f407;静态函数成员 &#x1f4da;类的友元&…

你的电脑关机吗

目录 程序员为什么不喜欢关电脑&#xff1f; 电脑长时间不关机会怎样? 电脑卡顿 中度风险 硬件损耗 能源浪费 散热问题 软件问题 网络安全问题 程序员为什么不喜欢关电脑&#xff1f; 大部分人都会选择将电脑进行关机操作。其实这不难理解&#xff0c;毕竟人类都需要…