Simple integer calculator using FRDM-KL25Z and Adafruit 2.8" TFT with touch \\ "Dentaku" means "Desktop Calculator" in Japanese \\ On 5-Dec-2015, Support for FRDM-K64F, FRDM-K22F, NUCLEO-F411RE added.

Dependencies:   SPI_STMPE610 UniGraphic mbed vt100

Yet another simple desktop calculator program, only for integer.
As usual I used FRDM-KL25Z, Adafruit 2.8" TFT with touch and UniGraphic library.
Now works with FRDM-K64F, FRDM-K22F, and NUCLEO-F411RE.

整数計算のみの簡単な電卓プログラムです。
例によって、FRDM-KL25Z, Adafruit 2.8" TFT with touch, そして UniGraphic を使用しています。
FRDM-K64F, FRDM-K22F, NUCLEO-F411RE でも動くようになりました。

/media/uploads/Rhyme/img_1194.jpg

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Mon Mar 13 00:50:32 2017 +0000
Parent:
2:ddf8d8fffb4f
Child:
4:d4c937bcc469
Commit message:
Support of MAX32600MBED is under construction

Changed in this revision

UniGraphic.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/UniGraphic.lib	Sat Dec 05 10:24:21 2015 +0000
+++ b/UniGraphic.lib	Mon Mar 13 00:50:32 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/GraphicsDisplay/code/UniGraphic/#87855d03d91a
+http://mbed.org/teams/GraphicsDisplay/code/UniGraphic/#f87f06292637
--- a/main.cpp	Sat Dec 05 10:24:21 2015 +0000
+++ b/main.cpp	Mon Mar 13 00:50:32 2017 +0000
@@ -22,7 +22,12 @@
 #include "menu.h"
 #include "main.h"
 
+#if defined (TARGET_MAX32600MBED)
+vt100 tty(57600) ;
+#else
 vt100 tty ;
+#endif 
+
 DigitalOut tsc_cs(PIN_CS_TSC, 1) ;
 DigitalOut backlight(PIN_BL_TFT, 0) ;
 ILI9341 TFT(SPI_8, 10000000, 
--- a/main.h	Sat Dec 05 10:24:21 2015 +0000
+++ b/main.h	Mon Mar 13 00:50:32 2017 +0000
@@ -99,6 +99,40 @@
 #define PIN_ADC_CH0     PTC0
 #define PIN_ADC_CH1     PTD6
 
+#elif defined (TARGET_MAX32600MBED)
+/* I2C */
+#define PIN_SCL  P2_7
+#define PIN_SDA  P2_6
+/* SPI */
+#define PIN_SCLK  P2_0
+#define PIN_MISO P2_2
+#define PIN_MOSI P2_1
+#define PIN_CS0  P2_3
+/* Interrupt */
+#define PIN_INT0 P2_4
+#define PIN_INT1 P2_5
+#define PIN_INT2 P1_7
+#define PIN_INT3 P1_6
+#define PIN_INT4 P1_5
+#define PIN_INT5 P1_4
+/* Analog In */
+#define PIN_AN0  AIN_0P
+#define PIN_AN1  AIN_1P
+#define PIN_AN2  AIN_2P
+#define PIN_AN3  AIN_3P
+#define PIN_AN4  AIN_4P
+#define PIN_AN5  AIN_5P
+#define BOARD_NAME "MAX32600MBED"
+
+#define PIN_CS_TFT      P2_3 // D10 PTD0 
+#define PIN_DC_TFT      P2_4 // D9  PTD5 
+#define PIN_CS_TSC      P2_5 // D8  PTA13
+#define PIN_BL_TFT      P1_7 // D7   PTC9 
+#define PIN_CS_SD       P1_4 // D4   PTA4 
+#define PIN_TSC_INTR    P5_4 // PTC9 /* place holder */
+#define PIN_RESET_TFT   P5_5 /// PTB10 /* place holder */
+#define PIN_ADC_CH0     AIN_0P // A0 PTB0
+#define PIN_ADC_CH1     AIN_2P // A2 PTB2
 #else
  #error TARGET NOT DEFINED
 #define PIN_SCLK        D13 
--- a/mbed.bld	Sat Dec 05 10:24:21 2015 +0000
+++ b/mbed.bld	Mon Mar 13 00:50:32 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90
\ No newline at end of file