图像更改
This commit is contained in:
@@ -79,7 +79,7 @@ static ips200_dir_enum ips200_display_dir = IPS200_DEFAULT_DISPLAY_DIR;
|
||||
static ips200_font_size_enum ips200_display_font = IPS200_DEFAULT_DISPLAY_FONT;
|
||||
|
||||
static uint16 ips200_x_max = 240;
|
||||
static uint16 ips200_y_max = 320;
|
||||
static uint16 ips200_y_max = 280;
|
||||
|
||||
static gpio_pin_enum ips_rst_pin = IPS200_RST_PIN_SPI;
|
||||
static gpio_pin_enum ips_bl_pin = IPS200_BLk_PIN_SPI;
|
||||
@@ -322,12 +322,12 @@ static void ips200_set_region(uint16 x1, uint16 y1, uint16 x2, uint16 y2)
|
||||
// zf_assert(y2 < ips200_y_max);
|
||||
|
||||
ips200_write_command(0x2a);
|
||||
ips200_write_16bit_data(x1);
|
||||
ips200_write_16bit_data(x2);
|
||||
ips200_write_16bit_data(x1+0);
|
||||
ips200_write_16bit_data(x2+0);
|
||||
|
||||
ips200_write_command(0x2b);
|
||||
ips200_write_16bit_data(y1);
|
||||
ips200_write_16bit_data(y2);
|
||||
ips200_write_16bit_data(y1+20);
|
||||
ips200_write_16bit_data(y2+20);
|
||||
|
||||
ips200_write_command(0x2c);
|
||||
}
|
||||
@@ -430,19 +430,19 @@ void ips200_full(const uint16 color)
|
||||
//-------------------------------------------------------------------------------------------------------------------
|
||||
void ips200_set_dir(ips200_dir_enum dir)
|
||||
{
|
||||
ips200_display_dir = dir;
|
||||
switch (ips200_display_dir) {
|
||||
case IPS200_PORTAIT:
|
||||
case IPS200_PORTAIT_180: {
|
||||
ips200_x_max = 240;
|
||||
ips200_y_max = 320;
|
||||
} break;
|
||||
case IPS200_CROSSWISE:
|
||||
case IPS200_CROSSWISE_180: {
|
||||
ips200_x_max = 320;
|
||||
ips200_y_max = 240;
|
||||
} break;
|
||||
}
|
||||
// ips200_display_dir = dir;
|
||||
// switch (ips200_display_dir) {
|
||||
// case IPS200_PORTAIT:
|
||||
// case IPS200_PORTAIT_180: {
|
||||
// ips200_x_max = 240;
|
||||
// ips200_y_max = 320;
|
||||
// } break;
|
||||
// case IPS200_CROSSWISE:
|
||||
// case IPS200_CROSSWISE_180: {
|
||||
// ips200_x_max = 320;
|
||||
// ips200_y_max = 240;
|
||||
// } break;
|
||||
// }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------
|
||||
@@ -1046,7 +1046,7 @@ void ips200_init(ips200_type_enum type_select)
|
||||
#if IPS200_USE_SOFT_SPI
|
||||
soft_spi_init(&ips200_spi, 0, IPS200_SOFT_SPI_DELAY, IPS200_SCL_PIN, IPS200_SDA_PIN, SOFT_SPI_PIN_NULL, SOFT_SPI_PIN_NULL);
|
||||
#else
|
||||
spi_init(IPS200_SPI, SPI_MODE0, IPS200_SPI_SPEED, IPS200_SCL_PIN_SPI, IPS200_SDA_PIN_SPI, SPI_MISO_NULL, SPI_CS_NULL);
|
||||
spi_init(IPS200_SPI, SPI_MODE0, IPS200_SPI_SPEED, IPS200_SCL_PIN_SPI, IPS200_SDA_PIN_SPI, SPI_MISO_NULL, PIN_NULL);
|
||||
#endif
|
||||
|
||||
gpio_init(IPS200_DC_PIN_SPI, GPO, GPIO_LOW, GPO_PUSH_PULL);
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// <20><><EFBFBD><EFBFBD>ͷĬ<CDB7>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڴ<EFBFBD><DAB4><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#define MT9V03X_W (140) // ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Χ [1-752]
|
||||
#define MT9V03X_H (80) // ͼ<><CDBC><EFBFBD>߶<EFBFBD> <20><>Χ [1-480]
|
||||
#define MT9V03X_W (188) // ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Χ [1-752]
|
||||
#define MT9V03X_H (120) // ͼ<><CDBC><EFBFBD>߶<EFBFBD> <20><>Χ [1-480]
|
||||
#define MT9V03X_IMAGE_SIZE ( MT9V03X_W * MT9V03X_H ) // <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD> 65535
|
||||
#define MT9V03X_COF_BUFFER_SIZE ( 64 ) // <20><><EFBFBD>ô<EFBFBD><C3B4>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user