Changes for page 01 Lua Functions

Last modified by Theodore Xu on 2023/10/26 10:51

From version 5.8
edited by Stone Wu
on 2022/07/12 09:25
Change comment: (Autosaved)
To version 5.9
edited by Stone Wu
on 2022/07/12 09:26
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -627,13 +627,11 @@
627 627  1. When the data bit is 8, the maximum value of data transmission is 255 (0xFF), which supports the transmission of any character.
628 628  
629 629  (((
630 -== **3.1 serial.open(table setup)** ==
630 +== **serial.open(table setup)** ==
631 631  )))
632 632  
633 -**Function:**
633 +**Function:** Enable one serial port
634 634  
635 -Enable one serial port
636 -
637 637  **Parameters:**
638 638  
639 639  //Setup// is a Lua table; it needs to contain the following fields
... ... @@ -667,17 +667,13 @@
667 667  Failed: multi
668 668  
669 669  (((
670 -== **3.2 serial.close(serial obj)** ==
668 +== **serial.close(serial obj)** ==
671 671  )))
672 672  
673 -**Function:**
671 +**Function:** Disable the serial port
674 674  
675 -Disable the serial port
673 +**Parameters: **//Obj //is the object returned by serial.open
676 676  
677 -**Parameters:**
678 -
679 -//Obj //is the object returned by serial.open
680 -
681 681  **Return:**
682 682  
683 683  Succeed: true
... ... @@ -685,13 +685,11 @@
685 685  Failed: multi
686 686  
687 687  (((
688 -== **3.3 serial:read(number bytes[, number timeout])** ==
682 +== **serial:read(number bytes[, number timeout])** ==
689 689  )))
690 690  
691 -**Function:**
685 +**Function:** Read the specified byte length serial port data
692 692  
693 -Read the specified byte length serial port data
694 -
695 695  **Parameters:**
696 696  
697 697  //bytes//: number of bytes
... ... @@ -705,15 +705,13 @@
705 705  Failed: multi
706 706  
707 707  (((
708 -== **3.4 serial:write(string data)** ==
700 +== **serial:write(string data)** ==
709 709  )))
710 710  
711 -**Function:**
703 +**Function:** Write the specified byte length to serial port data
712 712  
713 -Write the specified byte length to serial port data
705 +**Parameters: **
714 714  
715 -**Parameters:**
716 -
717 717  //data//: serial port data
718 718  
719 719  **Return:**
... ... @@ -723,13 +723,11 @@
723 723  Failed: multi
724 724  
725 725  (((
726 -== **3.5 serial:flush([number flag])** ==
716 +== **serial:flush([number flag])** ==
727 727  )))
728 728  
729 -**Function:**
719 +**Function:** Clear the serial port buffer
730 730  
731 -Clear the serial port buffer
732 -
733 733  **Parameters:**
734 734  
735 735  //[flag=2]// clear option: 0: read, 1: write, 2: read-write
... ... @@ -741,17 +741,13 @@
741 741  Failed: multi
742 742  
743 743  (((
744 -== **3.6 serial:close()** ==
732 +== **serial:close()** ==
745 745  )))
746 746  
747 -**Function:**
735 +**Function:** Close the serial port object
748 748  
749 -Close the serial port object
737 +**Parameters:** None
750 750  
751 -**Parameters:**
752 -
753 -None
754 -
755 755  **Return:**
756 756  
757 757  Succeed: true