diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d04a3a..bb9b6f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 1.0.5 (2025-01-15)
+
+## Bug Fixes
+
+- fix reset errors
+
## 1.0.4 (2025-01-05)
## Bug Fixes
diff --git a/doc/html/driver__st7789_8c_source.html b/doc/html/driver__st7789_8c_source.html
index b043270..dadcaeb 100644
--- a/doc/html/driver__st7789_8c_source.html
+++ b/doc/html/driver__st7789_8c_source.html
@@ -2434,7 +2434,7 @@
-
+
3300 handle->
debug_print(
"st7789: reset gpio write failed.\n");
@@ -2443,1170 +2443,1171 @@
-
-
- 3308 handle->
debug_print(
"st7789: spi init failed.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3345 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
-
- 3351 handle->
debug_print(
"st7789: reset gpio deinit failed.\n");
-
-
-
-
-
- 3357 handle->
debug_print(
"st7789: cmd data gpio deinit failed.\n");
-
-
-
-
-
- 3363 handle->
debug_print(
"st7789: spi deinit failed.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3467 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3471 buf[0] = (0x00 >> 8) & 0xFF;
- 3472 buf[1] = (0x00 >> 0) & 0xFF;
- 3473 buf[2] = ((handle->
column - 1) >> 8) & 0xFF;
- 3474 buf[3] = ((handle->
column - 1) >> 0) & 0xFF;
- 3475 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3477 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3484 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3488 buf[0] = (0x00 >> 8) & 0xFF;
- 3489 buf[1] = (0x00 >> 0) & 0xFF;
- 3490 buf[2] = ((handle->
row - 1) >> 8) & 0xFF;
- 3491 buf[3] = ((handle->
row - 1) >> 0) & 0xFF;
- 3492 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3494 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3501 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 3506 if ((handle->
format & 0x03) == 0x03)
-
-
- 3509 m = ((uint32_t)(handle->
row) * handle->
column * 3 / 2) /
-
- 3511 n = ((uint32_t)(handle->
row) * handle->
column * 3 / 2) %
-
- 3513 for (i = 0; i < m; i++)
-
- 3515 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3518 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3525 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3527 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
- 3533 else if ((handle->
format & 0x05) == 0x05)
-
-
-
-
- 3538 for (i = 0; i < m; i++)
-
- 3540 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3543 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3550 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3552 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
- 3558 else if ((handle->
format & 0x06) == 0x06)
-
-
-
-
- 3563 for (i = 0; i < m; i++)
-
- 3565 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3568 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3575 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3577 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
-
- 3585 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3629 if (left > (handle->
column - 1))
-
- 3631 handle->
debug_print(
"st7789: left is over column.\n");
-
-
-
- 3635 if (right > (handle->
column - 1))
-
- 3637 handle->
debug_print(
"st7789: right is over column.\n");
-
-
-
-
-
-
-
-
-
- 3647 if (top > (handle->
row - 1))
-
- 3649 handle->
debug_print(
"st7789: top is over row.\n");
-
-
-
- 3653 if (bottom > (handle->
row - 1))
-
- 3655 handle->
debug_print(
"st7789: bottom is over row.\n");
-
-
-
-
-
-
-
-
-
-
-
-
- 3668 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3672 buf[0] = (left >> 8) & 0xFF;
- 3673 buf[1] = (left >> 0) & 0xFF;
- 3674 buf[2] = ((right) >> 8) & 0xFF;
- 3675 buf[3] = ((right) >> 0) & 0xFF;
- 3676 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3678 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3685 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3689 buf[0] = (top >> 8) & 0xFF;
- 3690 buf[1] = (top >> 0) & 0xFF;
- 3691 buf[2] = ((bottom) >> 8) & 0xFF;
- 3692 buf[3] = ((bottom) >> 0) & 0xFF;
- 3693 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3695 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3702 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 3707 if ((handle->
format & 0x03) == 0x03)
-
-
-
- 3711 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
- 3712 (((color >> 4) & 0xF) << 0);
- 3713 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
- 3714 (((color >> 8) & 0xF) << 0);
- 3715 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
- 3716 (((color >> 0) & 0xF) << 0);
-
- 3718 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) /
-
- 3720 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) %
-
- 3722 for (i = 0; i < m; i++)
-
- 3724 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3727 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3734 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3736 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
- 3742 else if ((handle->
format & 0x05) == 0x05)
-
-
-
- 3746 handle->
buf[i] = (color >> 8) & 0xFF;
- 3747 handle->
buf[i + 1] = (color >> 0) & 0xFF;
-
- 3749 m = (uint32_t)(right - left + 1) * (bottom - top + 1) * 2 /
-
- 3751 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) %
-
- 3753 for (i = 0; i < m; i++)
-
- 3755 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3758 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3765 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3767 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
- 3773 else if ((handle->
format & 0x06) == 0x06)
-
-
-
- 3777 handle->
buf[i] = ((color >> 12) & 0x3F) << 2;
- 3778 handle->
buf[i + 1] = ((color >> 6) & 0x3F) << 2;
- 3779 handle->
buf[i + 2] = ((color >> 0) & 0x3F) << 2;
-
- 3781 m = (uint32_t)(right - left + 1) * (bottom - top + 1) * 3 /
-
- 3783 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) %
-
- 3785 for (i = 0; i < m; i++)
-
- 3787 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3790 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3797 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3799 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
-
- 3807 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3853 if (left > (handle->
column - 1))
-
- 3855 handle->
debug_print(
"st7789: left is over column.\n");
-
-
-
- 3859 if (right > (handle->
column - 1))
-
- 3861 handle->
debug_print(
"st7789: right is over column.\n");
-
-
-
-
-
-
-
-
-
- 3871 if (top > (handle->
row - 1))
-
- 3873 handle->
debug_print(
"st7789: top is over row.\n");
-
-
-
- 3877 if (bottom > (handle->
row - 1))
-
- 3879 handle->
debug_print(
"st7789: bottom is over row.\n");
-
-
-
-
-
-
-
-
-
-
-
-
- 3892 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3896 buf[0] = (left >> 8) & 0xFF;
- 3897 buf[1] = (left >> 0) & 0xFF;
- 3898 buf[2] = ((right) >> 8) & 0xFF;
- 3899 buf[3] = ((right) >> 0) & 0xFF;
- 3900 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3902 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3909 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 3913 buf[0] = (top >> 8) & 0xFF;
- 3914 buf[1] = (top >> 0) & 0xFF;
- 3915 buf[2] = ((bottom) >> 8) & 0xFF;
- 3916 buf[3] = ((bottom) >> 0) & 0xFF;
- 3917 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 3919 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3926 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 3931 if ((handle->
format & 0x03) == 0x03)
-
-
-
-
-
- 3937 c = right - left + 1;
- 3938 r = bottom - top + 1;
-
- 3940 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) /
-
- 3942 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) %
-
- 3944 for (i = 0; i < m; i++)
-
-
-
- 3948 color = image[(point % c) * r + (point / c)];
- 3949 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
- 3950 (((color >> 4) & 0xF) << 0);
- 3951 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
- 3952 (((color >> 8) & 0xF) << 0);
- 3953 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
- 3954 (((color >> 0) & 0xF) << 0);
-
-
- 3957 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 3960 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 3967 for (j = 0; j < n; j += 3)
-
- 3969 color = image[(point % c) * r + (point / c)];
- 3970 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
- 3971 (((color >> 4) & 0xF) << 0);
- 3972 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
- 3973 (((color >> 8) & 0xF) << 0);
- 3974 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
- 3975 (((color >> 0) & 0xF) << 0);
-
-
- 3978 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 3980 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
-
- 3988 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4034 if (left > (handle->
column - 1))
-
- 4036 handle->
debug_print(
"st7789: left is over column.\n");
-
-
-
- 4040 if (right > (handle->
column - 1))
-
- 4042 handle->
debug_print(
"st7789: right is over column.\n");
-
-
-
-
-
-
-
-
-
- 4052 if (top > (handle->
row - 1))
-
- 4054 handle->
debug_print(
"st7789: top is over row.\n");
-
-
-
- 4058 if (bottom > (handle->
row - 1))
-
- 4060 handle->
debug_print(
"st7789: bottom is over row.\n");
-
-
-
-
-
-
-
-
-
-
-
-
- 4073 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4077 buf[0] = (left >> 8) & 0xFF;
- 4078 buf[1] = (left >> 0) & 0xFF;
- 4079 buf[2] = ((right) >> 8) & 0xFF;
- 4080 buf[3] = ((right) >> 0) & 0xFF;
- 4081 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4083 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4090 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4094 buf[0] = (top >> 8) & 0xFF;
- 4095 buf[1] = (top >> 0) & 0xFF;
- 4096 buf[2] = ((bottom) >> 8) & 0xFF;
- 4097 buf[3] = ((bottom) >> 0) & 0xFF;
- 4098 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4100 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4107 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 4112 if ((handle->
format & 0x05) == 0x05)
-
-
-
-
-
- 4118 c = right - left + 1;
- 4119 r = bottom - top + 1;
-
- 4121 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) /
-
- 4123 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) %
-
- 4125 for (i = 0; i < m; i++)
-
-
-
- 4129 color = image[(point % c) * r + (point / c)];
- 4130 handle->
buf[j] = (color >> 8) & 0xFF;
- 4131 handle->
buf[j + 1] = (color >> 0) & 0xFF;
-
-
- 4134 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 4137 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4144 for (j = 0; j < n; j += 2)
-
- 4146 color = image[(point % c) * r + (point / c)];
- 4147 handle->
buf[j] = (color >> 8) & 0xFF;
- 4148 handle->
buf[j + 1] = (color >> 0) & 0xFF;
-
-
- 4151 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 4153 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
-
- 4161 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4207 if (left > (handle->
column - 1))
-
- 4209 handle->
debug_print(
"st7789: left is over column.\n");
-
-
-
- 4213 if (right > (handle->
column - 1))
-
- 4215 handle->
debug_print(
"st7789: right is over column.\n");
-
-
-
-
-
-
-
-
-
- 4225 if (top > (handle->
row - 1))
-
- 4227 handle->
debug_print(
"st7789: top is over row.\n");
-
-
-
- 4231 if (bottom > (handle->
row - 1))
-
- 4233 handle->
debug_print(
"st7789: bottom is over row.\n");
-
-
-
-
-
-
-
-
-
-
-
-
- 4246 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4250 buf[0] = (left >> 8) & 0xFF;
- 4251 buf[1] = (left >> 0) & 0xFF;
- 4252 buf[2] = ((right) >> 8) & 0xFF;
- 4253 buf[3] = ((right) >> 0) & 0xFF;
- 4254 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4256 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4263 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4267 buf[0] = (top >> 8) & 0xFF;
- 4268 buf[1] = (top >> 0) & 0xFF;
- 4269 buf[2] = ((bottom) >> 8) & 0xFF;
- 4270 buf[3] = ((bottom) >> 0) & 0xFF;
- 4271 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4273 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4280 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 4285 if ((handle->
format & 0x06) == 0x06)
-
-
-
-
-
- 4291 c = right - left + 1;
- 4292 r = bottom - top + 1;
-
- 4294 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) /
-
- 4296 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) %
-
- 4298 for (i = 0; i < m; i++)
-
-
-
- 4302 color = image[(point % c) * r + (point / c)];
- 4303 handle->
buf[j] = ((color >> 12) & 0x3F) << 2;
- 4304 handle->
buf[j + 1] = ((color >> 6) & 0x3F) << 2;
- 4305 handle->
buf[j + 2] = ((color >> 0) & 0x3F) << 2;
-
-
- 4308 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 4311 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4318 for (j = 0; j < n; j += 3)
-
- 4320 color = image[(point % c) * r + (point / c)];
- 4321 handle->
buf[j] = ((color >> 12) & 0x3F) << 2;
- 4322 handle->
buf[j + 1] = ((color >> 6) & 0x3F) << 2;
- 4323 handle->
buf[j + 2] = ((color >> 0) & 0x3F) << 2;
-
-
- 4326 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
-
- 4328 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
-
- 4336 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
- 4355 static uint8_t a_st7789_draw_point(
st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
-
-
-
-
-
- 4361 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4365 buf[0] = (x >> 8) & 0xFF;
- 4366 buf[1] = (x >> 0) & 0xFF;
- 4367 buf[2] = (x >> 8) & 0xFF;
- 4368 buf[3] = (x >> 0) & 0xFF;
- 4369 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4371 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4378 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
- 4382 buf[0] = (y >> 8) & 0xFF;
- 4383 buf[1] = (y >> 0) & 0xFF;
- 4384 buf[2] = (y >> 8) & 0xFF;
- 4385 buf[3] = (y >> 0) & 0xFF;
- 4386 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
-
- 4388 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4395 handle->
debug_print(
"st7789: write command failed.\n");
-
-
-
-
- 4400 if ((handle->
format & 0x03) == 0x03)
-
- 4402 handle->
buf[0] = (((color >> 8) & 0xF) << 4) |
- 4403 (((color >> 4) & 0xF) << 0);
- 4404 handle->
buf[1] = (((color >> 0) & 0xF) << 4);
- 4405 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 4408 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
- 4413 else if ((handle->
format & 0x05) == 0x05)
-
- 4415 handle->
buf[0] = (color >> 8) & 0xFF;
- 4416 handle->
buf[1] = (color >> 0) & 0xFF;
- 4417 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 4420 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
- 4425 else if ((handle->
format & 0x06) == 0x06)
-
- 4427 handle->
buf[0] = ((color >> 12) & 0x3F) << 2;
- 4428 handle->
buf[1] = ((color >> 6) & 0x3F) << 2;
- 4429 handle->
buf[2] = ((color >> 0) & 0x3F) << 2;
- 4430 if (a_st7789_write_bytes(handle, handle->
buf,
-
-
- 4433 handle->
debug_print(
"st7789: write data failed.\n");
-
-
-
-
-
-
- 4440 handle->
debug_print(
"st7789: format is invalid.\n");
-
-
-
-
-
-
-
- 4461 static uint8_t a_st7789_show_char(
st7789_handle_t *handle, uint16_t x, uint16_t y, uint8_t chr, uint8_t size, uint32_t color)
-
- 4463 uint8_t temp, t, t1;
-
- 4465 uint8_t csize = (size / 8 + ((size % 8) ? 1 : 0)) * (size / 2);
-
-
- 4468 for (t = 0; t < csize; t++)
-
-
-
- 4472 temp = gsc_st7789_ascii_1206[chr][t];
-
- 4474 else if (size == 16)
-
- 4476 temp = gsc_st7789_ascii_1608[chr][t];
-
-
-
- 4480 temp = gsc_st7789_ascii_2412[chr][t];
-
-
-
-
-
- 4486 for (t1 = 0; t1 < 8; t1++)
-
- 4488 if ((temp & 0x80) != 0)
-
- 4490 if (a_st7789_draw_point(handle, x, y, color) != 0)
-
-
-
-
-
-
- 4497 if ((y - y0) == size)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4537 if((x >= handle->
column) || (y >= handle->
row))
-
- 4539 handle->
debug_print(
"ssd1351: x or y is invalid.\n");
-
-
-
-
- 4544 while ((len != 0) && (*str <=
'~') && (*str >=
' '))
-
- 4546 if (x >= (handle->
column - (font / 2)))
-
-
-
-
- 4551 if (y >= (handle->
row - font))
-
-
-
- 4555 if (a_st7789_show_char(handle, x, y, *str, font, color) != 0)
-
-
-
- 4559 x += (uint8_t)(font / 2);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4594 handle->
debug_print(
"ssd1351: x is over column.\n");
-
-
-
- 4598 if (y >= handle->
row)
-
-
-
-
-
-
- 4605 return a_st7789_draw_point(handle, x, y, color);
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4630 return a_st7789_write_byte(handle, cmd,
ST7789_CMD);
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4655 return a_st7789_write_byte(handle, data,
ST7789_DATA);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 3309 handle->
debug_print(
"st7789: spi init failed.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3346 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+
+ 3352 handle->
debug_print(
"st7789: reset gpio deinit failed.\n");
+
+
+
+
+
+ 3358 handle->
debug_print(
"st7789: cmd data gpio deinit failed.\n");
+
+
+
+
+
+ 3364 handle->
debug_print(
"st7789: spi deinit failed.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3468 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3472 buf[0] = (0x00 >> 8) & 0xFF;
+ 3473 buf[1] = (0x00 >> 0) & 0xFF;
+ 3474 buf[2] = ((handle->
column - 1) >> 8) & 0xFF;
+ 3475 buf[3] = ((handle->
column - 1) >> 0) & 0xFF;
+ 3476 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3478 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3485 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3489 buf[0] = (0x00 >> 8) & 0xFF;
+ 3490 buf[1] = (0x00 >> 0) & 0xFF;
+ 3491 buf[2] = ((handle->
row - 1) >> 8) & 0xFF;
+ 3492 buf[3] = ((handle->
row - 1) >> 0) & 0xFF;
+ 3493 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3495 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3502 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 3507 if ((handle->
format & 0x03) == 0x03)
+
+
+ 3510 m = ((uint32_t)(handle->
row) * handle->
column * 3 / 2) /
+
+ 3512 n = ((uint32_t)(handle->
row) * handle->
column * 3 / 2) %
+
+ 3514 for (i = 0; i < m; i++)
+
+ 3516 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3519 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3526 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3528 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+ 3534 else if ((handle->
format & 0x05) == 0x05)
+
+
+
+
+ 3539 for (i = 0; i < m; i++)
+
+ 3541 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3544 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3551 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3553 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+ 3559 else if ((handle->
format & 0x06) == 0x06)
+
+
+
+
+ 3564 for (i = 0; i < m; i++)
+
+ 3566 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3569 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3576 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3578 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+
+ 3586 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3630 if (left > (handle->
column - 1))
+
+ 3632 handle->
debug_print(
"st7789: left is over column.\n");
+
+
+
+ 3636 if (right > (handle->
column - 1))
+
+ 3638 handle->
debug_print(
"st7789: right is over column.\n");
+
+
+
+
+
+
+
+
+
+ 3648 if (top > (handle->
row - 1))
+
+ 3650 handle->
debug_print(
"st7789: top is over row.\n");
+
+
+
+ 3654 if (bottom > (handle->
row - 1))
+
+ 3656 handle->
debug_print(
"st7789: bottom is over row.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+ 3669 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3673 buf[0] = (left >> 8) & 0xFF;
+ 3674 buf[1] = (left >> 0) & 0xFF;
+ 3675 buf[2] = ((right) >> 8) & 0xFF;
+ 3676 buf[3] = ((right) >> 0) & 0xFF;
+ 3677 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3679 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3686 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3690 buf[0] = (top >> 8) & 0xFF;
+ 3691 buf[1] = (top >> 0) & 0xFF;
+ 3692 buf[2] = ((bottom) >> 8) & 0xFF;
+ 3693 buf[3] = ((bottom) >> 0) & 0xFF;
+ 3694 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3696 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3703 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 3708 if ((handle->
format & 0x03) == 0x03)
+
+
+
+ 3712 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
+ 3713 (((color >> 4) & 0xF) << 0);
+ 3714 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
+ 3715 (((color >> 8) & 0xF) << 0);
+ 3716 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
+ 3717 (((color >> 0) & 0xF) << 0);
+
+ 3719 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) /
+
+ 3721 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) %
+
+ 3723 for (i = 0; i < m; i++)
+
+ 3725 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3728 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3735 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3737 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+ 3743 else if ((handle->
format & 0x05) == 0x05)
+
+
+
+ 3747 handle->
buf[i] = (color >> 8) & 0xFF;
+ 3748 handle->
buf[i + 1] = (color >> 0) & 0xFF;
+
+ 3750 m = (uint32_t)(right - left + 1) * (bottom - top + 1) * 2 /
+
+ 3752 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) %
+
+ 3754 for (i = 0; i < m; i++)
+
+ 3756 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3759 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3766 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3768 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+ 3774 else if ((handle->
format & 0x06) == 0x06)
+
+
+
+ 3778 handle->
buf[i] = ((color >> 12) & 0x3F) << 2;
+ 3779 handle->
buf[i + 1] = ((color >> 6) & 0x3F) << 2;
+ 3780 handle->
buf[i + 2] = ((color >> 0) & 0x3F) << 2;
+
+ 3782 m = (uint32_t)(right - left + 1) * (bottom - top + 1) * 3 /
+
+ 3784 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) %
+
+ 3786 for (i = 0; i < m; i++)
+
+ 3788 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3791 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3798 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3800 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+
+ 3808 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3854 if (left > (handle->
column - 1))
+
+ 3856 handle->
debug_print(
"st7789: left is over column.\n");
+
+
+
+ 3860 if (right > (handle->
column - 1))
+
+ 3862 handle->
debug_print(
"st7789: right is over column.\n");
+
+
+
+
+
+
+
+
+
+ 3872 if (top > (handle->
row - 1))
+
+ 3874 handle->
debug_print(
"st7789: top is over row.\n");
+
+
+
+ 3878 if (bottom > (handle->
row - 1))
+
+ 3880 handle->
debug_print(
"st7789: bottom is over row.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+ 3893 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3897 buf[0] = (left >> 8) & 0xFF;
+ 3898 buf[1] = (left >> 0) & 0xFF;
+ 3899 buf[2] = ((right) >> 8) & 0xFF;
+ 3900 buf[3] = ((right) >> 0) & 0xFF;
+ 3901 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3903 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3910 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 3914 buf[0] = (top >> 8) & 0xFF;
+ 3915 buf[1] = (top >> 0) & 0xFF;
+ 3916 buf[2] = ((bottom) >> 8) & 0xFF;
+ 3917 buf[3] = ((bottom) >> 0) & 0xFF;
+ 3918 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 3920 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3927 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 3932 if ((handle->
format & 0x03) == 0x03)
+
+
+
+
+
+ 3938 c = right - left + 1;
+ 3939 r = bottom - top + 1;
+
+ 3941 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) /
+
+ 3943 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3 / 2) %
+
+ 3945 for (i = 0; i < m; i++)
+
+
+
+ 3949 color = image[(point % c) * r + (point / c)];
+ 3950 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
+ 3951 (((color >> 4) & 0xF) << 0);
+ 3952 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
+ 3953 (((color >> 8) & 0xF) << 0);
+ 3954 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
+ 3955 (((color >> 0) & 0xF) << 0);
+
+
+ 3958 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 3961 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 3968 for (j = 0; j < n; j += 3)
+
+ 3970 color = image[(point % c) * r + (point / c)];
+ 3971 handle->
buf[i] = (((color >> 8) & 0xF) << 4) |
+ 3972 (((color >> 4) & 0xF) << 0);
+ 3973 handle->
buf[i + 1] = (((color >> 0) & 0xF) << 4) |
+ 3974 (((color >> 8) & 0xF) << 0);
+ 3975 handle->
buf[i + 2] = (((color >> 4) & 0xF) << 4) |
+ 3976 (((color >> 0) & 0xF) << 0);
+
+
+ 3979 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 3981 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+
+ 3989 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4035 if (left > (handle->
column - 1))
+
+ 4037 handle->
debug_print(
"st7789: left is over column.\n");
+
+
+
+ 4041 if (right > (handle->
column - 1))
+
+ 4043 handle->
debug_print(
"st7789: right is over column.\n");
+
+
+
+
+
+
+
+
+
+ 4053 if (top > (handle->
row - 1))
+
+ 4055 handle->
debug_print(
"st7789: top is over row.\n");
+
+
+
+ 4059 if (bottom > (handle->
row - 1))
+
+ 4061 handle->
debug_print(
"st7789: bottom is over row.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+ 4074 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4078 buf[0] = (left >> 8) & 0xFF;
+ 4079 buf[1] = (left >> 0) & 0xFF;
+ 4080 buf[2] = ((right) >> 8) & 0xFF;
+ 4081 buf[3] = ((right) >> 0) & 0xFF;
+ 4082 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4084 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4091 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4095 buf[0] = (top >> 8) & 0xFF;
+ 4096 buf[1] = (top >> 0) & 0xFF;
+ 4097 buf[2] = ((bottom) >> 8) & 0xFF;
+ 4098 buf[3] = ((bottom) >> 0) & 0xFF;
+ 4099 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4101 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4108 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 4113 if ((handle->
format & 0x05) == 0x05)
+
+
+
+
+
+ 4119 c = right - left + 1;
+ 4120 r = bottom - top + 1;
+
+ 4122 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) /
+
+ 4124 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 2) %
+
+ 4126 for (i = 0; i < m; i++)
+
+
+
+ 4130 color = image[(point % c) * r + (point / c)];
+ 4131 handle->
buf[j] = (color >> 8) & 0xFF;
+ 4132 handle->
buf[j + 1] = (color >> 0) & 0xFF;
+
+
+ 4135 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 4138 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4145 for (j = 0; j < n; j += 2)
+
+ 4147 color = image[(point % c) * r + (point / c)];
+ 4148 handle->
buf[j] = (color >> 8) & 0xFF;
+ 4149 handle->
buf[j + 1] = (color >> 0) & 0xFF;
+
+
+ 4152 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 4154 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+
+ 4162 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4208 if (left > (handle->
column - 1))
+
+ 4210 handle->
debug_print(
"st7789: left is over column.\n");
+
+
+
+ 4214 if (right > (handle->
column - 1))
+
+ 4216 handle->
debug_print(
"st7789: right is over column.\n");
+
+
+
+
+
+
+
+
+
+ 4226 if (top > (handle->
row - 1))
+
+ 4228 handle->
debug_print(
"st7789: top is over row.\n");
+
+
+
+ 4232 if (bottom > (handle->
row - 1))
+
+ 4234 handle->
debug_print(
"st7789: bottom is over row.\n");
+
+
+
+
+
+
+
+
+
+
+
+
+ 4247 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4251 buf[0] = (left >> 8) & 0xFF;
+ 4252 buf[1] = (left >> 0) & 0xFF;
+ 4253 buf[2] = ((right) >> 8) & 0xFF;
+ 4254 buf[3] = ((right) >> 0) & 0xFF;
+ 4255 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4257 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4264 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4268 buf[0] = (top >> 8) & 0xFF;
+ 4269 buf[1] = (top >> 0) & 0xFF;
+ 4270 buf[2] = ((bottom) >> 8) & 0xFF;
+ 4271 buf[3] = ((bottom) >> 0) & 0xFF;
+ 4272 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4274 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4281 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 4286 if ((handle->
format & 0x06) == 0x06)
+
+
+
+
+
+ 4292 c = right - left + 1;
+ 4293 r = bottom - top + 1;
+
+ 4295 m = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) /
+
+ 4297 n = ((uint32_t)(right - left + 1) * (bottom - top + 1) * 3) %
+
+ 4299 for (i = 0; i < m; i++)
+
+
+
+ 4303 color = image[(point % c) * r + (point / c)];
+ 4304 handle->
buf[j] = ((color >> 12) & 0x3F) << 2;
+ 4305 handle->
buf[j + 1] = ((color >> 6) & 0x3F) << 2;
+ 4306 handle->
buf[j + 2] = ((color >> 0) & 0x3F) << 2;
+
+
+ 4309 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 4312 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4319 for (j = 0; j < n; j += 3)
+
+ 4321 color = image[(point % c) * r + (point / c)];
+ 4322 handle->
buf[j] = ((color >> 12) & 0x3F) << 2;
+ 4323 handle->
buf[j + 1] = ((color >> 6) & 0x3F) << 2;
+ 4324 handle->
buf[j + 2] = ((color >> 0) & 0x3F) << 2;
+
+
+ 4327 if (a_st7789_write_bytes(handle, handle->
buf, n,
ST7789_DATA) != 0)
+
+ 4329 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+
+ 4337 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+ 4356 static uint8_t a_st7789_draw_point(
st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
+
+
+
+
+
+ 4362 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4366 buf[0] = (x >> 8) & 0xFF;
+ 4367 buf[1] = (x >> 0) & 0xFF;
+ 4368 buf[2] = (x >> 8) & 0xFF;
+ 4369 buf[3] = (x >> 0) & 0xFF;
+ 4370 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4372 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4379 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+ 4383 buf[0] = (y >> 8) & 0xFF;
+ 4384 buf[1] = (y >> 0) & 0xFF;
+ 4385 buf[2] = (y >> 8) & 0xFF;
+ 4386 buf[3] = (y >> 0) & 0xFF;
+ 4387 if (a_st7789_write_bytes(handle, buf, 4,
ST7789_DATA) != 0)
+
+ 4389 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4396 handle->
debug_print(
"st7789: write command failed.\n");
+
+
+
+
+ 4401 if ((handle->
format & 0x03) == 0x03)
+
+ 4403 handle->
buf[0] = (((color >> 8) & 0xF) << 4) |
+ 4404 (((color >> 4) & 0xF) << 0);
+ 4405 handle->
buf[1] = (((color >> 0) & 0xF) << 4);
+ 4406 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 4409 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+ 4414 else if ((handle->
format & 0x05) == 0x05)
+
+ 4416 handle->
buf[0] = (color >> 8) & 0xFF;
+ 4417 handle->
buf[1] = (color >> 0) & 0xFF;
+ 4418 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 4421 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+ 4426 else if ((handle->
format & 0x06) == 0x06)
+
+ 4428 handle->
buf[0] = ((color >> 12) & 0x3F) << 2;
+ 4429 handle->
buf[1] = ((color >> 6) & 0x3F) << 2;
+ 4430 handle->
buf[2] = ((color >> 0) & 0x3F) << 2;
+ 4431 if (a_st7789_write_bytes(handle, handle->
buf,
+
+
+ 4434 handle->
debug_print(
"st7789: write data failed.\n");
+
+
+
+
+
+
+ 4441 handle->
debug_print(
"st7789: format is invalid.\n");
+
+
+
+
+
+
+
+ 4462 static uint8_t a_st7789_show_char(
st7789_handle_t *handle, uint16_t x, uint16_t y, uint8_t chr, uint8_t size, uint32_t color)
+
+ 4464 uint8_t temp, t, t1;
+
+ 4466 uint8_t csize = (size / 8 + ((size % 8) ? 1 : 0)) * (size / 2);
+
+
+ 4469 for (t = 0; t < csize; t++)
+
+
+
+ 4473 temp = gsc_st7789_ascii_1206[chr][t];
+
+ 4475 else if (size == 16)
+
+ 4477 temp = gsc_st7789_ascii_1608[chr][t];
+
+
+
+ 4481 temp = gsc_st7789_ascii_2412[chr][t];
+
+
+
+
+
+ 4487 for (t1 = 0; t1 < 8; t1++)
+
+ 4489 if ((temp & 0x80) != 0)
+
+ 4491 if (a_st7789_draw_point(handle, x, y, color) != 0)
+
+
+
+
+
+
+ 4498 if ((y - y0) == size)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4538 if((x >= handle->
column) || (y >= handle->
row))
+
+ 4540 handle->
debug_print(
"ssd1351: x or y is invalid.\n");
+
+
+
+
+ 4545 while ((len != 0) && (*str <=
'~') && (*str >=
' '))
+
+ 4547 if (x >= (handle->
column - (font / 2)))
+
+
+
+
+ 4552 if (y >= (handle->
row - font))
+
+
+
+ 4556 if (a_st7789_show_char(handle, x, y, *str, font, color) != 0)
+
+
+
+ 4560 x += (uint8_t)(font / 2);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4595 handle->
debug_print(
"ssd1351: x is over column.\n");
+
+
+
+ 4599 if (y >= handle->
row)
+
+
+
+
+
+
+ 4606 return a_st7789_draw_point(handle, x, y, color);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4631 return a_st7789_write_byte(handle, cmd,
ST7789_CMD);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4656 return a_st7789_write_byte(handle, data,
ST7789_DATA);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#define ST7789_CMD_GAMSET
@@ -3754,38 +3755,38 @@
st7789_display_mode_t
st7789 display mode enumeration definition
uint8_t st7789_display_inversion_off(st7789_handle_t *handle)
display inversion off
st7789_font_t
st7789 font size enumeration definition
-uint8_t st7789_draw_picture_18bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t *image)
draw a picture
+uint8_t st7789_draw_picture_18bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t *image)
draw a picture
uint8_t st7789_set_vertical_scrolling(st7789_handle_t *handle, uint16_t top_fixed_area, uint16_t scrolling_area, uint16_t bottom_fixed_area)
set vertical scrolling
uint8_t st7789_display_on(st7789_handle_t *handle)
display on
uint8_t st7789_tearing_effect_line_on(st7789_handle_t *handle, st7789_tearing_effect_t effect)
tearing effect line on
uint8_t st7789_set_vertical_scroll_start_address(st7789_handle_t *handle, uint16_t start_address)
set the vertical scroll start address
uint8_t st7789_init(st7789_handle_t *handle)
initialize the chip
uint8_t st7789_set_tear_scanline(st7789_handle_t *handle, uint16_t l)
set tear scanline
-uint8_t st7789_draw_picture_12bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
+uint8_t st7789_draw_picture_12bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
st7789_color_enhancement_mode_t
st7789 color enhancement mode enumeration definition
uint8_t st7789_set_column_address(st7789_handle_t *handle, uint16_t start_address, uint16_t end_address)
set the column address
#define ST7789_BUFFER_SIZE
st7789 buffer size definition
-uint8_t st7789_set_row(st7789_handle_t *handle, uint16_t row)
set row
+uint8_t st7789_set_row(st7789_handle_t *handle, uint16_t row)
set row
uint8_t st7789_normal_display_mode_on(st7789_handle_t *handle)
normal display mode on
-uint8_t st7789_write_string(st7789_handle_t *handle, uint16_t x, uint16_t y, char *str, uint16_t len, uint32_t color, st7789_font_t font)
write a string in the display
+uint8_t st7789_write_string(st7789_handle_t *handle, uint16_t x, uint16_t y, char *str, uint16_t len, uint32_t color, st7789_font_t font)
write a string in the display
uint8_t st7789_software_reset(st7789_handle_t *handle)
software reset
uint8_t st7789_set_partial_areas(st7789_handle_t *handle, uint16_t start_row, uint16_t end_row)
set partial areas
st7789_rgb_interface_color_format_t
st7789 rgb interface color format enumeration definition
uint8_t st7789_set_display_control(st7789_handle_t *handle, st7789_bool_t brightness_control_block, st7789_bool_t display_dimming, st7789_bool_t backlight_control)
set display control
-uint8_t st7789_fill_rect(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t color)
fill the rect
+uint8_t st7789_fill_rect(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t color)
fill the rect
uint8_t st7789_set_cabc_minimum_brightness(st7789_handle_t *handle, uint8_t brightness)
set cabc minimum brightness
uint8_t st7789_tearing_effect_line_off(st7789_handle_t *handle)
tearing effect line off
uint8_t st7789_set_interface_pixel_format(st7789_handle_t *handle, st7789_rgb_interface_color_format_t rgb, st7789_control_interface_color_format_t control)
set interface pixel format
uint8_t st7789_idle_mode_off(st7789_handle_t *handle)
idle mode off
uint8_t st7789_idle_mode_on(st7789_handle_t *handle)
idle mode on
-uint8_t st7789_deinit(st7789_handle_t *handle)
close the chip
+uint8_t st7789_deinit(st7789_handle_t *handle)
close the chip
uint8_t st7789_nop(st7789_handle_t *handle)
nop
uint8_t st7789_partial_display_mode_on(st7789_handle_t *handle)
partial display mode on
uint8_t st7789_set_brightness_control_and_color_enhancement(st7789_handle_t *handle, st7789_bool_t color_enhancement, st7789_color_enhancement_mode_t mode, st7789_color_enhancement_level_t level)
set brightness control and color enhancement
-uint8_t st7789_info(st7789_info_t *info)
get chip's information
+uint8_t st7789_info(st7789_info_t *info)
get chip's information
st7789_color_enhancement_level_t
st7789 color enhancement level enumeration definition
-uint8_t st7789_draw_picture_16bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
-uint8_t st7789_clear(st7789_handle_t *handle)
clear the display
+uint8_t st7789_draw_picture_16bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
+uint8_t st7789_clear(st7789_handle_t *handle)
clear the display
uint8_t st7789_memory_continue_write(st7789_handle_t *handle, uint8_t *data, uint16_t len)
memory continue write
uint8_t st7789_display_off(st7789_handle_t *handle)
display off
st7789_bool_t
st7789 bool enumeration definition
@@ -3796,13 +3797,13 @@
uint8_t st7789_set_gamma(st7789_handle_t *handle, uint8_t gamma)
set gamma
st7789_control_interface_color_format_t
st7789 control interface color format enumeration definition
uint8_t st7789_set_display_brightness(st7789_handle_t *handle, uint8_t brightness)
set display brightness
-uint8_t st7789_set_column(st7789_handle_t *handle, uint16_t column)
set column
+uint8_t st7789_set_column(st7789_handle_t *handle, uint16_t column)
set column
uint8_t st7789_display_inversion_on(st7789_handle_t *handle)
display inversion on
-uint8_t st7789_draw_point(st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
draw a point in the display
+uint8_t st7789_draw_point(st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
draw a point in the display
uint8_t st7789_sleep_out(st7789_handle_t *handle)
sleep out
uint8_t st7789_set_memory_data_access_control(st7789_handle_t *handle, uint8_t order)
set memory data access control
-uint8_t st7789_write_data(st7789_handle_t *handle, uint8_t data)
write the data
-uint8_t st7789_write_cmd(st7789_handle_t *handle, uint8_t cmd)
write the command
+uint8_t st7789_write_data(st7789_handle_t *handle, uint8_t data)
write the data
+uint8_t st7789_write_cmd(st7789_handle_t *handle, uint8_t cmd)
write the command
st7789 handle structure definition
uint8_t(* spi_init)(void)
diff --git a/doc/html/driver__st7789_8h_source.html b/doc/html/driver__st7789_8h_source.html
index efe0ba4..3112231 100644
--- a/doc/html/driver__st7789_8h_source.html
+++ b/doc/html/driver__st7789_8h_source.html
@@ -999,40 +999,40 @@
@ ST7789_DISPLAY_MODE_MCU
uint8_t st7789_display_inversion_off(st7789_handle_t *handle)
display inversion off
st7789_font_t
st7789 font size enumeration definition
-uint8_t st7789_draw_picture_18bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t *image)
draw a picture
+uint8_t st7789_draw_picture_18bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t *image)
draw a picture
uint8_t st7789_set_vertical_scrolling(st7789_handle_t *handle, uint16_t top_fixed_area, uint16_t scrolling_area, uint16_t bottom_fixed_area)
set vertical scrolling
uint8_t st7789_display_on(st7789_handle_t *handle)
display on
uint8_t st7789_tearing_effect_line_on(st7789_handle_t *handle, st7789_tearing_effect_t effect)
tearing effect line on
uint8_t st7789_set_vertical_scroll_start_address(st7789_handle_t *handle, uint16_t start_address)
set the vertical scroll start address
uint8_t st7789_init(st7789_handle_t *handle)
initialize the chip
uint8_t st7789_set_tear_scanline(st7789_handle_t *handle, uint16_t l)
set tear scanline
-uint8_t st7789_draw_picture_12bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
+uint8_t st7789_draw_picture_12bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
st7789_color_enhancement_mode_t
st7789 color enhancement mode enumeration definition
uint8_t st7789_set_column_address(st7789_handle_t *handle, uint16_t start_address, uint16_t end_address)
set the column address
struct st7789_handle_s st7789_handle_t
st7789 handle structure definition
#define ST7789_BUFFER_SIZE
st7789 buffer size definition
-uint8_t st7789_set_row(st7789_handle_t *handle, uint16_t row)
set row
+uint8_t st7789_set_row(st7789_handle_t *handle, uint16_t row)
set row
uint8_t st7789_normal_display_mode_on(st7789_handle_t *handle)
normal display mode on
-uint8_t st7789_write_string(st7789_handle_t *handle, uint16_t x, uint16_t y, char *str, uint16_t len, uint32_t color, st7789_font_t font)
write a string in the display
+uint8_t st7789_write_string(st7789_handle_t *handle, uint16_t x, uint16_t y, char *str, uint16_t len, uint32_t color, st7789_font_t font)
write a string in the display
uint8_t st7789_software_reset(st7789_handle_t *handle)
software reset
uint8_t st7789_set_partial_areas(st7789_handle_t *handle, uint16_t start_row, uint16_t end_row)
set partial areas
st7789_rgb_interface_color_format_t
st7789 rgb interface color format enumeration definition
st7789_gamma_curve_t
st7789 gamma curve enumeration definition
uint8_t st7789_set_display_control(st7789_handle_t *handle, st7789_bool_t brightness_control_block, st7789_bool_t display_dimming, st7789_bool_t backlight_control)
set display control
-uint8_t st7789_fill_rect(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t color)
fill the rect
+uint8_t st7789_fill_rect(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint32_t color)
fill the rect
uint8_t st7789_set_cabc_minimum_brightness(st7789_handle_t *handle, uint8_t brightness)
set cabc minimum brightness
uint8_t st7789_tearing_effect_line_off(st7789_handle_t *handle)
tearing effect line off
uint8_t st7789_set_interface_pixel_format(st7789_handle_t *handle, st7789_rgb_interface_color_format_t rgb, st7789_control_interface_color_format_t control)
set interface pixel format
uint8_t st7789_idle_mode_off(st7789_handle_t *handle)
idle mode off
uint8_t st7789_idle_mode_on(st7789_handle_t *handle)
idle mode on
-uint8_t st7789_deinit(st7789_handle_t *handle)
close the chip
+uint8_t st7789_deinit(st7789_handle_t *handle)
close the chip
uint8_t st7789_nop(st7789_handle_t *handle)
nop
uint8_t st7789_partial_display_mode_on(st7789_handle_t *handle)
partial display mode on
uint8_t st7789_set_brightness_control_and_color_enhancement(st7789_handle_t *handle, st7789_bool_t color_enhancement, st7789_color_enhancement_mode_t mode, st7789_color_enhancement_level_t level)
set brightness control and color enhancement
-uint8_t st7789_info(st7789_info_t *info)
get chip's information
+uint8_t st7789_info(st7789_info_t *info)
get chip's information
st7789_color_enhancement_level_t
st7789 color enhancement level enumeration definition
-uint8_t st7789_draw_picture_16bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
-uint8_t st7789_clear(st7789_handle_t *handle)
clear the display
+uint8_t st7789_draw_picture_16bits(st7789_handle_t *handle, uint16_t left, uint16_t top, uint16_t right, uint16_t bottom, uint16_t *image)
draw a picture
+uint8_t st7789_clear(st7789_handle_t *handle)
clear the display
uint8_t st7789_memory_continue_write(st7789_handle_t *handle, uint8_t *data, uint16_t len)
memory continue write
uint8_t st7789_display_off(st7789_handle_t *handle)
display off
st7789_bool_t
st7789 bool enumeration definition
@@ -1044,10 +1044,10 @@
uint8_t st7789_set_gamma(st7789_handle_t *handle, uint8_t gamma)
set gamma
st7789_control_interface_color_format_t
st7789 control interface color format enumeration definition
uint8_t st7789_set_display_brightness(st7789_handle_t *handle, uint8_t brightness)
set display brightness
-uint8_t st7789_set_column(st7789_handle_t *handle, uint16_t column)
set column
+uint8_t st7789_set_column(st7789_handle_t *handle, uint16_t column)
set column
uint8_t st7789_display_inversion_on(st7789_handle_t *handle)
display inversion on
st7789_order_t
st7789 order enumeration definition
-uint8_t st7789_draw_point(st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
draw a point in the display
+uint8_t st7789_draw_point(st7789_handle_t *handle, uint16_t x, uint16_t y, uint32_t color)
draw a point in the display
uint8_t st7789_sleep_out(st7789_handle_t *handle)
sleep out
uint8_t st7789_set_memory_data_access_control(st7789_handle_t *handle, uint8_t order)
set memory data access control
@@ -1085,8 +1085,8 @@
@ ST7789_ORDER_PAGE_BOTTOM_TO_TOP
@ ST7789_ORDER_PAGE_COLUMN_REVERSE
-uint8_t st7789_write_data(st7789_handle_t *handle, uint8_t data)
write the data
-uint8_t st7789_write_cmd(st7789_handle_t *handle, uint8_t cmd)
write the command
+uint8_t st7789_write_data(st7789_handle_t *handle, uint8_t data)
write the data
+uint8_t st7789_write_cmd(st7789_handle_t *handle, uint8_t cmd)
write the command
st7789 handle structure definition
uint8_t(* spi_init)(void)
diff --git a/doc/html/group__st7789__basic__driver.html b/doc/html/group__st7789__basic__driver.html
index d331a13..c692862 100644
--- a/doc/html/group__st7789__basic__driver.html
+++ b/doc/html/group__st7789__basic__driver.html
@@ -657,7 +657,7 @@