To change between PORTRAIT and LANDSCAPE, you just need to change bits in entryMod (0x03) and gateScan (0圆0).īear in mind that setPixel(x, y) addressing swap x, y.Īs theusch has shown you, you need to tell CV that you have changed aspect. WriteCmdData( 0圆0, gateScan ) // Gate Scan Line (0xA700) WriteCmdData( 0x03, entryMod ) // set GRAM write direction and BGR=1.
Lcd graphic codevision driver#
WriteCmdData( 0x01, drivOut ) // set Driver Output Control GateScan |= 0x8000 //.kbv ILI9320 has inverted logic on GS GateScan |= 0x0000 //.kbv ILI9320 has inverted logic on GS #define ILI9325_REVY_REV 1 /* Vertical reverse */Īgain, I'd need to study the controller datasheet to see if these "reverse" items need to be addressed to get what you desire. #define ILI9325_REVY_NORM 0 /* No vertical reverse */ * Initialization values for reverse_y */ #define ILI9325_REVX_REV 1 /* Horizontal reverse */ #define ILI9325_REVX_NORM 0 /* No horizontal reverse */ * Initialization values for reverse_x */ The following macros are defined for initializing the members of the GLCDINIT_t structure: Unsigned char vrn10:5 /* VRN10.VRN14 negative gamma Unsigned char vrn00:4 /* VRN00.VRN03 negative gamma amplification Unsigned char rn10:3 /* RN10.RN12 negative gamma gradient Unsigned char rn00:3 /* RN00.RN02 negative gamma gradient Unsigned char kn50:3 /* KN50.KN52 negative gamma micro adj. Unsigned char kn40:3 /* KN40.KN42 negative gamma micro adj. Unsigned char kn30:3 /* KN30.KN32 positive gamma micro adj. Unsigned char kn20:3 /* KN20.KN22 positive gamma micro adj. Unsigned char kn10:3 /* KN10.KN12 negative gamma micro adj. Unsigned char kn00:3 /* KN00.KN02 negative gamma micro adj. * negative gamma control registers bits */ Unsigned char vrp10:5 /* VRP10.VRP14 positive gamma amplification Unsigned char vrp00:4 /* VRP00.VRP03 positive gamma amplification Unsigned char rp10:3 /* RP10.RP12 positive gamma gradient Unsigned char rp00:3 /* RP00.RP02 positive gamma gradient Unsigned char kp50:3 /* KP50.KP52 positive gamma micro adj. Unsigned char kp40:3 /* KP40.KP42 positive gamma micro adj. Unsigned char kp30:3 /* KP30.KP32 positive gamma micro adj. Unsigned char kp20:3 /* KP20.KP22 positive gamma micro adj. Unsigned char kp10:3 /* KP10.KP12 positive gamma micro adj. Unsigned char kp00:3 /* KP00.KP02 positive gamma micro adj. * positive gamma control registers bits */ Unsigned char frame_freq:4 /* LCD frame frequency */ Unsigned char vcomh:6 /* adjusts the amplitude of the VcomH Unsigned char vcom:5 /* adjusts the amplitude of the Vcom Unsigned char vreg1out:4 /* adjusts the VREG1OUT voltage */ Unsigned char crt_source:3 /* adjusts the amount of current Unsigned char stepup_freq2:3 /* controls the frequency for the Unsigned char stepup_freq1:3 /* controls the frequency for the Unsigned char stepup_factor:3 /* step-up factor of the step-up Unsigned char cl_bits_order:1 /* selects the color bits writing Unsigned char reverse_y:1 /* reverse display vertically */ Unsigned char reverse_x:1 /* reverse display horizontally */ Void (*writexmem) (GLCDMEMADDR_t addr, unsigned char data) * pointer to the function used for writing a byte to external
Unsigned char (*readxmem) (GLCDMEMADDR_t addr) * pointer to the function used for reading a byte from external
The glcd_ili9325.h header file also contains the definition of the GLCDINIT_t type specific for the ILI9325 controller, used as parameter for the glcd_init function:įlash unsigned char *font /* default font after initialization */ Without studying the controller datasheet, I have no idea whether that is the ONLY bit you need to set to get your desired behaviour. So far, all I saw in your post is that you set one control bit. What have you done so far to answer that question?įull disclosure: I'm not very experiences in GLCD, nor with CV's provided drivers. you means we can not use CV library in landscape mode? I just want to display my lcd contents in landscape mode, just it.