Skip to content

Commit e8c45dd

Browse files
committed
- Fix ADC channel count error
1 parent 01ac881 commit e8c45dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/arm/prusa/stm32f407/stm32f4xx_adc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum RegIndex {
7777

7878
typedef struct STM32F4XXADCCState STM32F4XXADCCState;
7979

80-
#define ADC_NUM_REG_CHANNELS 18
80+
#define ADC_NUM_REG_CHANNELS 19
8181

8282
OBJECT_DECLARE_SIMPLE_TYPE(STM32F4XXADCState, STM32F4xx_ADC)
8383

@@ -161,7 +161,7 @@ struct STM32F4XXADCState {
161161
} QEMU_PACKED defs;
162162
};
163163

164-
uint8_t adc_smprs[19];
164+
uint8_t adc_smprs[ADC_NUM_REG_CHANNELS];
165165

166166
STM32F4XXADCCState* common;
167167

0 commit comments

Comments
 (0)