Appendix B
Table 1. Control Widget href functions.
|
Amulet:back() |
Returns to calling page. |
|
Amulet:calendar.timePeriod.setValue(x) |
Returns the year, month, day of the month, day of the week, hour, military hour, am or pm, minute, second. Where timePeriod is either year, month, day of the month, day of the week, hour, militaryHour, am_pm, minute, second and x is an integer with the following limits:
|
|
Amulet:calendar.timePeriod.value() |
All time periods return an integer, with the same limits as timePeriod.setValue(x) EXCEPT for the hour, the hour will return min=1, max=12 and you must read am_pm to determine the actual time OR you can just read militaryHour and the min=0, max=23. |
|
Amulet:calibrate() |
Runs touchscreen calibration, returns to calling page when calibration completed. Calibration constants are then saved to serial data flash. There is a 100,000 max write limit on the life of the serial data flash. After 10,000 writes, the Amulet OS and the user's project should be reprogrammed to maintain data integrity. |
|
Amulet:clearLCD() |
Clears the entire LCD. |
|
Amulet:fileNumber(x) |
Hyperlink to the file whose internal index is x. See Amulet link map file documentation for more information. |
|
Amulet:internal.setCalPOC() |
Sets the software calibration bit in the flash memory. Causes Amulet to go in calibration mode upon a soft or hard reset. Bit is cleared after succesful calibration. |
|
Amulet:internalRAM.byte(z).method(x)1 |
Performs the named Internal RAM byte method. See Internal RAM documentation for list of available methods. |
|
Amulet:internalRAM.clearRPCBuf() |
Clears the internalRAM RPC buffer. |
|
Amulet:internalRAM.invokeRPC(x)1 |
Adds the RPC number, x, to the internalRAM RPC buffer. |
|
Amulet:internalRAM.saveToFlash() |
Saves the current state of all the Internal RAM variables (byte, word and string) in the serial data flash. There is a 100,000 max write limit on the life of the serial data flash. After 10,000 writes, the Amulet OS and the user's project should be reprogrammed to maintain data integrity. |
|
Amulet:internalRAM.string(z).method(x)1 |
Performs the named Internal RAM string method. See Internal RAM documentation for list of available methods. |
|
Amulet:internalRAM.word(z).method(x)1 |
Performs the named Internal RAM word method. See Internal RAM documentation for list of available methods. |
|
Amulet:lcdController.off() |
Turns the LCD controller off. The display will go black, but everything on the page is still active as far as the touch panel is concerned. |
|
Amulet.lcdController.on() |
Turns the LCD controller back on if the LCD controller is off. |
|
Amulet:loadFlash(back) |
Used internally to halt all current activity and await flash programming commands from the Amulet GEM Compiler. Performs Amulet:back() upon exit. |
|
Amulet:loadFlash(reset) |
Used internally to halt all current activity and await flash programming commands from the Amulet GEM Compiler. Performs software reset upon exit. |
|
Amulet:loadFlash(return) |
Used to halt all current activity and await flash programming commands. Stays in same gem page upon exit. |
|
Amulet:lowPower.sdram(mode) |
The sdram can be put into one of the three modes below:
|
|
Amulet:lowPower.sleep(mode) |
The low power sleep mode puts the Amulet into a mode where page objects are no longer being updated and the OS stays in a tight loop updating the calendar object and looking for a touch wake up or a wake up on the negative edge on the Comm UART Rx line. Where mode can be on eof the three modes below(savings based on 4.3" MK480272 module):
NOTE: FAST_CLK is the 80 MHz clock and SLOW_CLK is the 32 KHz clock |
|
Amulet:NOP() |
Non-operational function; does nothing. |
|
Amulet:screenDump() |
Causes Amulet to jump to the screenDump page embedded in the OS files. ScreenDump page uploads the image on the LCD in the Amulet Bitmap Format using the xmodem with crc protocol. |
|
Amulet:SPI(z).byteOut(x)1 |
Sends a raw byte x out the SPI bus while taking Amulet SPI slave select line z low. Put x in single quotes to be treated as an ASCII character. (i.e. '9' is equal to 0x39) |
|
Amulet:SPI(z).streamOut(x1+x2+...xn) |
Sends a stream of raw bytes x1, x2 ... xn out the SPI bus while taking Amulet SPI slave select line z low. If the spixCSAAT=1 in the SPI Configuration settings, then the slave select will stay low between each byte, if spixCSAAT=0, then the slave select will go high between each byte. |
|
Amulet:SPI(z).stringOut(x)1 |
Sends an ASCII string x, not null terminated, out the SPI bus while taking Amulet SPI slave select line z low. If the spixCSAAT=1 in the SPI Configuration settings, then the slave select will stay low between each byte, if spixCSAAT=0, then the slave select will go high between each byte. Where x is a single-quoted string or x can also be an InternalRAM.string variable. |
|
Amulet:togglePolarity() |
Toggles the display polarity of the LCD between positive and negative. Once toggled, the state of the polarity is saved in the flash. Need to reload a page to see the resultant change of polarity. |
|
Amulet:UART.byteOut(x)1 |
Sends out a raw byte x. Put x in single quotes to be treated as an ASCII character. (i.e. '9' is equal to 0x39) |
|
Amulet:UART.invokeRPC(x)1 |
Sends out the invokeRPC command over the UART, with x being the RPC number. |
|
Amulet:UART.byte(z).setValue(x)1 |
Sends out the setByte command over the UART, where z is the byte variable number, and x is the value to set it to. |
|
Amulet:UART.streamOut(x1+x2+...xn) |
Sends a stream of raw bytes x1, x2 ... xn out the UART. No response is required or desired. |
|
Amulet:UART.stringOut(x)1 |
Sends an ASCII string x, not null terminated, out the UART. No response is required or desired. Where x is a single-quoted string or x can also be an InternalRAM.string variable. |
|
Amulet:UART.string(z).setValue(x)1 |
Sends out the setString command over the UART, where z is the string variable number, and x is the string to set it to. |
|
Amulet:UART.word(z).setValue(x)1 |
Sends out the setWord command over the UART, where z is the word variable number, and x is the value to set it to. |
|
filename.html |
Hyperlink to the file filename.html. |
1. Regarding x: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. META REFRESH tags and Function/Custom Buttons should use x. The range for x is 0-255 (0x00-0xff) for a BYTE, 0-65535 (0x00-0xffff) for a WORD and 250-character strings in double quotes for STRINGs.
Table 2. Control Widget href functions for Inter-Widget Communications (IWC).
|
Amulet:document.widgetName.buttonDown() |
The named Function/Custom Button Widget will appear as if it is currently being touched. |
|
Amulet:document.widgetName.buttonUp() |
The named Function/Custom Button Widget will appear as if it is currently NOT being touched. |
|
Amulet:document.widgetName.clearCanvas() |
The named Scribble/Dynamic Image Widget clears its canvas, including any background images. |
|
Amulet:document.widgetName.disappear() |
The named widget will clear itself from the LCD; if it is a View Widget it will also stop updating. |
|
Amulet:document.widgetName.forceHit() |
The named Control Widget will act as if it was "hit". |
|
Amulet:document.widgetName.forceRefresh() |
The named View Image Sequence Widget will paint the image at the next update, even if the incoming value is the same as the current state. Useful if an anchor is used around an Image Sequence Widget. |
|
Amulet:document.widgetName.forceUpdate() |
The named View Widget will act as if it's update rate time was activated. Allows for asynchronous updating. |
|
Amulet:document.widgetName.inverseRegionColor() |
The named widget will display in reverse video. |
|
Amulet:document.widgetName.inverseStringColor() |
The named widget's text string will display in reverse video. |
|
Amulet:document.widgetName.nextEntry() |
The named List widget will move its highlighted bar down to the next entry. Does not perform a "hit" on the new entry. |
|
Amulet:document.widgetName.normalRegionColor() |
The named widget will display in normal video. |
|
Amulet:document.widgetName.normalStringColor() |
The named widget's text string will display in normal video. |
|
Amulet:document.widgetName.previousEntry() |
The named List widget will move its highlighted bar up to the previous entry. Does not perform a "hit" on the new entry. |
|
Amulet:document.widgetName.reappear() |
The named widget will reappear on the LCD in its original location; if it is a View Widget it will also start updating. |
|
Amulet:document.widgetName.reset() |
The named widget will initialize internal variables and re-draw. |
|
Amulet:document.widgetName.setMethod(m)2 |
The href method for the named widget will change to m, where m is the method name. (such as value() or disappear()) |
|
Amulet:document.widgetName.setOnVarMethod(m)2 |
The IF= method for the named widget will change to m, where m is the method name. (such as value() or disappear()) |
|
Amulet:document.widgetName.setOnVarUARTMethod(m)2 |
The ONVAR UART method for the named widget will change to m, where m is the method name. (such as Value()) |
|
Amulet:document.widgetName.setOnVarVariableNumber(x)1 |
The variable number used in the ONVAR of the named widget will change to x, where x is the variable index used in the following variable types: byte(x), word(x) or string(x). |
|
Amulet:document.widgetName.setTrigger(x)1 |
The named Widget will change its equal, gt or lt value to the byte value x. |
|
Amulet:document.widgetName.setUARTMethod(m)2 |
The href UART method for the named widget will change to m, where m is the UART:method name. (such as Value()) |
|
Amulet:document.widgetName.setUpdateRate(f)3 |
The update rate for the named widget will change to f, where f is a floating point number that represents the update rate in seconds. |
|
Amulet:document.widgetName.setValue(x)1 |
The named widget will receive the intrinsic value of the calling widget, where x is the intrinsic value. |
|
Amulet:document.widgetName.setVariableNumber(x)1 |
The variable number used in the href of the named widget will change to x, where x is the variable index used in the following variable types: byte(x), word(x) or string(x). |
|
Amulet:document.widgetName.setX4(x) |
The named Widget will change its topleft x coordinate to the word value x. |
|
Amulet:document.widgetName.setY4(x) |
The named Widget will change its topleft y coordinate to the word value x. |
|
Amulet:document.widgetName.startUpdating() |
The named View Widget will start updating the displayed data. |
|
Amulet:document.widgetName.stopUpdating() |
The named View Widget will stop updating the displayed data. |
|
Amulet:document.widgetName.toggleRegionColor() |
The named widget will either start or stop displaying in reverse video. |
|
Amulet:document.widgetName.toggleStringColor() |
The named widget's text string will either start or stop displaying in reverse video. |
|
Amulet:document.widgetName.toggleUpdating() |
The named View Widget will either start or stop updating the displayed data. |
1. Regarding x: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. META REFRESH tags and Function/Custom Buttons should use x. The range for x is 0-255 (0x00-0xff) for a BYTE, 0-65535 (0x00-0xffff) for a WORD and 250-character strings in double quotes for STRINGs.
2. Regardingm - When setMethod(),setOnVarMethod(),setOnVarUARTMethod() or setUARTMethod(), is the IWC method, the argument should be the name of the method you want to set. i.e. disappear() or byte.value(). Notice when dealing with a method that relies on a type (byte, word or string) you need to include the type separated by a dot and then the method (i.e. word.value()) instead of just the method by itself.
3. Regarding f: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. META REFRESH tags and Function/Custom Buttons should use f. Like the regular updateRate, use a floating point number to specify the update rate in seconds. Range for f is 0-655.35
4. Regarding setX and setY: These methods should most always be preceded by a disappear() method and followed by a reappear() method. The setting of the x and y coordinates are independent of the removal of the widget in the old coordinates and the displaying in the new coordinates.
Table 3. Control Widget href functions for inter-widget communications with animated GIFs.
|
Amulet:document.imageName.oneFrame() |
The named image advances one frame. |
|
Amulet:document.imageName.fastSpeed() |
The named image animates quickly. |
|
Amulet:document.imageName.pause() |
The named image stops animating. |
|
Amulet:document.imageName.play() |
The named image starts animating in current direction. |
|
Amulet:document.imageName.playBackwards() |
The named image starts animating backwards. |
|
Amulet:document.imageName.playForward() |
The named image starts animating forward. |
|
Amulet:document.imageName.regularSpeed() |
The named image animates at normal speed. |
|
Amulet:document.imageName.slowSpeed() |
The named image animates slowly. |
|
Amulet:document.imageName.superFastSpeed() |
The named image animates very quickly. |
|
Amulet:document.imageName.superSlowSpeed() |
The named image animates very slowly. |
Table 4. Control Widget href functions for inter-widget communications with Scribble Widgets.
|
Amulet:document.widgetName.clearCanvas() |
Clears the scribble canvas completely, including any background images in the canvas. |
|
Amulet:document.widgetName.paintBackground() |
Redraws the background image from flash. |
| Amulet:document.widgetName.paintCanvas() | Redraws the canvas image from flash |
| Amulet:document.widgetName.reappear() | Allows freehand drawing to continue after a disappear() method was called 1 |
|
Amulet:document.widgetName.saveCanvas() |
Saves the current state of the canvas to the flash. Writes over the original canvas specified at compile time. |
|
Amulet:document.widgetName.setLineWeight(x) |
The named Scribble widget will set its active freehand drawing line weight to x. (range 1-15) |
|
Amulet:document.widgetName.uploadImage() |
Scribble widget uploads its raw image data via the connection and protocol described in the href parameter. |
1. Regarding reappear(): If reappear() is selected, either paintCanvas() or paintBackground() should be called immediately afterwards, because the reappear() method for the scribble widget only allows redrawing, it does NOT redraw either the canvas or the background image. If it is desired to display exactly what was on the screen at the time of the disappear, they should first saveCanvas(), then call disappear(). Then when calling reappear(), also call paintCanvas().
Table 5. Control Widget href functions for inter-widget communications with Pulse Width Modulation Sidgets.
|
Amulet:document.pwmName.start() |
The PWM port defined in the widget pwmName starts oscillating at the current period and pulse width |
|
Amulet:document.pwmName.stop() |
The PWM port defined in the widget pwmName stops oscillating and returns to a logic low state. |
|
Amulet:document.pwmName.setPeriod(x)1 |
Sets the period, in milliseconds, of the PWM port defined by the widget called pwmName. Range is 0.01 to 104.00 |
|
Amulet:document.pwmName.setPulseWidth(x)1 |
Sets the pulse width, in milliseconds, of the PWM port defined by the widget called pwmName. Range is 0.01 to 103.99 |
1. Regarding x: For static numbers, x is defined in milliseconds, but if the value is passed from a widget's intrinsic value, for example passed from a Slider widget, or from InternalRAM variables, this becomes microseconds.
Table 6. View Widget href functions (except StringField widget).
|
Amulet:document.widgetName.value() |
Returns the intrinsic value (byte or word) of the named Control Widget. |
|
Amulet:document.widgetName.maskedValue(y) |
Returns the intrinsic value (byte or word) of the named Control Widget ANDed with the mask y. |
|
Amulet:internal.fileNumber.value() |
Returns the internal flash index number of the current page. See Amulet link map file documentation for more information. |
|
Amulet:internal.lostCommByte.value() |
Returns the count of consecutive communication time-outs. |
|
Amulet:internalRAM.byte(x).value() |
Returns the value of internalRAM byte variable x. |
|
Amulet:internalRAM.byte(x).maskedValue(y) |
Returns the value of internalRAM byte variable x ANDed with the mask y. |
|
Amulet:internalRAM.word(x).value() |
Returns the value of internalRAM word variable x. |
|
Amulet:internalRAM.word(x).maskedValue(y) |
Returns the value of internalRAM word variable x ANDed with the mask y. |
|
Amulet:math.randomByte.value() |
Returns a pseudo-random byte. |
|
Amulet:math.randomByte.maskedValue(y) |
Returns a pseudo-random byte ANDed with the mask y. |
|
Amulet:math.randomFilteredByte.value() |
Returns a pseudo-random byte that is filtered. |
|
Amulet:math.randomFilteredByte.maskedValue(y) |
Returns a pseudo-random byte that is filtered ANDed with the mask y. |
|
Amulet:NOP() |
Returns nothing. |
|
Amulet:UART.byte(x).value() |
Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x. |
|
Amulet:UART.byte(x).maskedValue(y) |
Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x ANDed with the mask y. |
|
Amulet:UART.bytes(x).array(y) |
Sends a getByteArray request over the UART, where x is the starting byte variable number, y is the number of bytes in the array; returns the array of byte variables from x to (x+y). (Only valid when used in a META Refresh tag to load InternalRAM variables.) |
|
Amulet:UART.word(x).value() |
Sends a getWord request over the UART, where x is the word variable number; returns the value of the word variable x. |
|
Amulet:UART.word(x).maskedValue(y) |
Sends a getWord request over the UART, where x is the word variable number; returns the value of the word variable x ANDed with the mask y. |
|
Amulet:UART.words(x).array(y) |
Sends a getWordArray request over the UART, where x is the starting word variable number, y is the number of words in the array; returns the array of word variables from x to (x+y). (Only valid when used in a META Refresh tag to load InternalRAM variables.) |
Table 7. StringField Widget href functions.
|
Amulet:document.widgetName.value() |
Returns the intrinsic value (byte, word or string) of the named Control Widget. |
|
Amulet:internal.lostCommByte.value() |
Receives the count of consecutive communication time-outs. (Only valid if option field populated.) |
|
Amulet:internal.OSVersionString.value() |
Returns the string of the current Amulet OS version number. |
|
Amulet:internalRAM.byte(x).value() |
Returns the value of internalRAM byte variable x. |
|
Amulet:internalRAM.byte(x).maskedValue(y) |
Returns the value of internalRAM byte variable x ANDed with the mask y. |
|
Amulet:internalRAM.string(x).value() |
Returns the string of internalRAM string variable x. |
|
Amulet:math.randomByte.value() |
Receives a pseudo-random byte. |
|
Amulet:math.randomByte.maskedValue(y) |
Receives a pseudo-random byte ANDed with the mask y. |
|
Amulet:UART.byte(x).value() |
Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x. (Only valid if option field populated.) |
|
Amulet:UART.byte(x).maskedValue(y) |
Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x ANDed with the mask y. (Only valid if option field populated.) |
|
Amulet:UART.string(x).value() |
Sends a getString request over the UART, where x is the string variable number; returns a null terminated ASCII string. |
Table 8. Scribble Widget href function.
|
Amulet:UART.xmodemUploadImage() |
The Scribble Widget will upload raw image data out the UART using an xmodem protocol upon receiving the uploadImage() IWC method. |
Table 9. Line Graph Widget href function.
|
Amulet:internalRAM.bytes(x).array(y) |
Returns the array of internalRAM bytes starting at variable x through variable (x+y). |
|
Amulet:internalRAM.words(x).array(y) |
Returns the array of internalRAM words starting at variable x through variable (x+y). |
|
Amulet:UART.bytes(x).array(y) |
Sends a getByteArray request over the UART, where x is the starting byte variable number, y is the number of bytes in the array; returns the array of byte variables from x to (x+y). |
|
Amulet:UART.words(x).array(y) |
Sends a getWordArray request over the UART, where x is the starting word variable number, y is the number of words in the array; returns the array of word variables from x to (x+y). |

Start Here
Development Tools
| Site Use Terms | Terms of Sale | Privacy | Warranty | Site Map | |