Changes for page 01 Lua Functions

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

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

Summary

Details

Page properties
Content
... ... @@ -627,11 +627,13 @@
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 -== **serial.open(table setup)** ==
630 +== **3.1 serial.open(table setup)** ==
631 631  )))
632 632  
633 -**Function:** Enable one serial port
633 +**Function:**
634 634  
635 +Enable one serial port
636 +
635 635  **Parameters:**
636 636  
637 637  //Setup// is a Lua table; it needs to contain the following fields
... ... @@ -665,13 +665,17 @@
665 665  Failed: multi
666 666  
667 667  (((
668 -== **serial.close(serial obj)** ==
670 +== **3.2 serial.close(serial obj)** ==
669 669  )))
670 670  
671 -**Function:** Disable the serial port
673 +**Function:**
672 672  
673 -**Parameters: **//Obj //is the object returned by serial.open
675 +Disable the serial port
674 674  
677 +**Parameters:**
678 +
679 +//Obj //is the object returned by serial.open
680 +
675 675  **Return:**
676 676  
677 677  Succeed: true
... ... @@ -679,11 +679,13 @@
679 679  Failed: multi
680 680  
681 681  (((
682 -== **serial:read(number bytes[, number timeout])** ==
688 +== **3.3 serial:read(number bytes[, number timeout])** ==
683 683  )))
684 684  
685 -**Function:** Read the specified byte length serial port data
691 +**Function:**
686 686  
693 +Read the specified byte length serial port data
694 +
687 687  **Parameters:**
688 688  
689 689  //bytes//: number of bytes
... ... @@ -697,13 +697,15 @@
697 697  Failed: multi
698 698  
699 699  (((
700 -== **serial:write(string data)** ==
708 +== **3.4 serial:write(string data)** ==
701 701  )))
702 702  
703 -**Function:** Write the specified byte length to serial port data
711 +**Function:**
704 704  
705 -**Parameters: **
713 +Write the specified byte length to serial port data
706 706  
715 +**Parameters:**
716 +
707 707  //data//: serial port data
708 708  
709 709  **Return:**
... ... @@ -713,11 +713,13 @@
713 713  Failed: multi
714 714  
715 715  (((
716 -== **serial:flush([number flag])** ==
726 +== **3.5 serial:flush([number flag])** ==
717 717  )))
718 718  
719 -**Function:** Clear the serial port buffer
729 +**Function:**
720 720  
731 +Clear the serial port buffer
732 +
721 721  **Parameters:**
722 722  
723 723  //[flag=2]// clear option: 0: read, 1: write, 2: read-write
... ... @@ -729,13 +729,17 @@
729 729  Failed: multi
730 730  
731 731  (((
732 -== **serial:close()** ==
744 +== **3.6 serial:close()** ==
733 733  )))
734 734  
735 -**Function:** Close the serial port object
747 +**Function:**
736 736  
737 -**Parameters:** None
749 +Close the serial port object
738 738  
751 +**Parameters:**
752 +
753 +None
754 +
739 739  **Return:**
740 740  
741 741  Succeed: true