Demo for Embedded World 2015.

Dependencies:   DMBasicGUI DMSupport

Demo running on several LPC4088 Display Modules on the Embedded World 2015 exhibition.

Information

To run the demo first drag-n-drop the to_sync.fs3 file to the MBED drive and then drag-n-drop the demo itself. This way both the file system and software are up to date.

This is what the launcher will look like:

/media/uploads/embeddedartists/ew2015_cap_000.png /media/uploads/embeddedartists/ew2015_cap_002.png /media/uploads/embeddedartists/ew2015_cap_003.png /media/uploads/embeddedartists/ew2015_cap_004.png /media/uploads/embeddedartists/ew2015_cap_005.png /media/uploads/embeddedartists/ew2015_cap_006.png

AppNetworkSettings.h

Committer:
embeddedartists
Date:
14 months ago
Revision:
1:1a01ef434a72
Parent:
0:6bd24cbb88a1

File content as of revision 1:1a01ef434a72:

/*
 *  Copyright 2014 Embedded Artists AB
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
 
#ifndef APP_NETWORK_SETTINGS_H
#define APP_NETWORK_SETTINGS_H

#include "App.h"
#include "DMBoard.h"
#include "lpc_swim.h"
#include "Button.h"
#include "ImageButton.h"
#include "DigitButton.h"

/**
 * An App example. Allows changing IP Address, Netmask and Gateway.
 *
 * The purpose of this example is to show some of the graphics primitives in
 * the SWIM library.
 */
class AppNetworkSettings : public App {
public:

	AppNetworkSettings();
	virtual ~AppNetworkSettings();

    virtual bool setup();
    virtual void runToCompletion();
    virtual bool teardown();

    void modifyValue(int mod);
    void changeActiveField(bool next);
    void setActiveField(uint32_t newField);

private:
    enum Buttons {
      ButtonIp0,
      ButtonIp1,
      ButtonIp2,
      ButtonIp3,
      ButtonMask0,
      ButtonMask1,
      ButtonMask2,
      ButtonMask3,
      ButtonGw0,
      ButtonGw1,
      ButtonGw2,
      ButtonGw3,
      ButtonOk,
      ButtonCancel,
      ButtonUp,
      ButtonDown,
      ButtonLeft,
      ButtonRight,
      NumButtons,
      NumFields = ButtonOk,
    };

    Display* _disp;
    SWIM_WINDOW_T* _win;
    void* _fb;

    Clickable* _buttons[NumButtons];
    
    uint32_t _activeField;
    uint32_t _values[NumFields];
    
    Image::ImageData_t _digitImage;

    void draw();
    void markField(int field, bool active);
    void addIPField(int y, int idx, const char* lbl);
};

#endif