81 ~~ 819

xiaoxiao2021-03-06  113

Solving User Functions You cannot turn on the device file corresponding to the driver: Problem: The OPEN of the user program B ("/ dev / mydev", o_rdwr) function always failed, returned -1 value. Specific change action: 1. Increase the head Document (?) 2. Change the device file path "MyDev" -> "/ dev / mydev" 3. Open mode: "Read / write": o_rdwr; "Read": o_rdonly

Linux Chinese input method sometimes unable to successfully call up temporary solution: Problem: After opening the input method, the input method is still in English: first turn off the input method, then open the input method in the text box of other programs, and finally return to the original program, enter Method can be used normally.

Handmade optimization (boot speed): 1. Specify IP 2. Norton firewall 3. Close WWW server

C language function pointer usage example: #include void func1 () {printf ("hello! / N");} struct str {void (* pfunc) ();}; int main () {Struct Str S.pfunc = func1; s.pfunc (); return 1;} Solve the problem that the driving module uses the count cannot be returned to zero (debugging phase): Red definition mod_inc_use_count and mod_dec_use_count are empty. Setting the print message seems to be only in the kernel (Mounted module program) is required, the user program virtual end does not print.

C language empty keyboard buffer: fflush (stdin);

Changing the key: line 58: 'i' and 'L' TTYS0 corresponds to COM1 TTYS1 Correspondence COM2 serial card reader analysis: Extraction status only one device identification number, change the device number The reader is turned over (estimated device number existing class RAM) ??? Define a macro for the delay time, and should recalculate the calibration word after embedding the ID, some instructions in the IDEL sub-segment before the ID The meaning is unknown, and it needs to be delayed after closing the antenna to re-open, the test 1000ms is equal to 1s, --------------------------------------------------------------------------------------------- -------------- It is a search for the search for I. Until success, you need to print only the return information that successs. Test the decimal number of data (automatically converted into hexadecimal) ),---------------------feasible

Read and write serial port loss bytes: increase the delay time, slow hardware response

SITSANG board cannot start Linux issues: Problem Description: Always black screen in the process of Linux -> Cancer, there is no fixed crane in the boot process, and with the increase of re-opening, the dead time is constantly advanced. Cause: Plate lack Electricity (even with power cords) can not be started, it can be seen that the power consumption is sufficient.

C Language Programming: Problem: To achieve the same delay time on different platforms. Method: Use the clock () function (include ), the return program is executed to the total execution time at this time, unit: millisecond board debugging 1. Determine the device identified by the board serial port connected to the board to TTYS1 in the Linux system.

Card reader unlimited block: 1. Software problem options.c_lflag & = ~ (icanon | echo | echoe | isig); options.c_oflag & = ~ opost; annotated (and C_LFLAG is changed to c_iflag). 2. Hardware problem Remove the card reader from the board serial port.

转载请注明原文地址:https://www.9cbs.com/read-125272.html

New Post(0)