——DWIN Developer Forum වෙතින්
මෙම නිකුතුවේදී, අපි DWIN සංවර්ධක සංසදයේ සම්මානලාභී විවෘත මූලාශ්ර නඩුව හඳුන්වා දෙන්නෙමු - අන්තර අභිනය හඳුනාගැනීමේ පරීක්ෂණ පද්ධතිය. ඉංජිනේරුවන් T5L OS හරය හරහා PAJ7620U2 අභිනය හඳුනාගැනීමේ සංවේදකය සමඟ අන්තර් ක්රියා කිරීමට අඟල් 7 COF ස්මාර්ට් තිරයක් භාවිතා කරයි. බොත්තම් කිසිවක් භාවිතා කිරීම අවශ්ය නොවේ. ඔබට අවශ්ය වන්නේ මෙනු පද්ධති පාලන තිරයට ඇතුළු වීමට සංවේදකයට සමීපව අත තැබීම පමණක් වන අතර, ඉහළ, පහළ, වම, දකුණ, සමීප, දුරස්ථ, වමේ භ්රමණය, දකුණු භ්රමණය සහ තරංගයේ අභිනයන් 9 ක් අවබෝධ කර ගන්න.
1.UIඑම්ද්රව්යඩීisplay
![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 ඉංජිනේරු නිර්මාණය
T5L OS හරය දත්ත අන්තර්ක්රියා සඳහා PAJ7620U2 අභිනය හඳුනාගැනීමේ සංවේදකය සමඟ අන්තර්ක්රියා කරයි, වත්මන් අභිනය හඳුනා ගනී, දැනට පෙන්වන පින්තූරය සහ පිටුව පෙරළීමෙන් පෙන්වන පින්තූරය තීරණය කරයි, සහ අභිනයන් භාවිතයෙන් පිටු මාරු කිරීමේ කාර්යය අවබෝධ කර ගනී. යොමු කේතය පහත පරිදි වේ:
void select_operate (uint16_t gesrure_value)
{
if(gesrure_value == GES_UP) //up
{
if(select_value >= 2)
{
select_value -= 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
වෙනත් නම්(gesrure_value == GES_DOWN) //පහළ
{
if(select_value
{
select_value += 2;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
වෙනත් නම්(gesrure_value == GES_LEFT) //වමේ
{
if(select_value % 2 == 1)
{
select_value -= 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
වෙනත් නම්(gesrure_value == GES_RIGHT) //හරි
{
if(select_value % 2 == 0)
{
select_value += 1;
}
dgus_show_variate_icon_location_set(SELECT_DESCRIBE_RECTANGLE, select_pos[select_value][0], select_pos[select_value][1]);
}
}
අවලංගු හැරීම_ක්රියා කිරීම (uint16_t gesrure_value)
{
uint16_t i = 0;
uint8_t turning_mode = 0; //පිටු හැරවීමේ මාදිලිය, 0 ඉහළට, 1 පහළට, 2 වමට, 3 දකුණට
uint16_t turning_count = 0; //පිටු හැරීමේ අවසාන ගණන
if(gesrure_value == GES_UP || gesrure_value == GES_DOWN || gesrure_value == GES_LEFT || gesrure_value == GES_RIGHT)
{
if(gesrure_value == GES_UP) //up
{
හැරවුම්_ප්රකාරය = 0;
හැරවුම්_ගණනය = 48;
}
වෙනත් නම්(gesrure_value == GES_DOWN) //පහළ
{
හැරවුම්_ප්රකාරය = 1;
හැරවුම්_ගණනය = 48;
}
වෙනත් නම්(gesrure_value == GES_LEFT) //වමේ
{
හැරවුම්_ප්රකාරය = 2;
හැරවුම්_ගණනය = 80;
}
වෙනත් නම්(gesrure_value == GES_RIGHT) //හරි
{
හැරවුම්_ප්රකාරය = 3;
හැරවුම්_ගණනය = 80;
}
if(turning_current_image == 0 || turning_current_image == 2)
{
turning_current_image = 1;
}
වෙනත්
{
turning_current_image = 2;
}
සඳහා (i = 0; i
{
ස්විචය (හැරීමේ_ප්රකාරය)
{
නඩුව 0:
dgus_show_variate_icon_location_set (turning_current_image * 0x100 + 0x2000, 0, 480 - i * 10);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set (turning_last_image * 0x100 + 0x2000, 0, 0 - i * 10);
}
කැඩීම;
නඩුව 1:
dgus_show_variate_icon_location_set (turning_current_image * 0x100 + 0x2000, 0, -480 + i * 10);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set (turning_last_image * 0x100 + 0x2000, 0, 0 + i * 10);
}
කැඩීම;
නඩුව 2:
dgus_show_variate_icon_location_set (turning_current_image * 0x100 + 0x2000, 800 - i * 10, 0);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set (turning_last_image * 0x100 + 0x2000, 0 - i * 10, 0);
}
කැඩීම;
නඩුව 3:
dgus_show_variate_icon_location_set (turning_current_image * 0x100 + 0x2000, -800 + i * 10, 0);
t5l0_sys_delay_ms(20);
if(turning_last_image != 0)
{
dgus_show_variate_icon_location_set (turning_last_image * 0x100 + 0x2000, 0 + i * 10, 0);
}
කැඩීම;
}
t5l0_sys_delay_ms(20);
}
turning_last_image = turning_current_image;
}
}
පසු කාලය: මාර්තු-21-2024