Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: FT800_RGB_demo FT800_RGB_demo2 FT800_demo_for_habr Temp_&_RH_at_TFT-demo ... more
Fork of FT800 by
Revision 6:16e22c789f7d, committed 2015-02-10
- Comitter:
- dreschpe
- Date:
- Tue Feb 10 23:32:22 2015 +0000
- Parent:
- 5:c0ffdb08b8a5
- Commit message:
- Add function to read/write touch calibration data.; Add color names ; Add a patch from Ivano Pelicella to draw flat buttons
Changed in this revision
--- a/FT_CoPro_Cmds.cpp Thu Sep 25 20:32:21 2014 +0000 +++ b/FT_CoPro_Cmds.cpp Tue Feb 10 23:32:22 2015 +0000 @@ -219,7 +219,7 @@ SendCmd( CMD_BUTTON); SendCmd( (((ft_uint32_t)y<<16)|(x & 0xffff))); SendCmd( (((ft_uint32_t)h<<16)|w)); - SendCmd( (((ft_uint32_t)y<<16)|font)); + SendCmd( (((ft_uint32_t)options<<16)|font)); // patch from Ivano Pelicella to draw flat buttons SendStr( s); EndFunc( (FT_CMD_SIZE*4 + strlen(s) + 1)); }
--- a/FT_Gpu_Hal.cpp Thu Sep 25 20:32:21 2014 +0000
+++ b/FT_Gpu_Hal.cpp Tue Feb 10 23:32:22 2015 +0000
@@ -23,7 +23,7 @@
_f800_isr(InterruptIn(intr))
{
_spi.format(8,0); // 8 bit spi mode 0
- _spi.frequency(4000000); // start with 10 Mhz SPI clock
+ _spi.frequency(2000000); // start with 10 Mhz SPI clock
_ss = 1; // cs high
_pd = 1; // PD high
Bootup();
--- a/FT_Gpu_Hal.h Thu Sep 25 20:32:21 2014 +0000 +++ b/FT_Gpu_Hal.h Tue Feb 10 23:32:22 2015 +0000 @@ -256,6 +256,11 @@ int Load_jpg(char* filename, ft_int16_t* x_size, ft_int16_t* y_size); ft_void_t Calibrate(); + ft_void_t read_calibrate(ft_uint8_t data[24]); + ft_void_t write_calibrate(ft_uint8_t data[24]); + + ft_uint32_t color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue); + ft_uint32_t clear_color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue); }; // end of class
--- a/FT_Hal_Utils.cpp Thu Sep 25 20:32:21 2014 +0000
+++ b/FT_Hal_Utils.cpp Tue Feb 10 23:32:22 2015 +0000
@@ -108,3 +108,25 @@
Wr8(REG_PWM_DUTY,i);
}
+ft_void_t FT800::read_calibrate(ft_uint8_t data[24]){
+ unsigned int i;
+ for(i=0;i<24;i++){
+ data[i] = Rd8(REG_TOUCH_TRANSFORM_A + i);
+ }
+}
+
+ft_void_t FT800::write_calibrate(ft_uint8_t data[24]){
+ unsigned int i;
+ for(i=0;i<24;i++) {
+ Wr8(REG_TOUCH_TRANSFORM_A + i,data[i]);
+ }
+}
+
+ft_uint32_t FT800::color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue){
+ return ((4UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0));
+ }
+
+ft_uint32_t FT800::clear_color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue){
+ return ((2UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0));
+ }
+
\ No newline at end of file
--- a/FT_Platform.h Thu Sep 25 20:32:21 2014 +0000 +++ b/FT_Platform.h Tue Feb 10 23:32:22 2015 +0000 @@ -10,6 +10,7 @@ #include "FT_Gpu_Hal.h" #include "FT_Gpu.h" #include "FT_LCD_Type.h" +#include "FT_color.h" #endif /*_FT_PLATFORM_H_*/ /* Nothing beyond this*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FT_color.h Tue Feb 10 23:32:22 2015 +0000 @@ -0,0 +1,38 @@ +// color definitions for FT800 controler + +#define Red 255,0,0 +#define Pink 255,192,203 +#define DarkRed 139,0,0 +#define OrangeRed 255,69,0 +#define Orange 255,165,0 +#define Gold 255,215,ß +#define Yellow 255,255,0 +#define LightYellow 255,255,224 +#define Magenta 255,0,255 +#define Indigo 75,0,130 +#define SlateBlue 106,90,205 +#define Blue 0,0,255 +#define DarkBlue 0,0,139 +#define SkyBlue 135,206,235 +#define LightBlue 173,216,230 +#define White 255,255,255 +#define Black 0,0,0 +#define Gray 128,128,128 +#define DarkGray 169,169,169 +#define Silver 192,192,192 +#define Brown 165,42,42 +#define Green 0,128,0 +#define DarkGreen 0,100,0 +#define YellowGreen 154,205,50 +#define Olive 128,128,0 +#define Lime 0,255,0 +#define Purple 128,0,128 +#define Tomato 255,99,71 +#define Violet 235,130,238 +#define Plum 221,160,221 +#define GreenYellow 173,255,47 +#define Cyan 0,255,255 +#define Aquamarine 127,255,212 +#define LightGray 211,211,211 + +

EVE FT800
ADAM