mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 19:56:40 +00:00
init commit for fix touchscreen bad corner (#1071)
fix a rounding issue and allow more sensible touchscreen
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user