test
Dependencies: ad5422_arduino mbed LT1446 ADS1248-1 LM35-1 Flash FT813 PGA280_ADS1259
Diff: TFT/display.Calibration.cpp
- Revision:
- 3:d4b106bf3a32
- Child:
- 7:c364201bc3ed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TFT/display.Calibration.cpp Sat Aug 08 18:32:53 2020 +0000 @@ -0,0 +1,21 @@ +#include "display.h" + +/************************************************************************************************************************** +************************** Put calibration data to FT800 ****************************************************************** +**************************************************************************************************************************/ +void Display::Calibration(char * calibration,char re) +{ + if(calibration[0]==0xFF||(re>0)){ + (*_TFT).Calibrate();//Калибровка дисплея + for (int i = 0; i < 24; i++) + //запись в буфер памяти + { + calibration[i]=(*_TFT).Rd8(REG_TOUCH_TRANSFORM_A + i); + }; + } + else{ + //char calibration[25] = {98, 99, 0, 0, 182, 254, 255, 255, 245, 142, 248, 255, 117, 254, 255, 255, 34, 98, 0, 0, 123, 154, 248, 255}; + for (int i = 0; i < 24; i++) { + (*_TFT).Wr8(REG_TOUCH_TRANSFORM_A + i, calibration[i]);} + } +} \ No newline at end of file