apps/display-demo/app_calc.c File Reference

Display demo calc application. More...

#include <led.h>
#include <board.h>
#include <string.h>
#include <gfx/gfx.h>
#include <gfx/win.h>
#include <gfx/wtk.h>
#include <gfx/sysfont.h>
#include <membag.h>
#include <debug.h>
#include <stream.h>
#include <mainloop.h>
#include "app_desktop.h"
#include "app_calc.h"

Go to the source code of this file.

Data Structures

struct  calc_context
 Calculator application context. More...

Defines

Keypad configuration

#define POS_X   10
 Start position for keypad.
#define POS_Y   50
 Start position for keypad.
#define SIZE_X   45
 Size of each key.
#define SIZE_Y   35
 Size of each key.
#define SPACE_X   (SIZE_X + 10)
 Size of each key including space to next key.
#define SPACE_Y   (SIZE_Y + 10)
 Size of each key including space to next key.
#define KEYS_PR_ROW   4
 Number of keys pr row.
Calculator display configuration

#define MAX_VALUE   999999
 Max value to display.
#define MAX_DIGITS   (10+1)
 Max digits needed to store display value and terminating null byte.

Enumerations

enum  command_id {
  RADIO_DEC_ID = 123, RADIO_HEX_ID, BUTTON_EXIT_ID, DUMMY_ID,
  SLIDER_ID, CHECK_BOX_ID, RADIO_BUTTON_1_ID, RADIO_BUTTON_2_ID,
  BUTTON_QUIT_ID
}
enum  calc_mode { CALC_DEC, CALC_HEX }
 

The calculator modes.

More...

Functions

static void calc_update_display (struct calc_context *calc)
 Update calculator display.
static bool calc_frame_command_handler (struct wtk_basic_frame *frame, win_command_t command_data)
 Frame handler for calculator.
void app_calc_launch (struct workqueue_task *task)
 Start calculator app.

Detailed Description

Display demo calc application.

Copyright (C) 2009 Atmel Corporation. All rights reserved.

Definition in file app_calc.c.

Generated on Thu Apr 29 14:09:58 2010 for display-demo by  doxygen 1.6.3