STM32 drivers: move to 0 based index

This commit is contained in:
Lorenz Meier
2015-02-09 22:56:23 +01:00
parent 1c2e39bc75
commit e90f00aaf1
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ private:
};
ADC::ADC(uint32_t channels) :
CDev("adc", ADC_DEVICE_PATH),
CDev("adc", ADC0_DEVICE_PATH),
_sample_perf(perf_alloc(PC_ELAPSED, "adc_samples")),
_channel_count(0),
_samples(nullptr),
@@ -381,7 +381,7 @@ void
test(void)
{
int fd = open(ADC_DEVICE_PATH, O_RDONLY);
int fd = open(ADC0_DEVICE_PATH, O_RDONLY);
if (fd < 0)
err(1, "can't open ADC device");