Add Zonestar/Anet LCD for SKR mini E3 (#15931)

This commit is contained in:
Daniel Negut
2019-11-20 06:06:26 +00:00
committed by Scott Lahteine
parent 798f34abcd
commit a3229b30ec
16 changed files with 203 additions and 280 deletions

View File

@@ -121,6 +121,9 @@ const uint8_t adc_pins[] = {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH_PIN,
#endif
#if ENABLED(ADC_KEYPAD)
ADC_KEYPAD_PIN,
#endif
#if HAS_JOY_ADC_X
JOY_X_PIN,
#endif
@@ -160,6 +163,9 @@ enum TEMP_PINS : char {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH,
#endif
#if ENABLED(ADC_KEYPAD)
ADC_KEY,
#endif
#if HAS_JOY_ADC_X
JOY_X,
#endif
@@ -352,6 +358,9 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
#endif
#if ENABLED(ADC_KEYPAD)
case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
#endif
}
HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
}