configured for beyondtek displays
Fork of FT800_3 by
Revision 10:39d32e09742d, committed 2016-08-15
- Comitter:
- cpm219
- Date:
- Mon Aug 15 15:32:32 2016 +0000
- Parent:
- 9:567b41b360f2
- Commit message:
- no change
Changed in this revision
--- a/FT_Gpu_Hal.h Thu Jul 21 14:23:25 2016 +0000 +++ b/FT_Gpu_Hal.h Mon Aug 15 15:32:32 2016 +0000 @@ -1,6 +1,11 @@ /*! * \file FT_GPU_HAL.h * + + Curt added Load_raw 7/22/16 + + + * \author FTDI * \date 2013.04.24 * @@ -255,6 +260,10 @@ ft_void_t Sound_OFF(); int Load_jpg(char* filename, ft_int16_t* x_size, ft_int16_t* y_size,ft_uint32_t address); + + //Curt added Load_raw 7/22/16 + int Load_raw(char* filename); + ft_void_t Calibrate(); ft_void_t read_calibrate(ft_uint8_t data[24]); ft_void_t write_calibrate(ft_uint8_t data[24]);
--- a/FT_Hal_Utils.cpp Thu Jul 21 14:23:25 2016 +0000 +++ b/FT_Hal_Utils.cpp Mon Aug 15 15:32:32 2016 +0000 @@ -1,5 +1,6 @@ #include "FT_Platform.h" #include "mbed.h" +#include "SDFileSystem.h" /* function to load jpg file from filesystem */ /* return 0 if jpg is ok */ @@ -13,7 +14,7 @@ unsigned char data[4]; ft_uint16_t blocklen; - +// sd.mount(); FILE *fp = fopen(filename, "r"); if(fp == NULL) return (-1); // connot open file @@ -54,10 +55,45 @@ WrCmdBuf(pbuff, blocklen); //alignment is already taken care by this api } fclose(fp); +// sd.unmount(); return(0); } +//int FT800::Load_raw(char* filename) +//{ +// ft_uint8_t imbuff[8192]; +// ft_uint16_t filesize; +// ft_uint16_t blocklen; +//// ft_uint16_t ram_start = 0x00; +// +//// sd.mount(); +// FILE *fp = fopen(filename, "rb"); // open file +//// if(fp == NULL) return (-1); // connot open file +// fseek(fp, 0, SEEK_END); // set file position to end of file +// filesize= ftell(fp); // determine file size +// fseek(fp, 2, SEEK_SET); // return to beginning of file +// +// while(filesize > 0) +// { +// //copy the .raw file data to imbuff[8192] in 8k block +// blocklen = filesize>8192?8192:filesize; +// fread(imbuff,1,blocklen,fp); +// filesize-= blocklen; +// //write imbuff contents to graphics RAM at address ram_start = 0x00 +// WrCmdBuf(imbuff, blocklen); //alignment is already taken care by this api +//// ram_start += 8192; +// } +// fclose(fp); +//// sd.unmount(); +// +// return 0; +//} + + + + + /* calibrate touch */ ft_void_t FT800::Calibrate()
--- a/FT_LCD_Type.h Thu Jul 21 14:23:25 2016 +0000 +++ b/FT_LCD_Type.h Mon Aug 15 15:32:32 2016 +0000 @@ -17,6 +17,9 @@ #ifdef beyondtek +//added by curt +#define my_rotate 0x00 + #define my_DispWidth 800 #define my_DispHeight 480 #define my_DispHCycle 862 @@ -33,6 +36,9 @@ #else +//added by curt +#define my_rotate 0x01 + #define my_DispWidth 800 #define my_DispHeight 480 #define my_DispHCycle 1056