Show pageDiscussionOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== USBSTATUS ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Get status of the USB driver </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^ | | **→** | **#<sub>status</sub>** | | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |**Type**| [[manual:chapter5:basics#commands|Command]] || |**Parallel list processing**| [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]] || |**Affected by flags**| None || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''USBSTATUS'' command returns the current status of the USB driver. Information is encoded in a byte as follows: ^ Bit ^ Value ^ Meaning ^ | **0** | Clear | USB cable is connected. | | ::: | Set | USB cable is disconnected. | | **1** | Clear | USB driver has not completed its configuration. | | ::: | Set | USB driver has completed its configuration. | | **2** | Clear | USB data is not incoming. | | ::: | Set | USB data is incoming. | </callout> <callout type="danger" icon="true" title="Compatibility"> ---- This command is new in newRPL and does not exist in userRPL. </callout> <callout type="info" icon="true" title="Usage"> ---- The following program <code> « DO UNTIL USBSTATUS #3h == END "OK" » </code> will result in the calculator waiting in a loop for a connection to the PC to be estabilished and <code> 1: "OK" …………………………………………………………………………………… </code> once the connection is done. </callout> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> ---- {{page>manual:chapter6:usb&nofooter&noeditbtn&inline}} </callout> manual/chapter6/usb/cmd_usbstatus.txt Last modified: 2019/11/01 14:17by jojo1973