808
Dependents: Chromatograph_Mobile
inc/FT_Gpu_Hal.h@12:f0980f7a75ae, 2020-08-08 (annotated)
- Committer:
- nikmaos
- Date:
- Sat Aug 08 18:30:58 2020 +0000
- Revision:
- 12:f0980f7a75ae
- Parent:
- 10:6a81aeca25e3
- Child:
- 13:5959af2ac87a
808
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cpm219 | 0:2d0ef4830603 | 1 | /*! |
cpm219 | 0:2d0ef4830603 | 2 | * \file FT_GPU_HAL.h |
cpm219 | 0:2d0ef4830603 | 3 | * |
cpm219 | 0:2d0ef4830603 | 4 | |
cpm219 | 0:2d0ef4830603 | 5 | Curt added Load_raw 7/22/16 |
cpm219 | 0:2d0ef4830603 | 6 | |
cpm219 | 0:2d0ef4830603 | 7 | |
cpm219 | 0:2d0ef4830603 | 8 | |
cpm219 | 0:2d0ef4830603 | 9 | * \author FTDI |
cpm219 | 0:2d0ef4830603 | 10 | * \date 2013.04.24 |
cpm219 | 0:2d0ef4830603 | 11 | * |
cpm219 | 0:2d0ef4830603 | 12 | * Copyright 2013 Future Technology Devices International Limited |
cpm219 | 0:2d0ef4830603 | 13 | * |
JackB | 10:6a81aeca25e3 | 14 | * Project: FT813 or EVE compatible silicon |
cpm219 | 0:2d0ef4830603 | 15 | * File Description: |
JackB | 10:6a81aeca25e3 | 16 | * This file defines the generic APIs of host access layer for the FT813 or EVE compatible silicon. |
JackB | 10:6a81aeca25e3 | 17 | * Application shall access FT813 or EVE resources over these APIs. In addition, there are |
JackB | 10:6a81aeca25e3 | 18 | * some helper functions defined for FT813 coprocessor engine as well as host commands. |
cpm219 | 0:2d0ef4830603 | 19 | * Rivision History: |
cpm219 | 0:2d0ef4830603 | 20 | * ported to mbed by Peter Drescher, DC2PD 2014 |
cpm219 | 0:2d0ef4830603 | 21 | * |
cpm219 | 0:2d0ef4830603 | 22 | */ |
cpm219 | 0:2d0ef4830603 | 23 | |
cpm219 | 0:2d0ef4830603 | 24 | #ifndef FT_GPU_HAL_H |
cpm219 | 0:2d0ef4830603 | 25 | #define FT_GPU_HAL_H |
cpm219 | 0:2d0ef4830603 | 26 | |
cpm219 | 0:2d0ef4830603 | 27 | #include "mbed.h" |
cpm219 | 0:2d0ef4830603 | 28 | #include "FT_DataTypes.h" |
cpm219 | 0:2d0ef4830603 | 29 | |
cpm219 | 0:2d0ef4830603 | 30 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 31 | FT_GPU_I2C_MODE = 0, |
cpm219 | 0:2d0ef4830603 | 32 | FT_GPU_SPI_MODE, |
cpm219 | 0:2d0ef4830603 | 33 | |
cpm219 | 0:2d0ef4830603 | 34 | FT_GPU_MODE_COUNT, |
cpm219 | 0:2d0ef4830603 | 35 | FT_GPU_MODE_UNKNOWN = FT_GPU_MODE_COUNT |
cpm219 | 0:2d0ef4830603 | 36 | } FT_GPU_HAL_MODE_E; |
cpm219 | 0:2d0ef4830603 | 37 | |
cpm219 | 0:2d0ef4830603 | 38 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 39 | OPENED, |
cpm219 | 0:2d0ef4830603 | 40 | READING, |
cpm219 | 0:2d0ef4830603 | 41 | WRITING, |
cpm219 | 0:2d0ef4830603 | 42 | CLOSED, |
cpm219 | 0:2d0ef4830603 | 43 | STATUS_COUNT, |
cpm219 | 0:2d0ef4830603 | 44 | STATUS_ERROR = STATUS_COUNT |
cpm219 | 0:2d0ef4830603 | 45 | } FT_GPU_HAL_STATUS_E; |
cpm219 | 0:2d0ef4830603 | 46 | |
cpm219 | 0:2d0ef4830603 | 47 | typedef struct { |
cpm219 | 0:2d0ef4830603 | 48 | ft_uint8_t reserved; |
cpm219 | 0:2d0ef4830603 | 49 | } Ft_Gpu_App_Context_t; |
cpm219 | 0:2d0ef4830603 | 50 | |
cpm219 | 0:2d0ef4830603 | 51 | typedef struct { |
cpm219 | 0:2d0ef4830603 | 52 | /* Total number channels for libmpsse */ |
cpm219 | 0:2d0ef4830603 | 53 | ft_uint32_t TotalChannelNum; |
cpm219 | 0:2d0ef4830603 | 54 | } Ft_Gpu_HalInit_t; |
cpm219 | 0:2d0ef4830603 | 55 | |
cpm219 | 0:2d0ef4830603 | 56 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 57 | FT_GPU_READ = 0, |
cpm219 | 0:2d0ef4830603 | 58 | FT_GPU_WRITE, |
cpm219 | 0:2d0ef4830603 | 59 | } FT_GPU_TRANSFERDIR_T; |
cpm219 | 0:2d0ef4830603 | 60 | |
cpm219 | 0:2d0ef4830603 | 61 | |
cpm219 | 0:2d0ef4830603 | 62 | typedef struct { |
cpm219 | 0:2d0ef4830603 | 63 | ft_uint32_t length; //IN and OUT |
cpm219 | 0:2d0ef4830603 | 64 | ft_uint32_t address; |
cpm219 | 0:2d0ef4830603 | 65 | ft_uint8_t *buffer; |
cpm219 | 0:2d0ef4830603 | 66 | } Ft_Gpu_App_Transfer_t; |
JackB | 10:6a81aeca25e3 | 67 | |
JackB | 10:6a81aeca25e3 | 68 | typedef struct { |
JackB | 10:6a81aeca25e3 | 69 | char name[50]; |
JackB | 10:6a81aeca25e3 | 70 | uint32_t addr; |
JackB | 10:6a81aeca25e3 | 71 | uint32_t size; |
JackB | 10:6a81aeca25e3 | 72 | uint16_t fmt; |
JackB | 10:6a81aeca25e3 | 73 | uint16_t w; |
JackB | 10:6a81aeca25e3 | 74 | uint16_t h; |
JackB | 10:6a81aeca25e3 | 75 | } Ft_Gpu_App_Bitmap_t; |
JackB | 10:6a81aeca25e3 | 76 | |
JackB | 10:6a81aeca25e3 | 77 | class FT813 |
cpm219 | 0:2d0ef4830603 | 78 | { |
cpm219 | 0:2d0ef4830603 | 79 | public: |
JackB | 10:6a81aeca25e3 | 80 | FT813(PinName mosi, |
cpm219 | 0:2d0ef4830603 | 81 | PinName miso, |
cpm219 | 0:2d0ef4830603 | 82 | PinName sck, |
cpm219 | 0:2d0ef4830603 | 83 | PinName ss, |
cpm219 | 0:2d0ef4830603 | 84 | PinName intr, |
cpm219 | 0:2d0ef4830603 | 85 | PinName pd); |
cpm219 | 0:2d0ef4830603 | 86 | |
cpm219 | 0:2d0ef4830603 | 87 | private: |
cpm219 | 0:2d0ef4830603 | 88 | SPI _spi; |
cpm219 | 0:2d0ef4830603 | 89 | DigitalOut _ss; |
cpm219 | 0:2d0ef4830603 | 90 | DigitalOut _pd; |
cpm219 | 0:2d0ef4830603 | 91 | InterruptIn _f800_isr; |
nikmaos | 12:f0980f7a75ae | 92 | ft_uint8_t _IsOn; //дисплей включен |
JackB | 10:6a81aeca25e3 | 93 | ft_uint16_t _count; |
JackB | 10:6a81aeca25e3 | 94 | ft_uint32_t _address; |
JackB | 10:6a81aeca25e3 | 95 | ft_uint32_t _addresses[64]; |
JackB | 10:6a81aeca25e3 | 96 | ft_uint16_t _bitmap_count; |
JackB | 10:6a81aeca25e3 | 97 | ft_uint32_t _orientation; |
JackB | 10:6a81aeca25e3 | 98 | ft_uint16_t _bitmapCount; |
JackB | 10:6a81aeca25e3 | 99 | ft_uint32_t _bitmapAddress; |
JackB | 10:6a81aeca25e3 | 100 | |
JackB | 10:6a81aeca25e3 | 101 | Ft_Gpu_App_Bitmap_t _bitmaps[64]; |
JackB | 10:6a81aeca25e3 | 102 | |
JackB | 10:6a81aeca25e3 | 103 | //uint32_t screenshot[800*480]; |
JackB | 10:6a81aeca25e3 | 104 | |
JackB | 10:6a81aeca25e3 | 105 | |
cpm219 | 0:2d0ef4830603 | 106 | public: |
cpm219 | 0:2d0ef4830603 | 107 | /* Global used for buffer optimization */ |
cpm219 | 0:2d0ef4830603 | 108 | //Ft_Gpu_Hal_Context_t host,*phost; |
cpm219 | 0:2d0ef4830603 | 109 | Ft_Gpu_App_Context_t app_header; |
cpm219 | 0:2d0ef4830603 | 110 | ft_uint16_t cmd_fifo_wp; //coprocessor fifo write pointer |
cpm219 | 0:2d0ef4830603 | 111 | ft_uint16_t dl_buff_wp; //display command memory write pointer |
cpm219 | 0:2d0ef4830603 | 112 | FT_GPU_HAL_STATUS_E status; //OUT |
cpm219 | 0:2d0ef4830603 | 113 | ft_void_t* hal_handle; //IN/OUT |
cpm219 | 0:2d0ef4830603 | 114 | ft_uint32_t CmdBuffer_Index; |
cpm219 | 0:2d0ef4830603 | 115 | ft_uint32_t DlBuffer_Index; |
cpm219 | 0:2d0ef4830603 | 116 | ft_int16_t DispWidth; |
cpm219 | 0:2d0ef4830603 | 117 | ft_int16_t DispHeight; |
cpm219 | 0:2d0ef4830603 | 118 | ft_int16_t DispHCycle; |
cpm219 | 0:2d0ef4830603 | 119 | ft_int16_t DispHOffset; |
cpm219 | 0:2d0ef4830603 | 120 | ft_int16_t DispHSync0; |
cpm219 | 0:2d0ef4830603 | 121 | ft_int16_t DispHSync1; |
cpm219 | 0:2d0ef4830603 | 122 | ft_int16_t DispVCycle; |
cpm219 | 0:2d0ef4830603 | 123 | ft_int16_t DispVOffset; |
cpm219 | 0:2d0ef4830603 | 124 | ft_int16_t DispVSync0; |
cpm219 | 0:2d0ef4830603 | 125 | ft_int16_t DispVSync1; |
cpm219 | 0:2d0ef4830603 | 126 | ft_uint8_t DispPCLK; |
cpm219 | 0:2d0ef4830603 | 127 | ft_char8_t DispSwizzle; |
cpm219 | 0:2d0ef4830603 | 128 | ft_char8_t DispPCLKPol; |
cpm219 | 0:2d0ef4830603 | 129 | |
cpm219 | 0:2d0ef4830603 | 130 | |
nikmaos | 12:f0980f7a75ae | 131 | char BootupConfig(void); |
cpm219 | 0:2d0ef4830603 | 132 | ft_bool_t Bootup(void); |
nikmaos | 12:f0980f7a75ae | 133 | ft_bool_t IsOn(void);//return 1 if display is on (04.08.2020/15:22) |
cpm219 | 0:2d0ef4830603 | 134 | |
cpm219 | 0:2d0ef4830603 | 135 | |
cpm219 | 0:2d0ef4830603 | 136 | /*The basic APIs Level 1*/ |
JackB | 10:6a81aeca25e3 | 137 | ft_bool_t Init(); |
JackB | 10:6a81aeca25e3 | 138 | ft_bool_t Open(); |
cpm219 | 0:2d0ef4830603 | 139 | |
cpm219 | 0:2d0ef4830603 | 140 | /*The APIs for reading/writing transfer continuously only with small buffer system*/ |
cpm219 | 0:2d0ef4830603 | 141 | ft_void_t StartTransfer(FT_GPU_TRANSFERDIR_T rw,ft_uint32_t addr); |
cpm219 | 0:2d0ef4830603 | 142 | ft_uint8_t Transfer8(ft_uint8_t value); |
cpm219 | 0:2d0ef4830603 | 143 | ft_uint16_t Transfer16(ft_uint16_t value); |
cpm219 | 0:2d0ef4830603 | 144 | ft_uint32_t Transfer32(ft_uint32_t value); |
JackB | 10:6a81aeca25e3 | 145 | ft_void_t EndTransfer(); |
cpm219 | 0:2d0ef4830603 | 146 | |
cpm219 | 0:2d0ef4830603 | 147 | /*Read & Write APIs for both burst and single transfer,depending on buffer size*/ |
cpm219 | 0:2d0ef4830603 | 148 | ft_void_t Read(Ft_Gpu_App_Transfer_t *transfer); |
cpm219 | 0:2d0ef4830603 | 149 | ft_void_t Write(Ft_Gpu_App_Transfer_t *transfer); |
cpm219 | 0:2d0ef4830603 | 150 | |
cpm219 | 0:2d0ef4830603 | 151 | ft_void_t Close(); |
cpm219 | 0:2d0ef4830603 | 152 | ft_void_t DeInit(); |
cpm219 | 0:2d0ef4830603 | 153 | |
cpm219 | 0:2d0ef4830603 | 154 | /*Helper function APIs Read*/ |
cpm219 | 0:2d0ef4830603 | 155 | ft_uint8_t Rd8(ft_uint32_t addr); |
cpm219 | 0:2d0ef4830603 | 156 | ft_uint16_t Rd16(ft_uint32_t addr); |
cpm219 | 0:2d0ef4830603 | 157 | ft_uint32_t Rd32(ft_uint32_t addr); |
cpm219 | 0:2d0ef4830603 | 158 | |
cpm219 | 0:2d0ef4830603 | 159 | /*Helper function APIs Write*/ |
cpm219 | 0:2d0ef4830603 | 160 | ft_void_t Wr8(ft_uint32_t addr, ft_uint8_t v); |
cpm219 | 0:2d0ef4830603 | 161 | ft_void_t Wr16(ft_uint32_t addr, ft_uint16_t v); |
cpm219 | 0:2d0ef4830603 | 162 | ft_void_t Wr32(ft_uint32_t addr, ft_uint32_t v); |
cpm219 | 0:2d0ef4830603 | 163 | |
cpm219 | 0:2d0ef4830603 | 164 | /*******************************************************************************/ |
cpm219 | 0:2d0ef4830603 | 165 | /*******************************************************************************/ |
cpm219 | 0:2d0ef4830603 | 166 | /*APIs for coprocessor Fifo read/write and space management*/ |
cpm219 | 0:2d0ef4830603 | 167 | ft_void_t Updatecmdfifo(ft_uint16_t count); |
cpm219 | 0:2d0ef4830603 | 168 | ft_void_t WrCmd32(ft_uint32_t cmd); |
cpm219 | 0:2d0ef4830603 | 169 | ft_void_t WrCmdBuf(ft_uint8_t *buffer,ft_uint16_t count); |
cpm219 | 0:2d0ef4830603 | 170 | ft_void_t WaitCmdfifo_empty(); |
cpm219 | 0:2d0ef4830603 | 171 | ft_void_t ResetCmdFifo(); |
cpm219 | 0:2d0ef4830603 | 172 | ft_void_t CheckCmdBuffer(ft_uint16_t count); |
cpm219 | 0:2d0ef4830603 | 173 | ft_void_t ResetDLBuffer(); |
cpm219 | 0:2d0ef4830603 | 174 | |
cpm219 | 0:2d0ef4830603 | 175 | ft_void_t StartCmdTransfer(FT_GPU_TRANSFERDIR_T rw, ft_uint16_t count); |
cpm219 | 0:2d0ef4830603 | 176 | ft_void_t Powercycle(ft_bool_t up); |
cpm219 | 0:2d0ef4830603 | 177 | |
cpm219 | 0:2d0ef4830603 | 178 | |
cpm219 | 0:2d0ef4830603 | 179 | /*******************************************************************************/ |
cpm219 | 0:2d0ef4830603 | 180 | /*******************************************************************************/ |
cpm219 | 0:2d0ef4830603 | 181 | /*APIs for Host Commands*/ |
cpm219 | 0:2d0ef4830603 | 182 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 183 | FT_GPU_INTERNAL_OSC = 0x48, //default |
cpm219 | 0:2d0ef4830603 | 184 | FT_GPU_EXTERNAL_OSC = 0x44, |
cpm219 | 0:2d0ef4830603 | 185 | } FT_GPU_PLL_SOURCE_T; |
cpm219 | 0:2d0ef4830603 | 186 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 187 | FT_GPU_PLL_48M = 0x62, //default |
cpm219 | 0:2d0ef4830603 | 188 | FT_GPU_PLL_36M = 0x61, |
cpm219 | 0:2d0ef4830603 | 189 | FT_GPU_PLL_24M = 0x64, |
cpm219 | 0:2d0ef4830603 | 190 | } FT_GPU_PLL_FREQ_T; |
cpm219 | 0:2d0ef4830603 | 191 | |
cpm219 | 0:2d0ef4830603 | 192 | typedef enum { |
cpm219 | 0:2d0ef4830603 | 193 | FT_GPU_ACTIVE_M = 0x00, |
cpm219 | 0:2d0ef4830603 | 194 | FT_GPU_STANDBY_M = 0x41,//default |
cpm219 | 0:2d0ef4830603 | 195 | FT_GPU_SLEEP_M = 0x42, |
cpm219 | 0:2d0ef4830603 | 196 | FT_GPU_POWERDOWN_M = 0x50, |
cpm219 | 0:2d0ef4830603 | 197 | } FT_GPU_POWER_MODE_T; |
cpm219 | 0:2d0ef4830603 | 198 | |
cpm219 | 0:2d0ef4830603 | 199 | #define FT_GPU_CORE_RESET (0x68) |
cpm219 | 0:2d0ef4830603 | 200 | |
cpm219 | 0:2d0ef4830603 | 201 | ft_int32_t hal_strlen(const ft_char8_t *s); |
cpm219 | 0:2d0ef4830603 | 202 | ft_void_t Sleep(ft_uint16_t ms); |
cpm219 | 0:2d0ef4830603 | 203 | ft_void_t ClockSelect(FT_GPU_PLL_SOURCE_T pllsource); |
cpm219 | 0:2d0ef4830603 | 204 | ft_void_t PLL_FreqSelect(FT_GPU_PLL_FREQ_T freq); |
cpm219 | 0:2d0ef4830603 | 205 | ft_void_t PowerModeSwitch(FT_GPU_POWER_MODE_T pwrmode); |
cpm219 | 0:2d0ef4830603 | 206 | ft_void_t CoreReset(); |
cpm219 | 0:2d0ef4830603 | 207 | //ft_void_t Ft_Gpu_Hal_StartTransfer( ,FT_GPU_TRANSFERDIR_T rw,ft_uint32_t addr); |
cpm219 | 0:2d0ef4830603 | 208 | ft_void_t WrMem(ft_uint32_t addr, const ft_uint8_t *buffer, ft_uint32_t length); |
cpm219 | 0:2d0ef4830603 | 209 | ft_void_t WrMemFromFlash(ft_uint32_t addr,const ft_prog_uchar8_t *buffer, ft_uint32_t length); |
cpm219 | 0:2d0ef4830603 | 210 | ft_void_t WrCmdBufFromFlash(FT_PROGMEM ft_prog_uchar8_t *buffer,ft_uint16_t count); |
cpm219 | 0:2d0ef4830603 | 211 | ft_void_t RdMem(ft_uint32_t addr, ft_uint8_t *buffer, ft_uint32_t length); |
cpm219 | 0:2d0ef4830603 | 212 | ft_void_t WaitLogo_Finish(); |
cpm219 | 0:2d0ef4830603 | 213 | ft_uint8_t TransferString(const ft_char8_t *string); |
cpm219 | 0:2d0ef4830603 | 214 | ft_void_t HostCommand(ft_uint8_t cmd); |
cpm219 | 0:2d0ef4830603 | 215 | ft_int32_t Dec2Ascii(ft_char8_t *pSrc,ft_int32_t value); |
cpm219 | 0:2d0ef4830603 | 216 | |
JackB | 10:6a81aeca25e3 | 217 | |
JackB | 10:6a81aeca25e3 | 218 | ft_void_t DLstart(); |
JackB | 10:6a81aeca25e3 | 219 | ft_void_t Swap(); |
JackB | 10:6a81aeca25e3 | 220 | ft_void_t ColdStart(); |
JackB | 10:6a81aeca25e3 | 221 | ft_void_t Interrupt(ft_uint32_t ms); |
JackB | 10:6a81aeca25e3 | 222 | ft_void_t Append(ft_uint32_t ptr, ft_uint32_t num); |
JackB | 10:6a81aeca25e3 | 223 | ft_void_t RegRead(ft_uint32_t ptr, ft_uint32_t result); |
JackB | 10:6a81aeca25e3 | 224 | ft_void_t MemWrite(ft_uint32_t ptr, ft_uint32_t num); |
JackB | 10:6a81aeca25e3 | 225 | ft_void_t Inflate(ft_uint32_t ptr); |
JackB | 10:6a81aeca25e3 | 226 | ft_void_t LoadImage(ft_uint32_t ptr, ft_uint32_t options); |
JackB | 10:6a81aeca25e3 | 227 | ft_void_t MediaFifo(ft_uint32_t ptr, ft_uint32_t size); |
JackB | 10:6a81aeca25e3 | 228 | ft_void_t PlayVideo(ft_uint32_t opts); |
JackB | 10:6a81aeca25e3 | 229 | ft_void_t VideoStart(); |
JackB | 10:6a81aeca25e3 | 230 | ft_void_t VideoFrame(ft_uint32_t dst, ft_uint32_t ptr); |
JackB | 10:6a81aeca25e3 | 231 | ft_void_t Memcrc(ft_uint32_t ptr, ft_uint32_t num, ft_uint32_t result); |
JackB | 10:6a81aeca25e3 | 232 | ft_void_t MemZero(ft_uint32_t ptr, ft_uint32_t num); |
JackB | 10:6a81aeca25e3 | 233 | ft_void_t MemSet(ft_uint32_t ptr, ft_uint32_t value, ft_uint32_t num); |
JackB | 10:6a81aeca25e3 | 234 | ft_void_t Memcpy(ft_uint32_t dest, ft_uint32_t src, ft_uint32_t num); |
JackB | 10:6a81aeca25e3 | 235 | ft_void_t Button(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_int16_t font, ft_uint16_t options, const ft_char8_t* s); |
JackB | 10:6a81aeca25e3 | 236 | ft_void_t Clock(ft_int16_t x, ft_int16_t y, ft_int16_t r, ft_uint16_t options, ft_uint16_t h, ft_uint16_t m, ft_uint16_t s, ft_uint16_t ms); |
JackB | 10:6a81aeca25e3 | 237 | ft_void_t FgColor(ft_uint32_t c); |
JackB | 10:6a81aeca25e3 | 238 | ft_void_t BgColor(ft_uint32_t c); |
JackB | 10:6a81aeca25e3 | 239 | ft_void_t GradColor(ft_uint32_t c); |
JackB | 10:6a81aeca25e3 | 240 | ft_void_t Gauge(ft_int16_t x, ft_int16_t y, ft_int16_t r, ft_uint16_t options, ft_uint16_t major, ft_uint16_t minor, ft_uint16_t val, ft_uint16_t range); |
JackB | 10:6a81aeca25e3 | 241 | ft_void_t Gradient(ft_int16_t x0, ft_int16_t y0, ft_uint32_t rgb0, ft_int16_t x1, ft_int16_t y1, ft_uint32_t rgb1); |
JackB | 10:6a81aeca25e3 | 242 | ft_void_t Keys(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_int16_t font, ft_uint16_t options, const ft_char8_t* s); |
JackB | 10:6a81aeca25e3 | 243 | ft_void_t Progress(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_uint16_t options, ft_uint16_t val, ft_uint16_t range); |
JackB | 10:6a81aeca25e3 | 244 | ft_void_t Scrollbar(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_uint16_t options, ft_uint16_t val, ft_uint16_t size, ft_uint16_t range); |
JackB | 10:6a81aeca25e3 | 245 | ft_void_t Slider(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_uint16_t options, ft_uint16_t val, ft_uint16_t range); |
JackB | 10:6a81aeca25e3 | 246 | ft_void_t Dial(ft_int16_t x, ft_int16_t y, ft_int16_t r, ft_uint16_t options, ft_uint16_t val); |
JackB | 10:6a81aeca25e3 | 247 | ft_void_t Toggle(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t font, ft_uint16_t options, ft_uint16_t state, const ft_char8_t* s); |
cpm219 | 0:2d0ef4830603 | 248 | ft_void_t Text(ft_int16_t x, ft_int16_t y, ft_int16_t font, ft_uint16_t options, const ft_char8_t* s); |
JackB | 10:6a81aeca25e3 | 249 | ft_void_t SetBase(ft_uint32_t base); |
cpm219 | 0:2d0ef4830603 | 250 | ft_void_t Number(ft_int16_t x, ft_int16_t y, ft_int16_t font, ft_uint16_t options, ft_int32_t n); |
cpm219 | 0:2d0ef4830603 | 251 | ft_void_t LoadIdentity(); |
JackB | 10:6a81aeca25e3 | 252 | ft_void_t SetMatrix(); |
JackB | 10:6a81aeca25e3 | 253 | ft_void_t GetMatrix(ft_int32_t a, ft_int32_t b, ft_int32_t c, ft_int32_t d, ft_int32_t e, ft_int32_t f); |
JackB | 10:6a81aeca25e3 | 254 | ft_void_t GetPtr(ft_uint32_t result); |
cpm219 | 0:2d0ef4830603 | 255 | ft_void_t GetProps(ft_uint32_t ptr, ft_uint32_t w, ft_uint32_t h); |
JackB | 10:6a81aeca25e3 | 256 | ft_void_t Scale(ft_int32_t sx, ft_int32_t sy); |
JackB | 10:6a81aeca25e3 | 257 | ft_void_t Rotate(ft_int32_t a); |
JackB | 10:6a81aeca25e3 | 258 | ft_void_t Translate(ft_int32_t tx, ft_int32_t ty); |
JackB | 10:6a81aeca25e3 | 259 | ft_void_t Calibrate(ft_uint32_t result); |
JackB | 10:6a81aeca25e3 | 260 | ft_void_t SetRotate(ft_uint32_t r); |
cpm219 | 0:2d0ef4830603 | 261 | ft_void_t Spinner(ft_int16_t x, ft_int16_t y, ft_uint16_t style, ft_uint16_t scale); |
JackB | 10:6a81aeca25e3 | 262 | ft_void_t ScreenSaver(); |
JackB | 10:6a81aeca25e3 | 263 | ft_void_t Sketch(ft_int16_t x, ft_int16_t y, ft_uint16_t w, ft_uint16_t h, ft_uint32_t ptr, ft_uint16_t format); |
cpm219 | 0:2d0ef4830603 | 264 | ft_void_t Stop(); |
cpm219 | 0:2d0ef4830603 | 265 | ft_void_t SetFont(ft_uint32_t font, ft_uint32_t ptr); |
JackB | 10:6a81aeca25e3 | 266 | ft_void_t SetFont2(ft_uint32_t font, ft_uint32_t ptr, ft_uint32_t firstchar); |
JackB | 10:6a81aeca25e3 | 267 | ft_void_t SetScratch(ft_uint32_t handle); |
JackB | 10:6a81aeca25e3 | 268 | ft_void_t RomFont(ft_uint32_t font, ft_uint32_t rom_slot); |
JackB | 10:6a81aeca25e3 | 269 | ft_void_t Track(ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h, ft_int16_t tag); |
JackB | 10:6a81aeca25e3 | 270 | ft_void_t Snapshot(ft_uint32_t ptr); |
JackB | 10:6a81aeca25e3 | 271 | ft_void_t Snapshot2(ft_uint32_t fmt, ft_uint32_t ptr, ft_int16_t x, ft_int16_t y, ft_int16_t w, ft_int16_t h); |
JackB | 10:6a81aeca25e3 | 272 | ft_void_t SetBitmap(ft_int32_t addr, ft_int16_t fmt, ft_uint16_t width, ft_uint16_t height); |
JackB | 10:6a81aeca25e3 | 273 | ft_void_t Logo(); |
JackB | 10:6a81aeca25e3 | 274 | |
cpm219 | 0:2d0ef4830603 | 275 | ft_void_t Bitmap_Transform(ft_int32_t x0, ft_int32_t y0, ft_int32_t x1, ft_int32_t y1, ft_int32_t x2, ft_int32_t y2, ft_int32_t tx0, ft_int32_t ty0, ft_int32_t tx1, ft_int32_t ty1, ft_int32_t tx2, ft_int32_t ty2, ft_uint16_t result); |
JackB | 10:6a81aeca25e3 | 276 | |
cpm219 | 0:2d0ef4830603 | 277 | |
JackB | 10:6a81aeca25e3 | 278 | ft_void_t SendCmd(ft_uint32_t cmd); |
JackB | 10:6a81aeca25e3 | 279 | ft_void_t SendStr(const ft_char8_t *s); |
JackB | 10:6a81aeca25e3 | 280 | ft_void_t StartFunc(ft_uint16_t count); |
JackB | 10:6a81aeca25e3 | 281 | // ft_void_t EndFunc(ft_uint16_t count); |
JackB | 10:6a81aeca25e3 | 282 | ft_void_t EndFunc(); |
JackB | 10:6a81aeca25e3 | 283 | |
JackB | 10:6a81aeca25e3 | 284 | ft_void_t TouchTransform(ft_int32_t x0, ft_int32_t y0, ft_int32_t x1, ft_int32_t y1, ft_int32_t x2, ft_int32_t y2, ft_int32_t tx0, ft_int32_t ty0, ft_int32_t tx1, ft_int32_t ty1, ft_int32_t tx2, ft_int32_t ty2, ft_uint16_t result); |
JackB | 10:6a81aeca25e3 | 285 | ft_void_t BitmapTransform(ft_int32_t x0, ft_int32_t y0, ft_int32_t x1, ft_int32_t y1, ft_int32_t x2, ft_int32_t y2, ft_int32_t tx0, ft_int32_t ty0, ft_int32_t tx1, ft_int32_t ty1, ft_int32_t tx2, ft_int32_t ty2, ft_uint16_t result); |
JackB | 10:6a81aeca25e3 | 286 | ft_void_t MemCrc(ft_uint32_t ptr, ft_uint32_t num, ft_uint32_t result); |
cpm219 | 0:2d0ef4830603 | 287 | |
JackB | 10:6a81aeca25e3 | 288 | ft_uint16_t fifo_Freespace(); |
cpm219 | 0:2d0ef4830603 | 289 | |
cpm219 | 0:2d0ef4830603 | 290 | ft_void_t DL(ft_uint32_t cmd); |
cpm219 | 0:2d0ef4830603 | 291 | ft_void_t WrDlCmd_Buffer(ft_uint32_t cmd); |
cpm219 | 0:2d0ef4830603 | 292 | ft_void_t Flush_DL_Buffer(); |
cpm219 | 0:2d0ef4830603 | 293 | ft_void_t Flush_Co_Buffer(); |
cpm219 | 0:2d0ef4830603 | 294 | ft_void_t fadeout(); |
cpm219 | 0:2d0ef4830603 | 295 | ft_void_t fadein(); |
cpm219 | 0:2d0ef4830603 | 296 | ft_void_t DLSwap(ft_uint8_t DL_Swap_Type); |
cpm219 | 0:2d0ef4830603 | 297 | |
JackB | 10:6a81aeca25e3 | 298 | ft_void_t Point(ft_int16_t x, ft_int16_t y, ft_uint16_t size); |
JackB | 10:6a81aeca25e3 | 299 | ft_void_t Line(ft_int16_t x0, ft_int16_t y0, ft_int16_t x1, ft_int16_t y1, ft_int16_t width); |
JackB | 10:6a81aeca25e3 | 300 | ft_void_t Rect(ft_int16_t x0, ft_int16_t y0, ft_int16_t x1, ft_int16_t y1, ft_int16_t corner); |
JackB | 10:6a81aeca25e3 | 301 | ft_void_t RectWH(ft_int16_t x0, ft_int16_t y0, ft_int16_t w, ft_int16_t h, ft_int16_t corner); |
JackB | 10:6a81aeca25e3 | 302 | ft_uint8_t LoadJpg(char* filename, ft_int16_t* x_size, ft_int16_t* y_size); |
JackB | 10:6a81aeca25e3 | 303 | ft_uint8_t LoadPng(char* filename, ft_int16_t* x_size, ft_int16_t* y_size); |
JackB | 10:6a81aeca25e3 | 304 | //Curt added Load_raw 7/22/16 |
JackB | 10:6a81aeca25e3 | 305 | int LoadRaw(char* filename); |
JackB | 10:6a81aeca25e3 | 306 | int LoadRawFile(ft_uint32_t address, char* filename); |
JackB | 10:6a81aeca25e3 | 307 | |
JackB | 10:6a81aeca25e3 | 308 | void FillBitmap(ft_int16_t bitmap_number); |
JackB | 10:6a81aeca25e3 | 309 | void ClearBitmapCount(void); |
JackB | 10:6a81aeca25e3 | 310 | ft_uint32_t ReadBigInt32(unsigned char* data, ft_uint32_t offset); |
JackB | 10:6a81aeca25e3 | 311 | |
JackB | 10:6a81aeca25e3 | 312 | ft_uint8_t Jpg(char *jpg_filename, int x, int y); |
JackB | 10:6a81aeca25e3 | 313 | ft_uint8_t Png(char *png_filename, int x, int y); |
JackB | 10:6a81aeca25e3 | 314 | ft_uint8_t Png(char *png_filename, int x, int y, ft_int32_t address); |
JackB | 10:6a81aeca25e3 | 315 | |
JackB | 10:6a81aeca25e3 | 316 | ft_uint8_t JpgSplash(char *jpg_filename, ft_uint8_t r, ft_uint8_t g, ft_uint8_t b); |
JackB | 10:6a81aeca25e3 | 317 | |
JackB | 10:6a81aeca25e3 | 318 | ft_uint16_t CoProFIFO_FreeSpace(void); |
JackB | 10:6a81aeca25e3 | 319 | void Wait4CoProFIFO(ft_uint32_t room); |
JackB | 10:6a81aeca25e3 | 320 | void Wait4CoProFIFOEmpty(void); |
JackB | 10:6a81aeca25e3 | 321 | ft_uint8_t CheckIfCoProFIFOEmpty(void); |
JackB | 10:6a81aeca25e3 | 322 | ft_uint32_t WriteBlockRAM(ft_uint32_t Add, const ft_uint8_t *buff, ft_uint32_t count); |
JackB | 10:6a81aeca25e3 | 323 | |
JackB | 10:6a81aeca25e3 | 324 | |
cpm219 | 0:2d0ef4830603 | 325 | ft_void_t Sound_ON(); |
cpm219 | 0:2d0ef4830603 | 326 | ft_void_t Sound_OFF(); |
cpm219 | 0:2d0ef4830603 | 327 | |
JackB | 10:6a81aeca25e3 | 328 | // int Load_jpg(char* filename, ft_int16_t* x_size, ft_int16_t* y_size,ft_uint32_t address); |
JackB | 10:6a81aeca25e3 | 329 | |
cpm219 | 0:2d0ef4830603 | 330 | ft_void_t Calibrate(); |
JackB | 10:6a81aeca25e3 | 331 | ft_uint8_t read_calibrate_reg(ft_uint8_t i); |
JackB | 10:6a81aeca25e3 | 332 | ft_uint32_t read_calibrate_reg32(ft_uint8_t i); |
cpm219 | 0:2d0ef4830603 | 333 | ft_void_t read_calibrate(ft_uint8_t data[24]); |
cpm219 | 0:2d0ef4830603 | 334 | ft_void_t write_calibrate(ft_uint8_t data[24]); |
JackB | 10:6a81aeca25e3 | 335 | ft_void_t write_calibrate32(ft_uint32_t data[6]); |
cpm219 | 0:2d0ef4830603 | 336 | |
cpm219 | 0:2d0ef4830603 | 337 | ft_uint32_t color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue); |
cpm219 | 0:2d0ef4830603 | 338 | ft_uint32_t clear_color_rgb(ft_uint8_t red,ft_uint8_t green, ft_uint8_t blue); |
JackB | 10:6a81aeca25e3 | 339 | |
JackB | 10:6a81aeca25e3 | 340 | void SetBacklight(ft_uint16_t brightness); |
JackB | 10:6a81aeca25e3 | 341 | |
JackB | 10:6a81aeca25e3 | 342 | void Tag(ft_uint8_t s); |
JackB | 10:6a81aeca25e3 | 343 | void ClearTag(ft_uint8_t s); |
JackB | 10:6a81aeca25e3 | 344 | void TagMask(ft_uint8_t mask); |
JackB | 10:6a81aeca25e3 | 345 | void BitmapLayoutH(ft_uint8_t linestride, ft_uint8_t height); |
JackB | 10:6a81aeca25e3 | 346 | void BitmapSizeH(ft_uint8_t width, ft_uint8_t height); |
JackB | 10:6a81aeca25e3 | 347 | |
JackB | 10:6a81aeca25e3 | 348 | ft_void_t SetLoadAddress(ft_uint32_t address); |
JackB | 10:6a81aeca25e3 | 349 | ft_void_t SetBitmapCount(ft_uint8_t count); |
JackB | 10:6a81aeca25e3 | 350 | ft_uint32_t GetBitmapAddress(ft_uint8_t count); |
JackB | 10:6a81aeca25e3 | 351 | void SetThemeDefaultColor(void); |
JackB | 10:6a81aeca25e3 | 352 | void SetThemeColor(ft_uint32_t c); |
JackB | 10:6a81aeca25e3 | 353 | void ShowCalibrationInCode(void); |
JackB | 10:6a81aeca25e3 | 354 | void SetOrientation(ft_uint8_t orientation); |
JackB | 10:6a81aeca25e3 | 355 | void ShowBitmap(ft_uint8_t bitmap, ft_int16_t fmt, ft_uint16_t x, ft_uint16_t y, ft_uint16_t width, ft_uint16_t height); |
JackB | 10:6a81aeca25e3 | 356 | void ShowBitmapAtAddress(ft_uint32_t addr, ft_int16_t fmt, ft_uint16_t x, ft_uint16_t y, ft_uint16_t width, ft_uint16_t height); |
JackB | 10:6a81aeca25e3 | 357 | int GetImageIndexFromName(char *name); |
JackB | 10:6a81aeca25e3 | 358 | int ResetInflateFileBitmap(void); |
JackB | 10:6a81aeca25e3 | 359 | uint32_t GetRamUsage(void); |
JackB | 10:6a81aeca25e3 | 360 | uint16_t GetRamNoOfBitmaps(void); |
JackB | 10:6a81aeca25e3 | 361 | int LoadInflateFileBitmap(char *name, uint16_t fmt, uint16_t w, uint16_t h); |
JackB | 10:6a81aeca25e3 | 362 | int ShowBitmapByName(char *name, uint16_t w, uint16_t h); |
JackB | 10:6a81aeca25e3 | 363 | uint16_t GetTouchedTag(void); |
JackB | 10:6a81aeca25e3 | 364 | uint16_t GetTouchedTag(uint8_t point_number); |
JackB | 10:6a81aeca25e3 | 365 | uint8_t GetTag(void); |
JackB | 10:6a81aeca25e3 | 366 | uint16_t GetTagX(void); |
JackB | 10:6a81aeca25e3 | 367 | uint16_t GetTagY(void); |
JackB | 10:6a81aeca25e3 | 368 | uint8_t GetTouchTag(void); |
JackB | 10:6a81aeca25e3 | 369 | uint16_t GetTouchTagX(void); |
JackB | 10:6a81aeca25e3 | 370 | uint16_t GetTouchTagY(void); |
JackB | 10:6a81aeca25e3 | 371 | uint16_t GetTouchConfig(void); |
JackB | 10:6a81aeca25e3 | 372 | void SetTouchConfig(uint16_t TouchConfigVal); |
JackB | 10:6a81aeca25e3 | 373 | |
JackB | 10:6a81aeca25e3 | 374 | void screenShot(void); |
JackB | 10:6a81aeca25e3 | 375 | |
JackB | 10:6a81aeca25e3 | 376 | int LoadRawFile(ft_uint32_t address, const char *filename); |
JackB | 10:6a81aeca25e3 | 377 | int LoadInflateFile(ft_uint32_t address, const char *filename); |
JackB | 10:6a81aeca25e3 | 378 | int LoadImageFile(ft_uint32_t address, const char *filename); |
JackB | 10:6a81aeca25e3 | 379 | ft_void_t SetEndAddressForSize(ft_uint32_t addr); |
JackB | 10:6a81aeca25e3 | 380 | |
JackB | 10:6a81aeca25e3 | 381 | ft_void_t Wr8s(ft_uint32_t addr, ft_uint8_t *buffer, ft_uint8_t length); |
JackB | 10:6a81aeca25e3 | 382 | |
cpm219 | 0:2d0ef4830603 | 383 | }; // end of class |
cpm219 | 0:2d0ef4830603 | 384 | |
JackB | 10:6a81aeca25e3 | 385 | #endif /*FT_GPU_HAL_H*/ |