mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 14:42:33 -04:00
init commit for fix touchscreen bad corner (#1071)
fix a rounding issue and allow more sensible touchscreen
This commit is contained in:
parent
5bdf9363e9
commit
53fcdedb88
2 changed files with 10 additions and 10 deletions
|
@ -71,10 +71,10 @@ Samples get() {
|
|||
const auto yp_reg = LPC_ADC0->DR[portapack::adc0_touch_yp_input];
|
||||
const auto yn_reg = LPC_ADC0->DR[portapack::adc0_touch_yn_input];
|
||||
return {
|
||||
(xp_reg >> 6) & 0x3ff,
|
||||
(xn_reg >> 6) & 0x3ff,
|
||||
(yp_reg >> 6) & 0x3ff,
|
||||
(yn_reg >> 6) & 0x3ff,
|
||||
((xp_reg >> 6) & 0x3ff) * 16,
|
||||
((xn_reg >> 6) & 0x3ff) * 16,
|
||||
((yp_reg >> 6) & 0x3ff) * 16,
|
||||
((yn_reg >> 6) & 0x3ff) * 16,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue