——Site na ọgbakọ Mmepụta DWIN
N'ime mbipụta a, anyị ga-ewebata ikpe mepere emepe nke na-emeri nke DWIN Developer Forum – Sistemụ Nleba Ngosipụta Mmegharị. Ndị injinia na-eji 7-inch COF smart screen na-emekọrịta ihe mmetụta njirimara PAJ7620U2 site na isi T5L OS. Ọ dịghị mkpa iji bọtịnụ ọ bụla. Naanị ị ga-etinye aka gị nso na ihe mmetụta iji banye na ihuenyo njikwa usoro menu, wee ghọta mmetụta mmegharị ahụ 9 nke elu, ala, aka ekpe, aka nri, nso, dị anya, ntụgharị aka ekpe, ntụgharị aka nri, na ifegharị.
1.UIMiheDisplay
![asd (2)](https://ecdn6.globalso.com/upload/p/1355/source/2024-06/665f07846d9de96799.png)
![asd (1)](https://ecdn6.globalso.com/upload/p/1355/source/2024-06/665f07860ad7d49985.png)
2.C51 Ekepụta Injinia
Isi T5L OS na-emekọrịta ihe na PAJ7620U2 mmegharị ihe mmetụta maka mmekọrịta data, chọpụta mmegharị ahụ ugbu a, na-ekpebi foto egosiri ugbu a na foto a gosipụtara site na ịtụgharị ibe, wee ghọta ọrụ nke ịgbanwe ibe site na iji mmegharị ahụ. Koodu nrụtụ aka bụ nke a:
void select_operate(uint16_t gesrure_value)
{
ọ bụrụ (gesrure_value = GES_UP) // elu
{
ọ bụrụ (họrọ_uru>= 2)
{
select_value - = 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, họrọ_pos[select_value][0], họrọ_pos[select_value][1]);
}
ọzọ ma ọ bụrụ (gesrure_value == GES_DOWN) // ala
{
ọ bụrụ (họrọ_uru
{
select_value += 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, họrọ_pos[select_value][0], họrọ_pos[select_value][1]);
}
ọzọ ma ọ bụrụ (gesrure_value == GES_LEFT) //ekpe
{
ọ bụrụ (họrọ_uru % 2 == 1)
{
select_value - = 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, họrọ_pos[select_value][0], họrọ_pos[select_value][1]);
}
ọzọ ma ọ bụrụ (gesrure_value == GES_RIGHT) // aka nri
{
ọ bụrụ (họrọ_uru % 2 == 0)
{
select_value += 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, họrọ_pos[select_value][0], họrọ_pos[select_value][1]);
}
}
ihe efu turning_operate(uint16_t gesrure_value)
{
uint16_t i = 0;
uint8_t turning_mode = 0; //Ụdị ntụgharị ihu, 0 elu, 1 ala, 2 aka ekpe, 3 aka nri
uint16_t turning_count = 0; //Ọnụọgụ ikpeazụ nke ntụgharị ibe
ma ọ bụrụ na (gesrure_value == GES_UP || gesrure_uru == GES_DOWN || gesrure_uru == GES_LEFT || gesrure_uru == GES_RIGHT)
{
ọ bụrụ (gesrure_value = GES_UP) // elu
{
ntụgharị_mode = 0;
ọnụ ọgụgụ ntụgharị = 48;
}
ọzọ ma ọ bụrụ (gesrure_value == GES_DOWN) // ala
{
mgbanwe_mode = 1;
ọnụ ọgụgụ ntụgharị = 48;
}
ọzọ ma ọ bụrụ (gesrure_value == GES_LEFT) //ekpe
{
mgbanwe_mode = 2;
ọnụ ọgụgụ ntụgharị = 80;
}
ọzọ ma ọ bụrụ (gesrure_value == GES_RIGHT) // aka nri
{
mgbanwe_mode = 3;
ọnụ ọgụgụ ntụgharị = 80;
}
ọ bụrụ na (onyinyo_nke ugbu a == 0 || ntụgharị_ihe onyonyo ugbu a == 2)
{
ntụgharị_current_image = 1;
}
ọzọ
{
ntụgharị_current_image = 2;
}
maka (i = 0; i
{
mgbanwe(mgbanwe_mode)
{
ikpe 0:
dgus_show_variate_icon_location_set (ntụgharị_current_image * 0x100 + 0x2000, 0, 480 - i * 10);
t5l0_sys_delay_ms(20);
ọ bụrụ (ntụgharị_ikpeazu_ihe oyiyi! = 0)
{
dgus_show_variate_icon_location_set (ntụgharị_ihe oyiyi ikpeazụ * 0x100 + 0x2000, 0, 0 - i * 10);
}
agbaji;
ikpe 1:
dgus_show_variate_icon_location_set(ntụgharị_current_image * 0x100 + 0x2000, 0, -480 + i * 10);
t5l0_sys_delay_ms(20);
ọ bụrụ (ntụgharị_ikpeazu_ihe oyiyi! = 0)
{
dgus_show_variate_icon_location_set (ntụgharị_ihe oyiyi ikpeazụ * 0x100 + 0x2000, 0, 0 + i * 10);
}
agbaji;
ikpe 2:
dgus_show_variate_icon_location_set (ntụgharị_current_image * 0x100 + 0x2000, 800 - i * 10, 0);
t5l0_sys_delay_ms(20);
ọ bụrụ (ntụgharị_ikpeazu_ihe oyiyi! = 0)
{
dgus_show_variate_icon_location_set (ntụgharị_ihe oyiyi ikpeazụ * 0x100 + 0x2000, 0 - i * 10, 0);
}
agbaji;
ikpe 3:
dgus_show_variate_icon_location_set (ntụgharị_current_image * 0x100 + 0x2000, -800 + i * 10, 0);
t5l0_sys_delay_ms(20);
ọ bụrụ (ntụgharị_ikpeazu_ihe oyiyi! = 0)
{
dgus_show_variate_icon_location_set (ntụgharị_ihe oyiyi ikpeazụ * 0x100 + 0x2000, 0 + i * 10, 0);
}
agbaji;
}
t5l0_sys_delay_ms(20);
}
turning_last_image = turning_current_image;
}
}
Oge nzipu: Mar-21-2024