In NFC communication, the CRC polynomial used is: The input and output are inverted, the initial value of the register is 0xFFFF, and the output result is XOR 0xFFFF, which is equivalent to the inversion of the CRC output result. According to the formula, we program. CRC implementation can use parallel or serial structure, this […]
Tag: reader
NFC Reader based on FPAG (5) Attached – CRC complete code
`timescale 1ns / 1ps // //Company: // Engineer: // // Create Date: 2023/07/07 15:18:06 // Design Name: // Module Name: crc_code // Project Name: // Target Devices: //Tool Versions: // Description: // //Dependencies: // // Revision: // Revision 0.01 – File Created // Additional Comments: // // //? // ¤¨?°? module crc_code #( parameter CMD_WITH […]
Use RecyclerView to implement three reader page turning styles
1. Overall logic Why extend RecyclerView directly instead of using ViewPager/ViewPager2? Here’s why: Scroll Model (vertical sliding) requires customized automatic sliding (adsorption to the specified page) Flip Mode (simulated page turning) needs to obtain direction information under various situations to achieve better control RecyclerView is easy to expand. At the same time, the three modes […]
Serial communication implementation of PN532 NFC card reader
1. Understand the meaning of PN532 serial communication data frame 00 00 FF LEN LCS TFI PD0…PDn DCS 00 00: Data frame header; 00 FF: data starting number; LEN: Data packet length, including TFI; LCS: Data length checksum, LEN + LCS = 0, equivalent to (LEN ^ 0xFF) + 1; (prone to errors) TFI: command; […]
[Linux] Threads Part III: Thread Pool (Code Example), Reader-Writer Model
Thread III 8. Thread pool 9. Reader-writer model 1. Some interfaces of read-write locks 8. Thread pool The essence of pooling technology is the technology of exchanging space for time. For example, when we apply for space, the OS will allocate more space to us. When we expand the space later, we will directly access […]
Python DictReader class reads csv files
Knowledge review 1.1 CSV module knowledge 2 classes in the CSV module: classDictReader: class DictWriter: DictReader: Read in dictionary form. DictWriter: Write in the form of a dictionary. Three methods of the DictWriter class of the CSV module: def writeheader(self): def writerow(self, rowdict): def writerows(self, rowdicts): writeheader method: write header. writerow method: write one row […]
Classification of IO streams in Java, byte stream and character stream, node stream and processing stream overview, FileInputStream, FileOutputStream, FireReader, FireWriter, BufferReader code
Classification of IO streams According to the different operation data units, it is divided into: byte stream and character stream According to the flow direction of the data flow, it is divided into: input flow and output flow According to the role of the flow, it is divided into: node flow and processing flow (packaging […]
The VbScript script Request obtains the parameter Response in the access file submitted by the RFID card reader using HTTP to drive the card reader to display and broadcast voice.
Equipment used in this example: RFID network WIFI wireless TCP/UDP/HTTP programmable secondary development card reader POE powered voice-Taobao (taobao.com) <%@LANGUAGE=”VBSCRIPT” CODEPAGE=”65001″%> <% Function bin2str(bindata) Dim rsStream, strls Set rsStream = Server.CreateObject(“ADODB.Stream”) rsStream.Type = 2 rsStream. Open rsStream.WriteText bindata rsStream.Position = 0 rsStream.Charset = “utf-8” rsStream.Position = 2 strls = rsStream.ReadText rsStream.Close Set rsStream = Nothing […]
QtXml: QXmlStreamReader
1. Description QXmlStreamReader provides a simple streaming API to parse well-formed XML. Typical usage of QXmlStreamReader is as follows: <?xml version=”1.0″ encoding=”UTF-8″?> <data info=”this is data infomation” editor=”Zhang San”> <website herf=”www.baidu.com”> <title> <name>baidu</name> </title> </website> <website herf=”www.sohu.com”> <title> <name>sohu</name> </title> </website> </data> int main(int argc, char *argv[]) { QFile file(“demo.xml”); if (!file.open(QIODevice::ReadOnly)) return 0; QXmlStreamReader […]
The front end uses ReadableStream.getReader to handle streaming rendering
Article directory foreword 1. Pure css Two, vue-typed-js plugin 1. Install 2. Register 3. use Summarize 3. ReadableStream 1. What is ReadableStream? 2. What does ReadableStream do? 3. How to use ReadableStream Foreword Requirement: Let the articles returned by the interface be rendered segment by segment according to the request, and at the same time, […]