mirror of
https://github.com/google/mozc-devices.git
synced 2025-11-09 01:03:26 +03:00
Add mozc-dial nine dial edition.
Co-authored-by: Takashi Toyoshima <toyoshim@google.com> Co-authored-by: Shun Ikejima <ikejima@google.com>
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "hardware/gpio.h"
|
||||
|
||||
//#define NO_SENSOR_PULL
|
||||
|
||||
PhotoSensor::PhotoSensor(int8_t bit0,
|
||||
int8_t bit1,
|
||||
int8_t bit2,
|
||||
@@ -16,7 +18,13 @@ PhotoSensor::PhotoSensor(int8_t bit0,
|
||||
for (int8_t gpio : bits) {
|
||||
gpio_init(gpio);
|
||||
gpio_set_dir(gpio, GPIO_IN);
|
||||
gpio_pull_up(gpio); // Built-in 50-80K pull-up
|
||||
#ifdef NO_SENSOR_PULL
|
||||
gpio_disable_pulls(gpio);
|
||||
#else
|
||||
// Built-in 50-80K pull-up is expected, but the actual value appears to
|
||||
// depend on the RP2040's shipping years?
|
||||
gpio_pull_up(gpio);
|
||||
#endif // NO_SENSOR_PULL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user