LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
User Interface

opUI_DRAW (CMD, ....)

  • UI draw
  • Dispatch status can change to BUSYBREAK

    Parameters
    (DATA8)CMD - Specific command parameter
    • CMD = UPDATE

    • CMD = FILLRECT
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X size [0..LCD_WIDTH - X0]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT - Y0]

    • CMD = INVERSERECT
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X size [0..LCD_WIDTH - X0]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT - Y0]

    • CMD = RECT
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X size [0..LCD_WIDTH - X0]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT - Y0]

    • CMD = PIXEL
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X cord [0..LCD_WIDTH]
    (DATA16)Y - Y cord [0..LCD_HEIGHT]

    • CMD = LINE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X end [0..LCD_WIDTH]
    (DATA16)Y1 - Y end [0..LCD_HEIGHT]

    • CMD = DOTLINE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X end [0..LCD_WIDTH]
    (DATA16)Y1 - Y end [0..LCD_HEIGHT]
    (DATA16)ON - On pixels
    (DATA16)OFF - Off pixels

    • CMD = CIRCLE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)R - Radius

    • CMD = FILLCIRCLE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)R - Radius

    • CMD = TEXT
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATA8)STRING - First character in string to draw

    • CMD = ICON
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATA8)TYPE - Icon type (pool)
    (DATA8)NO - Icon no

    • CMD = BMPFILE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATA8)NAME - First character in filename (character string)

    • CMD = PICTURE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATA32)*IP - Address of picture

    • CMD = VALUE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATAF)VALUE - Value to write
    (DATA8)FIGURES - Total number of figures inclusive decimal point
    (DATA8)DECIMALS - Number of decimals

    • CMD = VIEW_VALUE
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATAF)VALUE - Value to write
    (DATA8)FIGURES - Total number of figures inclusive decimal point
    (DATA8)DECIMALS - Number of decimals

    • CMD = VIEW_UNIT
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X - X start cord [0..LCD_WIDTH]
    (DATA16)Y - Y start cord [0..LCD_HEIGHT]
    (DATAF)VALUE - Value to write
    (DATA8)FIGURES - Total number of figures inclusive decimal point
    (DATA8)DECIMALS - Number of decimals
    (DATA8)LENGTH - Maximal string length
    (DATA8)STRING - First character in string to draw

    • CMD = NOTIFICATION
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA8)ICON1 - First icon
    (DATA8)ICON2 - Second icon
    (DATA8)ICON2 - Third icon
    (DATA8)STRING - First character in notification string
    (DATA8)*STATE - State 0 = INIT

    • CMD = QUESTION
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA8)ICON1 - First icon
    (DATA8)ICON2 - Second icon
    (DATA8)STRING - First character in question string
    (DATA8)*STATE - State 0 = NO, 1 = OK
    Returns
    (DATA8) OK - Answer 0 = NO, 1 = OK, -1 = SKIP

    • CMD = ICON_QUESTION
    Parameters
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA8)*STATE - State 0 = INIT
    (DATA32)ICONS - bitfield with icons

    • CMD = KEYBOARD
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA8)LENGTH - Maximal string length
    (DATA8)DEFAULT - Default string (0 = none)
    (DATA8)*CHARSET - Internal use (must be a variable initialised by a "valid character set")
    Returns
    (DATA8) STRING - First character in string receiving keyboard input

    • CMD = BROWSE
    Parameters
    (DATA8)TYPE - Browser Types Avaliable
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X size [0..LCD_WIDTH]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT]
    (DATA8)LENGTH - Maximal string length
    Returns
    (DATA8) TYPE - Item type (folder, byte code file, sound file, ...)(must be a zero initialised variable)
    (DATA8) STRING - First character in string receiving selected item name

    • CMD = VERTBAR
    Parameters
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR]
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)X1 - X size [0..LCD_WIDTH]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT]
    (DATA16)MIN - Minimum value
    (DATA16)MAX - Maximum value
    (DATA16)ACT - Actual value

    • CMD = SELECT_FONT
    (DATA8)TYPE - Font type [0..2] font will change to 0 when UPDATE is called

    • CMD = TOPLINE
    (DATA8)ENABLE - Enable top status line (0 = disabled, 1 = enabled)

    • CMD = FILLWINDOW
    (DATA8)COLOR - Color [BG_COLOR..FG_COLOR] (Color != BG_COLOR and FG_COLOR -> test pattern)
    (DATA16)Y0 - Y start cord [0..LCD_HEIGHT]
    (DATA16)Y1 - Y size [0..LCD_HEIGHT]

    • CMD = STORE
    (DATA8)NO - Level number

    • CMD = RESTORE
    (DATA8)NO - Level number (N=0 -> Saved screen just before run)

    • CMD = GRAPH_SETUP
    (DATA16)X0 - X start cord [0..LCD_WIDTH]
    (DATA16)X1 - X size [0..(LCD_WIDTH - X0)]
    (DATA8)ITEMS - Number of datasets in arrayes
    (DATA16)OFFSET - DATA16 array (handle) containing Y start cord [0..LCD_HEIGHT]
    (DATA16)SPAN - DATA16 array (handle) containing Y size [0..(LCD_HEIGHT - hOFFSET[])]
    (DATAF)MIN - DATAF array (handle) containing min values
    (DATAF)MAX - DATAF array (handle) containing max values
    (DATAF)SAMPLE - DATAF array (handle) containing sample values

    • CMD = GRAPH_DRAW
    (DATA8)VIEW - Dataset number to view (0=all)


    opUI_FLUSH ()
  • User Interface flush buffers
  • Dispatch status unchanged


    opUI_READ (CMD, ....)

  • User Interface read
  • Dispatch status can change to BUSYBREAK and FAILBREAK

    Parameters
    (DATA8)CMD - Specific command parameter


    • CMD = GET_STRING
      Get string from terminal
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = KEY
      • Returns
        (DATA8) VALUE - Key value from lms_cmdin (0 = no key)

    • CMD = GET_ADDRESS
      • Returns
        (DATA32) VALUE - Address from lms_cmdin

    • CMD = GET_CODE
      • Parameters
        (DATA32)LENGTH - Maximal code stream length
      • Returns
        (DATA32) *IMAGE - Address of image
      • Returns
        (DATA32) *GLOBAL - Address of global variables
      • Returns
        (DATA8) FLAG - Flag tells if image is ready

    • CMD = GET_HW_VERS
      Get hardware version string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_FW_VERS
      Get firmware version string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_FW_BUILD
      Get firmware build string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_OS_VERS
      Get os version string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_OS_BUILD
      Get os build string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_VERSION
      Get version string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_IP
      Get IP address string
      • Parameters
        (DATA8)LENGTH - Maximal length of string returned (-1 = no check)
      • Returns
        (DATA8) DESTINATION - String variable or handle to string

    • CMD = GET_VBATT
      • Returns
        (DATAF) VALUE - Battery voltage [V]

    • CMD = GET_IBATT
      • Returns
        (DATAF) VALUE - Battery current [A]

    • CMD = GET_TBATT
      • Returns
        (DATAF) VALUE - Battery temperature rise [C]

    • CMD = GET_IMOTOR
      • Returns
        (DATAF) VALUE - Motor current [A]

    • CMD = GET_SDCARD
      • Returns
        (DATA8) STATE - SD card present [0..1]
      • Returns
        (DATA32) TOTAL - Kbytes in total
      • Returns
        (DATA32) FREE - Kbytes free

    • CMD = GET_USBSTICK
      • Returns
        (DATA8) STATE - USB stick present [0..1]
      • Returns
        (DATA32) TOTAL - Kbytes in total
      • Returns
        (DATA32) FREE - Kbytes free

    • CMD = GET_LBATT
      Get battery level in %
      • Returns
        (DATA8) PCT - Battery level [0..100]


        opUI_WRITE (CMD, ....)
  • UI write data
  • Dispatch status can change to BUSYBREAK and FAILBREAK

    Parameters
    (DATA8)CMD - Specific command parameter


    • CMD = WRITE_FLUSH


  • CMD = FLOATVALUE
    • Parameters
      (DATAF)VALUE - Value to write
    • Parameters
      (DATA8)FIGURES - Total number of figures inclusive decimal point
    • Parameters
      (DATA8)DECIMALS - Number of decimals

  • CMD = PUT_STRING
    • Parameters
      (DATA8)STRING - First character in string to write

  • CMD = CODE
    • Parameters
      (DATA8)ARRAY - First byte in byte array to write
    • Parameters
      (DATA32)LENGTH - Length of array

  • CMD = VALUE8
    • Parameters
      (DATA8)VALUE - Value to write

  • CMD = VALUE16
    • Parameters
      (DATA16)VALUE - Value to write

  • CMD = VALUE32
    • Parameters
      (DATA32)VALUE - Value to write

  • CMD = VALUEF
    • Parameters
      (DATAF)VALUE - Value to write

  • CMD = LED
  • CMD = SET_BUSY
    • Parameters
      (DATA8)VALUE - Value [0,1]

  • CMD = POWER
    • Parameters
      (DATA8)VALUE - Value [0,1]

  • CMD = TERMINAL
    • Parameters
      (DATA8)STATE - Value [0 = Off,1 = On]

  • CMD = SET_TESTPIN
    • Parameters
      (DATA8)STATE - Value [0 = low,1 = high]

  • CMD = INIT_RUN


  • CMD = UPDATE_RUN


  • CMD = GRAPH_SAMPLE


  • CMD = DOWNLOAD_END
    Send to brick when file down load is completed (plays sound and updates the UI browser)



    opUI_BUTTON (CMD, ....)

