










int read_adc_key(){int val = read_adc(); //0~1023if (val < 120) return KEY_S1;else if (val < 240) return KEY_S2;else if (val < 370) return KEY_S3;else if (val < 500) return KEY_S4;else if (val > 900) return KEY_NONE;else return KEY_NONE; //中间值视为无效(噪声或两键齐按)}