Download smartBASIC Core Functionality
Transcript
smart BASIC Core Functionality User Manual WARNING: You should minimise the number of writes. Each time a record is changed, empty flash is used up. The flash filing system does not overwrite previously used locations. Eventually there will be no more free memory and an automatic defragmentation will occur. This operation takes much longer than normal as a lot of data may need to be re-written to a new flash segment. This sector erase operation could affect the operation of the radio and result in a connection loss. //Example :: NvRecordSet.sb (See in Firmware Zip file) DIM w$, r$, rc : w$ = "HelloWorld" PRINT NvRecordSet(500,w$);" bytes written\n" PRINT NvRecordGetEx(500,r$,"default");" bytes read\n" PRINT "\n";r$ Expected Output: 10 bytes written 10 bytes read HelloWorld NVRECORDSET is a module function. NvCfgKeyGet FUNCTION NVCFGKEYGET reads the value of a built-in configuration key. See AT+CFG for a list of configuration keys. NVCFGKEYGET (keyId, value) Returns Exceptions INTEGER, a result code. The most typical value is 0x0000, indicating a successful operation. Local Stack Frame Underflow Local Stack Frame Overflow Arguments keyId byVal keyId AS INTEGER The configuration key that is to be read, in the range 1 to n, where n depends on the specific module and the full list is described for the AT+CFG command. value byRef value AS INTEGER The integer variable that will be updated with the value of the configuration key if it exists. Interactive Command See AT+CFG //Example :: NvCfgKeyGet.sb (See in Firmware Zip file) Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/bluetooth 175 Laird Technologies Americas: +1-800-492-2320 Europe: +44-1628-858-940 Hong Kong: +852-2268-6567 x026