UI button


  • CMD = PRESSED
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button is pressed (0 = no, 1 = yes)

  • CMD = SHORTPRESS
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button has been pressed (0 = no, 1 = yes)

  • CMD = GET_BUMBED
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button has been pressed (0 = no, 1 = yes)

  • CMD = LONGPRESS
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button has been hold down(0 = no, 1 = yes)

  • CMD = PRESS
    • Parameters
      (DATA8)BUTTON - Button

  • CMD = RELEASE
    • Parameters
      (DATA8)BUTTON - Button

  • CMD = GET_HORZ
    • Returns
      (DATA16) VALUE - Horizontal arrows data (-1 = left, +1 = right, 0 = not pressed)

  • CMD = GET_VERT
    • Returns
      (DATA16) VALUE - Vertical arrows data (-1 = up, +1 = down, 0 = not pressed)

  • CMD = SET_BACK_BLOCK
    • Parameters
      (DATA8)BLOCKED - Set UI back button blocked flag (0 = not blocked, 1 = blocked)

  • CMD = GET_BACK_BLOCK
    • Returns
      (DATA8) BLOCKED - Get UI back button blocked flag (0 = not blocked, 1 = blocked)

  • CMD = TESTSHORTPRESS
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button has been hold down(0 = no, 1 = yes)

  • CMD = TESTLONGPRESS
    • Parameters
      (DATA8)BUTTON - Button
    • Returns
      (DATA8) STATE - Button has been hold down(0 = no, 1 = yes)


      opKEEP_ALIVE (MINUTES)

Keep alive

  • Dispatch status unchanged

    Returns
    (DATA8) MINUTES - Number of minutes before sleep