pref: 减少编码器输入的中断触发次数。 close #3.

This commit is contained in:
Ivan Li 2023-03-05 21:58:22 +08:00
parent d3adb8cd56
commit 93e8f2beda
2 changed files with 1 additions and 4 deletions

View File

@ -108,5 +108,5 @@ void pca9555_init() {
}
ESP_LOGI(PCA_9555_TAG, "Initializing PCA9555");
esp_log_level_set(PCA_9555_TAG, ESP_LOG_DEBUG);
pca9555_write_config(PCA95555_CMD_CONFIGURATION_PORT_1, 0xff);
pca9555_write_config(PCA95555_CMD_CONFIGURATION_PORT_1, 0x12);
}

View File

@ -172,9 +172,6 @@ static void ui_input_raw_handler(void *arg) {
if (xQueueReceive(ui_input_raw_event, NULL, portMAX_DELAY)) {
pca9555_read_one_input(PCA95555_CMD_INPUT_PORT_1, &level_byte);
ESP_LOGI(UI_INPUT_TAG, "ui_input_raw_handler: %d%d%d %d%d%d",
level_byte & 1, level_byte >> 1 & 1, level_byte >> 2 & 1,
level_byte >> 3 & 1, level_byte >> 4 & 1, level_byte >> 5 & 1);
encoder_0_state.value = level_byte & 0x7;
encoder_value_change(&encoder_0_state);
encoder_1_state.value = level_byte >> 3 & 0x7;