Andrei Florian
Published © GPL3+

SafeFiler

Smarten up your filer. Make filing a little funner!

EasyFull instructions provided1 hour102

Things used in this project

Hardware components

Rapid IoT Prototyping Kit
NXP Rapid IoT Prototyping Kit
×1

Software apps and online services

NXP Rapid IoT Online Studio

Story

Read more

Schematics

Image

Deviceicon ouoycxdjbs

Code

SafeFiler

C#
The code for the project is added below as a .atmo file. There are 2 ways of getting the code
Variant 1 - Download the code from the following link https://drive.google.com/file/d/1MXv8u5bdmGPhnk6Qfn9SZBCFryDbqH6n/view?usp=sharing
Variant 2 - Copy the code below, open it in a code editor and save it as a .atmo file
{
  "name": "SafeFiler",
  "createVersion": "2017-08-12",
  "description": "",
  "lastModified": "2018-02-13T00:39:19.386Z",
  "created": "2018-02-13T00:39:19.386Z",
  "meta": {
    "projectTypeName": "NXP Rapid IoT",
    "projectTypeId": "NxpRpk"
  },
  "planes": {
    "NXP Rapid IoT": {
      "type": "mcuxpresso",
      "compilerVersion": "latest",
      "variants": [
        "NxpRpk"
      ],
      "meta": {},
      "elements": [
        {
          "name": "SX9500Touch",
          "type": "EmbeddedSX9500",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "setup": "\tATMO_SX9500_Config_t config;\n\tconfig.address = ATMO_PROPERTY(SX9500Touch, i2cAddress);\n\tconfig.i2cDriverInstance = ATMO_PROPERTY(SX9500Touch, i2cInstance);\n\tconfig.gpioDriverInstance = ATMO_PROPERTY(SX9500Touch, gpioInstance);\n\tconfig.interruptEnabled = ATMO_PROPERTY(SX9500Touch, interruptEnabled);\n\tconfig.interruptPin = ATMO_PROPERTY(SX9500Touch, interruptGpio);\n\tATMO_SX9500_Init(&config);\n\tATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Up, ATMO_ABILITY(SX9500Touch, pressUp));\n\tATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Down, ATMO_ABILITY(SX9500Touch, pressDown));\n\tATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Left, ATMO_ABILITY(SX9500Touch, pressLeft));\n\tATMO_SX9500_RegisterTouchedAbilityHandle(SX9500_Touched_Right, ATMO_ABILITY(SX9500Touch, pressRight));\n\treturn ATMO_Status_Success;",
              "getTouchData": "",
              "pressUp": "SX9500_TouchState_t touchState;\nATMO_GetBinary(in, &touchState, sizeof(touchState));\nATMO_CreateValueBinary(out, &touchState, sizeof(touchState));\nreturn ATMO_Status_Success;",
              "pressDown": "SX9500_TouchState_t touchState;\nATMO_GetBinary(in, &touchState, sizeof(touchState));\nATMO_CreateValueBinary(out, &touchState, sizeof(touchState));\nreturn ATMO_Status_Success;",
              "pressLeft": "SX9500_TouchState_t touchState;\nATMO_GetBinary(in, &touchState, sizeof(touchState));\nATMO_CreateValueBinary(out, &touchState, sizeof(touchState));\nreturn ATMO_Status_Success;",
              "pressRight": "SX9500_TouchState_t touchState;\nATMO_GetBinary(in, &touchState, sizeof(touchState));\nATMO_CreateValueBinary(out, &touchState, sizeof(touchState));\nreturn ATMO_Status_Success;"
            },
            "variables": {},
            "embeddedPropertyConversions": {},
            "codeUserChanged": {
              "setup": false,
              "getTouchData": false,
              "pressUp": false,
              "pressDown": false,
              "pressLeft": false,
              "pressRight": false
            },
            "i2cInstance": 1,
            "gpioInstance": 0,
            "interruptEnabled": true,
            "interruptGpio": "PTA9",
            "i2cAddress": "0x28"
          },
          "meta": {
            "editorX": 38.33349609375,
            "editorY": 0,
            "lastTrigger": "rightPressed"
          },
          "triggers": {
            "triggered": [],
            "touchDataRead": [],
            "upPressed": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "EmbeddedPageController",
                "targetAbility": "navigateUp"
              }
            ],
            "downPressed": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "EmbeddedPageController",
                "targetAbility": "navigateDown"
              }
            ],
            "leftPressed": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "EmbeddedPageController",
                "targetAbility": "navigateLeft"
              }
            ],
            "rightPressed": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "EmbeddedPageController",
                "targetAbility": "navigateRight"
              }
            ]
          },
          "interruptAbilities": {
            "trigger": false,
            "setup": false,
            "getTouchData": false,
            "pressUp": false,
            "pressDown": false,
            "pressLeft": false,
            "pressRight": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "setup",
              "triggers": []
            },
            {
              "name": "getTouchData",
              "triggers": [
                "touchDataRead"
              ]
            },
            {
              "name": "pressUp",
              "triggers": [
                "upPressed",
                "touchDataRead"
              ]
            },
            {
              "name": "pressDown",
              "triggers": [
                "downPressed",
                "touchDataRead"
              ]
            },
            {
              "name": "pressLeft",
              "triggers": [
                "leftPressed",
                "touchDataRead"
              ]
            },
            {
              "name": "pressRight",
              "triggers": [
                "rightPressed",
                "touchDataRead"
              ]
            }
          ]
        },
        {
          "name": "EmbeddedPageController",
          "type": "EmbeddedPageController",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables",
            "rpk"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "setup": "\n\tATMO_UI_PAGE_CONTROLLER_Config_t config;\n\tconfig.enableUpDownNavLabels = ATMO_PROPERTY(EmbeddedPageController, upDownNavigationLabelsEnabled);\n\tconfig.enableLeftRightNavLabels = ATMO_PROPERTY(EmbeddedPageController, leftRightNavigationLabelsEnabled);\n\tATMO_UI_Page_SetConfiguration(&config);\n    return ATMO_Status_Success;\n\t",
              "displayRootPage": "\n\t\n\tATMO_UI_Page_DisplayRootPage();\n\treturn ATMO_Status_Success;\n\t",
              "navigateUp": "\n\tATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_UP);\n\treturn ATMO_Status_Success;\n\t",
              "navigateDown": "\n\tATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_DOWN);\n\treturn ATMO_Status_Success;\n\t",
              "navigateLeft": "\n\tATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_LEFT);\n\treturn ATMO_Status_Success;\n\t",
              "navigateRight": "\n\tATMO_UI_Page_ProcessNavButton(ATMO_UI_PAGE_NAV_RIGHT);\n\treturn ATMO_Status_Success;\n\t",
              "processTopRightButton": "\n\tATMO_UI_Page_ProcessUserButton(1);\n\treturn ATMO_Status_Success;\n\t",
              "processBottomRightButton": "\n\tATMO_UI_Page_ProcessUserButton(2);\n\treturn ATMO_Status_Success;\n\t",
              "processTopLeftButton": "\n\tATMO_UI_Page_ProcessUserButton(3);\n\treturn ATMO_Status_Success;\n\t",
              "processBottomLeftButton": "\n\tATMO_UI_Page_ProcessUserButton(4);\n\treturn ATMO_Status_Success;\n\t"
            },
            "variables": {},
            "embeddedPropertyConversions": {},
            "codeUserChanged": {
              "setup": false,
              "displayRootPage": false,
              "navigateUp": false,
              "navigateDown": false,
              "navigateLeft": false,
              "navigateRight": false,
              "processTopRightButton": false,
              "processBottomRightButton": false,
              "processTopLeftButton": false,
              "processBottomLeftButton": false
            },
            "upDownNavigationLabelsEnabled": true,
            "leftRightNavigationLabelsEnabled": false
          },
          "meta": {
            "editorX": 188.33349609375,
            "editorY": 0,
            "lastTrigger": "triggered"
          },
          "triggers": {
            "triggered": [],
            "navigateUp": [],
            "navigateDown": [],
            "navigateLeft": [],
            "navigateRight": [],
            "processTopRightButton": [],
            "processBottomRightButton": [],
            "processTopLeftButton": [],
            "processBottomLeftButton": []
          },
          "interruptAbilities": {
            "trigger": false,
            "setup": false,
            "displayRootPage": false,
            "navigateUp": false,
            "navigateDown": false,
            "navigateLeft": false,
            "navigateRight": false,
            "processTopRightButton": false,
            "processBottomRightButton": false,
            "processTopLeftButton": false,
            "processBottomLeftButton": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "setup",
              "triggers": []
            },
            {
              "name": "displayRootPage",
              "triggers": []
            },
            {
              "name": "navigateUp",
              "triggers": [
                "navigateUp"
              ]
            },
            {
              "name": "navigateDown",
              "triggers": [
                "navigateDown"
              ]
            },
            {
              "name": "navigateLeft",
              "triggers": [
                "navigateLeft"
              ]
            },
            {
              "name": "navigateRight",
              "triggers": [
                "navigateRight"
              ]
            },
            {
              "name": "processTopRightButton",
              "triggers": [
                "processTopRightButton"
              ]
            },
            {
              "name": "processBottomRightButton",
              "triggers": [
                "processBottomRightButton"
              ]
            },
            {
              "name": "processTopLeftButton",
              "triggers": [
                "processTopLeftButton"
              ]
            },
            {
              "name": "processBottomLeftButton",
              "triggers": [
                "processBottomLeftButton"
              ]
            }
          ]
        },
        {
          "name": "Function",
          "type": "EmbeddedFunction",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\tint localVal = 0;\n\tATMO_GetUnsignedInt(in, &localVal);\n\t\n\tif(localVal == 1)\n\t{\n\t    currentVal[0]++;\n\t}\n\telse\n\t{\n\t    if(currentVal[0] > 0)\n\t    {\n\t      currentVal[0]--;  \n\t    }\n\t}\n\tATMO_CreateValueInt(out, currentVal[0]);\n\treturn ATMO_Status_Success;"
            },
            "variables": {},
            "embeddedPropertyConversions": {},
            "codeUserChanged": {
              "trigger": true
            }
          },
          "meta": {
            "editorX": 141.33349609375,
            "editorY": 108,
            "lastTrigger": "triggered"
          },
          "triggers": {
            "triggered": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "page",
                "targetAbility": "setText"
              }
            ]
          },
          "interruptAbilities": {
            "trigger": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            }
          ]
        },
        {
          "name": "Function1",
          "type": "EmbeddedFunction",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\tint localVal = 0;\n\tATMO_GetUnsignedInt(in, &localVal);\n\t\n\tif(localVal == 1)\n\t{\n\t    currentVal[1]++;\n\t}\n\telse\n\t{\n\t    if(currentVal[1] > 0)\n\t    {\n\t      currentVal[1]--;  \n\t    }\n\t}\n\tATMO_CreateValueInt(out, currentVal[1]);\n\treturn ATMO_Status_Success;"
            },
            "variables": {},
            "embeddedPropertyConversions": {},
            "codeUserChanged": {
              "trigger": true
            }
          },
          "meta": {
            "editorX": 138.33349609375,
            "editorY": 203,
            "lastTrigger": "triggered"
          },
          "triggers": {
            "triggered": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "pag",
                "targetAbility": "setText"
              }
            ]
          },
          "interruptAbilities": {
            "trigger": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            }
          ]
        },
        {
          "name": "Function2",
          "type": "EmbeddedFunction",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\tint localVal = 0;\n\tATMO_GetUnsignedInt(in, &localVal);\n\t\n\tif(localVal == 1)\n\t{\n\t    currentVal[2]++;\n\t}\n\telse\n\t{\n\t    if(currentVal[2] > 0)\n\t    {\n\t      currentVal[2]--;  \n\t    }\n\t}\n\tATMO_CreateValueInt(out, currentVal[2]);\n\treturn ATMO_Status_Success;"
            },
            "variables": {},
            "embeddedPropertyConversions": {},
            "codeUserChanged": {
              "trigger": true
            }
          },
          "meta": {
            "editorX": 137.33349609375,
            "editorY": 295,
            "lastTrigger": "triggered"
          },
          "triggers": {
            "triggered": [
              {
                "mapping": {},
                "targetOrder": [],
                "targetElement": "pa",
                "targetAbility": "setText"
              }
            ]
          },
          "interruptAbilities": {
            "trigger": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            }
          ]
        },
        {
          "name": "page",
          "type": "EmbeddedStaticTextDisplay",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables",
            "rpk"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "displayPage": "\n\tATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(page, x), ATMO_PROPERTY(page, y), false);\n\treturn ATMO_Status_Success;\n\t",
              "topRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "topLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "onDisplayed": "\n\treturn ATMO_Status_Success;\n    ",
              "setText": "\n    ATMO_Value_t strVal;\n    ATMO_InitValue(&strVal);\n    ATMO_CreateValueConverted(&strVal, ATMO_DATATYPE_STRING, in);\n    ATMO_UI_STATICTEXT_SetText(ATMO_VARIABLE(page,pageHandle), strVal.data);\n    ATMO_FreeValue(&strVal);\n\treturn ATMO_Status_Success;\n\t",
              "setup": "\n    ATMO_UI_PAGE_Config_t config;\n\tconfig.hidden = ATMO_PROPERTY(page, pageHidden);\n\tconfig.textColor = ATMO_PROPERTY(page, textColor);\n\tconfig.activeButtons = ATMO_UI_Page_GetButtonMask(ATMO_PROPERTY(page, topRightButtonEnabled),\n\t\tATMO_PROPERTY(page,bottomRightButtonEnabled), ATMO_PROPERTY(page, topLeftButtonEnabled), ATMO_PROPERTY(page, bottomLeftButtonEnabled));\n    config.x = ATMO_PROPERTY(page, x);\n\tconfig.y = ATMO_PROPERTY(page, y);\n\tstrncpy(config.topLeftButtonLabel, ATMO_PROPERTY(page, topLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.topRightButtonLabel, ATMO_PROPERTY(page, topRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomLeftButtonLabel, ATMO_PROPERTY(page, bottomLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomRightButtonLabel, ATMO_PROPERTY(page, bottomRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n    config.spanX = ATMO_PROPERTY(page, spanX);\n\tconfig.spanY = ATMO_PROPERTY(page, spanY);\n    config.title = ATMO_PROPERTY(page, pageTitle);\n    config.titleHidden = ATMO_PROPERTY(page, titleHidden);\n\tATMO_UI_STATICTEXT_Init(&config);\n\tATMO_VARIABLE(page, pageHandle) = config.templateInstance;\n    ATMO_UI_STATICTEXT_SetText(config.templateInstance, ATMO_PROPERTY(page, text));\n\tATMO_UI_STATICTEXT_SetTextSize(config.templateInstance, ATMO_PROPERTY(page, fontSize));\n\tATMO_UI_STATICTEXT_SetAlignment(config.templateInstance, ATMO_PROPERTY(page, horizontalAlignment));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(page,pageHandle), 1, ATMO_ABILITY(page, topRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(page,pageHandle), 2, ATMO_ABILITY(page, bottomRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(page,pageHandle), 3, ATMO_ABILITY(page, topLeftButtonPressed));\n    ATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(page,pageHandle), 4, ATMO_ABILITY(page, bottomLeftButtonPressed));\n    \n\tif(!config.hidden)\n\t{\n\t\tATMO_UI_STATICTEXT_RegisterOnDisplayedAbilityHandle(ATMO_VARIABLE(page,pageHandle), ATMO_ABILITY(page, onDisplayed));\n\t}\n    return ATMO_Status_Success;\n    "
            },
            "variables": {
              "pageHandle": {
                "type": "ATMO_DriverInstanceHandle_t"
              }
            },
            "embeddedPropertyConversions": {
              "pageTitle": "string",
              "topRightButtonLabel": "string",
              "bottomRightButtonLabel": "string",
              "topLeftButtonLabel": "string",
              "bottomLeftButtonLabel": "string",
              "text": "string"
            },
            "codeUserChanged": {
              "displayPage": false,
              "topRightButtonPressed": false,
              "bottomRightButtonPressed": false,
              "topLeftButtonPressed": false,
              "bottomLeftButtonPressed": false,
              "onDisplayed": false,
              "setText": false,
              "setup": false
            },
            "textColor": "GUI_GREEN",
            "pageTitle": "Section 1",
            "titleHidden": false,
            "pageHidden": false,
            "topRightButtonLabel": "",
            "topRightButtonEnabled": false,
            "bottomRightButtonLabel": "",
            "bottomRightButtonEnabled": false,
            "topLeftButtonLabel": "",
            "topLeftButtonEnabled": false,
            "bottomLeftButtonLabel": "",
            "bottomLeftButtonEnabled": false,
            "x": "1",
            "y": "1",
            "spanX": 1,
            "spanY": 1,
            "text": "0",
            "fontSize": "ATMO_FONT_SIZE_32PT",
            "horizontalAlignment": "GUI_TA_HCENTER"
          },
          "meta": {
            "editorX": 250.33349609375,
            "editorY": 109,
            "lastTrigger": "onDisplayed"
          },
          "triggers": {
            "triggered": [],
            "topRightButtonPressed": [],
            "bottomRightButtonPressed": [],
            "topLeftButtonPressed": [],
            "bottomLeftButtonPressed": [],
            "onDisplayed": []
          },
          "interruptAbilities": {
            "trigger": false,
            "displayPage": false,
            "topRightButtonPressed": false,
            "bottomRightButtonPressed": false,
            "topLeftButtonPressed": false,
            "bottomLeftButtonPressed": false,
            "onDisplayed": false,
            "setText": false,
            "setup": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "displayPage",
              "triggers": []
            },
            {
              "name": "topRightButtonPressed",
              "triggers": [
                "topRightButtonPressed"
              ]
            },
            {
              "name": "bottomRightButtonPressed",
              "triggers": [
                "bottomRightButtonPressed"
              ]
            },
            {
              "name": "topLeftButtonPressed",
              "triggers": [
                "topLeftButtonPressed"
              ]
            },
            {
              "name": "bottomLeftButtonPressed",
              "triggers": [
                "bottomLeftButtonPressed"
              ]
            },
            {
              "name": "onDisplayed",
              "triggers": [
                "onDisplayed"
              ]
            },
            {
              "name": "setText",
              "triggers": []
            },
            {
              "name": "setup",
              "triggers": []
            }
          ]
        },
        {
          "name": "pag",
          "type": "EmbeddedStaticTextDisplay",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables",
            "rpk"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "displayPage": "\n\tATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(pag, x), ATMO_PROPERTY(pag, y), false);\n\treturn ATMO_Status_Success;\n\t",
              "topRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "topLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "onDisplayed": "\n\treturn ATMO_Status_Success;\n    ",
              "setText": "\n    ATMO_Value_t strVal;\n    ATMO_InitValue(&strVal);\n    ATMO_CreateValueConverted(&strVal, ATMO_DATATYPE_STRING, in);\n    ATMO_UI_STATICTEXT_SetText(ATMO_VARIABLE(pag,pageHandle), strVal.data);\n    ATMO_FreeValue(&strVal);\n\treturn ATMO_Status_Success;\n\t",
              "setup": "\n    ATMO_UI_PAGE_Config_t config;\n\tconfig.hidden = ATMO_PROPERTY(pag, pageHidden);\n\tconfig.textColor = ATMO_PROPERTY(pag, textColor);\n\tconfig.activeButtons = ATMO_UI_Page_GetButtonMask(ATMO_PROPERTY(pag, topRightButtonEnabled),\n\t\tATMO_PROPERTY(pag,bottomRightButtonEnabled), ATMO_PROPERTY(pag, topLeftButtonEnabled), ATMO_PROPERTY(pag, bottomLeftButtonEnabled));\n    config.x = ATMO_PROPERTY(pag, x);\n\tconfig.y = ATMO_PROPERTY(pag, y);\n\tstrncpy(config.topLeftButtonLabel, ATMO_PROPERTY(pag, topLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.topRightButtonLabel, ATMO_PROPERTY(pag, topRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomLeftButtonLabel, ATMO_PROPERTY(pag, bottomLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomRightButtonLabel, ATMO_PROPERTY(pag, bottomRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n    config.spanX = ATMO_PROPERTY(pag, spanX);\n\tconfig.spanY = ATMO_PROPERTY(pag, spanY);\n    config.title = ATMO_PROPERTY(pag, pageTitle);\n    config.titleHidden = ATMO_PROPERTY(pag, titleHidden);\n\tATMO_UI_STATICTEXT_Init(&config);\n\tATMO_VARIABLE(pag, pageHandle) = config.templateInstance;\n    ATMO_UI_STATICTEXT_SetText(config.templateInstance, ATMO_PROPERTY(pag, text));\n\tATMO_UI_STATICTEXT_SetTextSize(config.templateInstance, ATMO_PROPERTY(pag, fontSize));\n\tATMO_UI_STATICTEXT_SetAlignment(config.templateInstance, ATMO_PROPERTY(pag, horizontalAlignment));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pag,pageHandle), 1, ATMO_ABILITY(pag, topRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pag,pageHandle), 2, ATMO_ABILITY(pag, bottomRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pag,pageHandle), 3, ATMO_ABILITY(pag, topLeftButtonPressed));\n    ATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pag,pageHandle), 4, ATMO_ABILITY(pag, bottomLeftButtonPressed));\n    \n\tif(!config.hidden)\n\t{\n\t\tATMO_UI_STATICTEXT_RegisterOnDisplayedAbilityHandle(ATMO_VARIABLE(pag,pageHandle), ATMO_ABILITY(pag, onDisplayed));\n\t}\n    return ATMO_Status_Success;\n    "
            },
            "variables": {
              "pageHandle": {
                "type": "ATMO_DriverInstanceHandle_t"
              }
            },
            "embeddedPropertyConversions": {
              "pageTitle": "string",
              "topRightButtonLabel": "string",
              "bottomRightButtonLabel": "string",
              "topLeftButtonLabel": "string",
              "bottomLeftButtonLabel": "string",
              "text": "string"
            },
            "codeUserChanged": {
              "displayPage": false,
              "topRightButtonPressed": false,
              "bottomRightButtonPressed": false,
              "topLeftButtonPressed": false,
              "bottomLeftButtonPressed": false,
              "onDisplayed": false,
              "setText": false,
              "setup": false
            },
            "textColor": "GUI_GREEN",
            "pageTitle": "Section 2",
            "titleHidden": false,
            "pageHidden": false,
            "topRightButtonLabel": "",
            "topRightButtonEnabled": false,
            "bottomRightButtonLabel": "",
            "bottomRightButtonEnabled": false,
            "topLeftButtonLabel": "",
            "topLeftButtonEnabled": false,
            "bottomLeftButtonLabel": "",
            "bottomLeftButtonEnabled": false,
            "x": "2",
            "y": "1",
            "spanX": 1,
            "spanY": 1,
            "text": "0",
            "fontSize": "ATMO_FONT_SIZE_32PT",
            "horizontalAlignment": "GUI_TA_HCENTER"
          },
          "meta": {
            "editorX": 249.33349609375,
            "editorY": 205,
            "lastTrigger": "onDisplayed"
          },
          "triggers": {
            "triggered": [],
            "topRightButtonPressed": [],
            "bottomRightButtonPressed": [],
            "topLeftButtonPressed": [],
            "bottomLeftButtonPressed": [],
            "onDisplayed": []
          },
          "interruptAbilities": {
            "trigger": false,
            "displayPage": false,
            "topRightButtonPressed": false,
            "bottomRightButtonPressed": false,
            "topLeftButtonPressed": false,
            "bottomLeftButtonPressed": false,
            "onDisplayed": false,
            "setText": false,
            "setup": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "displayPage",
              "triggers": []
            },
            {
              "name": "topRightButtonPressed",
              "triggers": [
                "topRightButtonPressed"
              ]
            },
            {
              "name": "bottomRightButtonPressed",
              "triggers": [
                "bottomRightButtonPressed"
              ]
            },
            {
              "name": "topLeftButtonPressed",
              "triggers": [
                "topLeftButtonPressed"
              ]
            },
            {
              "name": "bottomLeftButtonPressed",
              "triggers": [
                "bottomLeftButtonPressed"
              ]
            },
            {
              "name": "onDisplayed",
              "triggers": [
                "onDisplayed"
              ]
            },
            {
              "name": "setText",
              "triggers": []
            },
            {
              "name": "setup",
              "triggers": []
            }
          ]
        },
        {
          "name": "pa",
          "type": "EmbeddedStaticTextDisplay",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables",
            "rpk"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "displayPage": "\n\tATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(pa, x), ATMO_PROPERTY(pa, y), false);\n\treturn ATMO_Status_Success;\n\t",
              "topRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "topLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "onDisplayed": "\n\treturn ATMO_Status_Success;\n    ",
              "setText": "\n    ATMO_Value_t strVal;\n    ATMO_InitValue(&strVal);\n    ATMO_CreateValueConverted(&strVal, ATMO_DATATYPE_STRING, in);\n    ATMO_UI_STATICTEXT_SetText(ATMO_VARIABLE(pa,pageHandle), strVal.data);\n    ATMO_FreeValue(&strVal);\n\treturn ATMO_Status_Success;\n\t",
              "setup": "\n    ATMO_UI_PAGE_Config_t config;\n\tconfig.hidden = ATMO_PROPERTY(pa, pageHidden);\n\tconfig.textColor = ATMO_PROPERTY(pa, textColor);\n\tconfig.activeButtons = ATMO_UI_Page_GetButtonMask(ATMO_PROPERTY(pa, topRightButtonEnabled),\n\t\tATMO_PROPERTY(pa,bottomRightButtonEnabled), ATMO_PROPERTY(pa, topLeftButtonEnabled), ATMO_PROPERTY(pa, bottomLeftButtonEnabled));\n    config.x = ATMO_PROPERTY(pa, x);\n\tconfig.y = ATMO_PROPERTY(pa, y);\n\tstrncpy(config.topLeftButtonLabel, ATMO_PROPERTY(pa, topLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.topRightButtonLabel, ATMO_PROPERTY(pa, topRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomLeftButtonLabel, ATMO_PROPERTY(pa, bottomLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomRightButtonLabel, ATMO_PROPERTY(pa, bottomRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n    config.spanX = ATMO_PROPERTY(pa, spanX);\n\tconfig.spanY = ATMO_PROPERTY(pa, spanY);\n    config.title = ATMO_PROPERTY(pa, pageTitle);\n    config.titleHidden = ATMO_PROPERTY(pa, titleHidden);\n\tATMO_UI_STATICTEXT_Init(&config);\n\tATMO_VARIABLE(pa, pageHandle) = config.templateInstance;\n    ATMO_UI_STATICTEXT_SetText(config.templateInstance, ATMO_PROPERTY(pa, text));\n\tATMO_UI_STATICTEXT_SetTextSize(config.templateInstance, ATMO_PROPERTY(pa, fontSize));\n\tATMO_UI_STATICTEXT_SetAlignment(config.templateInstance, ATMO_PROPERTY(pa, horizontalAlignment));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pa,pageHandle), 1, ATMO_ABILITY(pa, topRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pa,pageHandle), 2, ATMO_ABILITY(pa, bottomRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pa,pageHandle), 3, ATMO_ABILITY(pa, topLeftButtonPressed));\n    ATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(pa,pageHandle), 4, ATMO_ABILITY(pa, bottomLeftButtonPressed));\n    \n\tif(!config.hidden)\n\t{\n\t\tATMO_UI_STATICTEXT_RegisterOnDisplayedAbilityHandle(ATMO_VARIABLE(pa,pageHandle), ATMO_ABILITY(pa, onDisplayed));\n\t}\n    return ATMO_Status_Success;\n    "
            },
            "variables": {
              "pageHandle": {
                "type": "ATMO_DriverInstanceHandle_t"
              }
            },
            "embeddedPropertyConversions": {
              "pageTitle": "string",
              "topRightButtonLabel": "string",
              "bottomRightButtonLabel": "string",
              "topLeftButtonLabel": "string",
              "bottomLeftButtonLabel": "string",
              "text": "string"
            },
            "codeUserChanged": {
              "displayPage": false,
              "topRightButtonPressed": false,
              "bottomRightButtonPressed": false,
              "topLeftButtonPressed": false,
              "bottomLeftButtonPressed": false,
              "onDisplayed": false,
              "setText": false,
              "setup": false
            },
            "textColor": "GUI_GREEN",
            "pageTitle": "Section 3",
            "titleHidden": false,
            "pageHidden": false,
            "topRightButtonLabel": "",
            "topRightButtonEnabled": false,
            "bottomRightButtonLabel": "",
            "bottomRightButtonEnabled": false,
            "topLeftButtonLabel": "",
            "topLeftButtonEnabled": false,
            "bottomLeftButtonLabel": "",
            "bottomLeftButtonEnabled": false,
            "x": "3",
            "y": "1",
            "spanX": 1,
            "spanY": 1,
            "text": "0",
            "fontSize": "ATMO_FONT_SIZE_32PT",
            "horizontalAlignment": "GUI_TA_HCENTER"
          },
          "meta": {
            "editorX": 247.33349609375,
            "editorY": 296,
            "lastTrigger": "onDisplayed"
          },
          "triggers": {
            "triggered": [],
            "topRightButtonPressed": [],
            "bottomRightButtonPressed": [],
            "topLeftButtonPressed": [],
            "bottomLeftButtonPressed": [],
            "onDisplayed": []
          },
          "interruptAbilities": {
            "trigger": false,
            "displayPage": false,
            "topRightButtonPressed": false,
            "bottomRightButtonPressed": false,
            "topLeftButtonPressed": false,
            "bottomLeftButtonPressed": false,
            "onDisplayed": false,
            "setText": false,
            "setup": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "displayPage",
              "triggers": []
            },
            {
              "name": "topRightButtonPressed",
              "triggers": [
                "topRightButtonPressed"
              ]
            },
            {
              "name": "bottomRightButtonPressed",
              "triggers": [
                "bottomRightButtonPressed"
              ]
            },
            {
              "name": "topLeftButtonPressed",
              "triggers": [
                "topLeftButtonPressed"
              ]
            },
            {
              "name": "bottomLeftButtonPressed",
              "triggers": [
                "bottomLeftButtonPressed"
              ]
            },
            {
              "name": "onDisplayed",
              "triggers": [
                "onDisplayed"
              ]
            },
            {
              "name": "setText",
              "triggers": []
            },
            {
              "name": "setup",
              "triggers": []
            }
          ]
        },
        {
          "name": "homePage",
          "type": "EmbeddedStaticTextDisplay",
          "variants": [
            "embedded",
            "triggers",
            "abilities",
            "properties",
            "variables",
            "rpk"
          ],
          "properties": {
            "errorData": {},
            "code": {
              "trigger": "\treturn ATMO_Status_Success;",
              "displayPage": "\n\tATMO_UI_Page_DisplayPageByCoord(ATMO_PROPERTY(homePage, x), ATMO_PROPERTY(homePage, y), false);\n\treturn ATMO_Status_Success;\n\t",
              "topRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomRightButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "topLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "bottomLeftButtonPressed": "\n\treturn ATMO_Status_Success;\n\t",
              "onDisplayed": "\n\treturn ATMO_Status_Success;\n    ",
              "setText": "\n    ATMO_Value_t strVal;\n    ATMO_InitValue(&strVal);\n    ATMO_CreateValueConverted(&strVal, ATMO_DATATYPE_STRING, in);\n    ATMO_UI_STATICTEXT_SetText(ATMO_VARIABLE(homePage,pageHandle), strVal.data);\n    ATMO_FreeValue(&strVal);\n\treturn ATMO_Status_Success;\n\t",
              "setup": "\n    ATMO_UI_PAGE_Config_t config;\n\tconfig.hidden = ATMO_PROPERTY(homePage, pageHidden);\n\tconfig.textColor = ATMO_PROPERTY(homePage, textColor);\n\tconfig.activeButtons = ATMO_UI_Page_GetButtonMask(ATMO_PROPERTY(homePage, topRightButtonEnabled),\n\t\tATMO_PROPERTY(homePage,bottomRightButtonEnabled), ATMO_PROPERTY(homePage, topLeftButtonEnabled), ATMO_PROPERTY(homePage, bottomLeftButtonEnabled));\n    config.x = ATMO_PROPERTY(homePage, x);\n\tconfig.y = ATMO_PROPERTY(homePage, y);\n\tstrncpy(config.topLeftButtonLabel, ATMO_PROPERTY(homePage, topLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.topRightButtonLabel, ATMO_PROPERTY(homePage, topRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomLeftButtonLabel, ATMO_PROPERTY(homePage, bottomLeftButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n\tstrncpy(config.bottomRightButtonLabel, ATMO_PROPERTY(homePage, bottomRightButtonLabel), ATMO_BUTTON_LABEL_MAXLEN);\n    config.spanX = ATMO_PROPERTY(homePage, spanX);\n\tconfig.spanY = ATMO_PROPERTY(homePage, spanY);\n    config.title = ATMO_PROPERTY(homePage, pageTitle);\n    config.titleHidden = ATMO_PROPERTY(homePage, titleHidden);\n\tATMO_UI_STATICTEXT_Init(&config);\n\tATMO_VARIABLE(homePage, pageHandle) = config.templateInstance;\n    ATMO_UI_STATICTEXT_SetText(config.templateInstance, ATMO_PROPERTY(homePage, text));\n\tATMO_UI_STATICTEXT_SetTextSize(config.templateInstance, ATMO_PROPERTY(homePage, fontSize));\n\tATMO_UI_STATICTEXT_SetAlignment(config.templateInstance, ATMO_PROPERTY(homePage, horizontalAlignment));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(homePage,pageHandle), 1, ATMO_ABILITY(homePage, topRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(homePage,pageHandle), 2, ATMO_ABILITY(homePage, bottomRightButtonPressed));\n\tATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(homePage,pageHandle), 3, ATMO_ABILITY(homePage, topLeftButtonPressed));\n    ATMO_UI_STATICTEXT_RegisterButtonAbilityHandle(ATMO_VARIABLE(homePage,pageHandle), 4, ATMO_ABILITY(homePage, bottomLeftButtonPressed));\n    \n\tif(!config.hidden)\n\t{\n\t\tATMO_UI_STATICTEXT_RegisterOnDisplayedAbilityHandle(ATMO_VARIABLE(homePage,pageHandle), ATMO_ABILITY(homePage, onDisplayed));\n\t}\n    return ATMO_Status_Success;\n    "
            },
            "variables": {
              "pageHandle": {
                "type": "ATMO_DriverInstanceHandle_t"
              }
            },
            "embeddedPropertyConversions": {
              "pageTitle": "string",
              "topRightButtonLabel": "string",
              "bottomRightButtonLabel": "string",
              "topLeftButtonLabel": "string",
              "bottomLeftButtonLabel": "string",
              "text": "string"
            },
            "codeUserChanged": {
              "displayPage": false,
              "topRightButtonPressed": false,
              "bottomRightButtonPressed": false,
              "topLeftButtonPressed": false,
              "bottomLeftButtonPressed": false,
              "onDisplayed": false,
              "setText": false,
              "setup": false
            },
            "textColor": "GUI_BLUE",
            "pageTitle": "2019 - Work",
            "titleHidden": false,
            "pageHidden": false,
            "topRightButtonLabel": "",
            "topRightButtonEnabled": false,
            "bottomRightButtonLabel": "",
            "bottomRightButtonEnabled": false,
            "topLeftButtonLabel": "",
            "topLeftButtonEnabled": false,
            "bottomLeftButtonLabel": "",
            "bottomLeftButtonEnabled": false,
            "x": 0,
            "y": 0,
            "spanX": "6",
            "spanY": 1,
            "text": "waiting...",
            "fontSize": "ATMO_FONT_SIZE_16PT",
            "horizontalAlignment": "GUI_TA_HCENTER"
          },
          "meta": {
            "editorX": 952.33349609375,
            "editorY": 0,
            "lastTrigger": "onDisplayed"
          },
          "triggers": {
            "triggered": [],
            "topRightButtonPressed": [],
            "bottomRightButtonPressed": [],
            "topLeftButtonPressed": [],
            "bottomLeftButtonPressed": [],
            "onDisplayed": []
          },
          "interruptAbilities": {
            "trigger": false,
            "displayPage": false,
            "topRightButtonPressed": false,
            "bottomRightButtonPressed": false,
            "topLeftButtonPressed": false,
            "bottomLeftButtonPressed": false,
            "onDisplayed": false,
            "setText": false,
            "setup": false
          },
          "abilities": [
            {
              "name": "trigger",
              "triggers": [
                "triggered"
              ]
            },
            {
              "name": "displayPage",
              "triggers": []
            },
            {
              "name": "topRightButtonPressed",
              "triggers": [
                "topRightButtonPressed"
              ]
            },
            {
              "name": "bottomRightButtonPressed",
              "triggers": [
                "bottomRightButtonPressed"
              ]
            },
            {
              "name": "topLeftButtonPressed",
              "triggers": [
                "topLeftButtonPressed"
              ]
            },
            {
              "name": "bottomLeftButtonPressed",
              "triggers": [
                "bottomLeftButtonPressed"
              ]
            },
            {
              "name": "onDisplayed",
              "triggers": [
                "onDisplayed"
              ]
            },
            {
              "name": "setText",
              "triggers": []
            },
            {
              "name": "setup",
              "triggers": []
            }
...

This file has been truncated, please download it to see its full contents.

Credits

Andrei Florian

Andrei Florian

8 projects • 73 followers
I am a 15 year old student. Love creating and innovating. “Still working on that future”
Thanks to NXP Community and Ioan Florian.

Comments