diff options
author | Perry Hung <iperry@gmail.com> | 2011-02-27 07:37:19 -0500 |
---|---|---|
committer | Perry Hung <iperry@gmail.com> | 2011-02-27 07:37:19 -0500 |
commit | e05a9ef311ad2c690a0d9176004a167effb537c8 (patch) | |
tree | 92fc89097f2d4c32d278c0f0a087c628f4ec989d /wirish | |
parent | b192af253494e68ccef222c14fea5d8bedc02c35 (diff) | |
download | librambutan-e05a9ef311ad2c690a0d9176004a167effb537c8.tar.gz librambutan-e05a9ef311ad2c690a0d9176004a167effb537c8.zip |
Refactor ADC: Pass device pointer instead of register map
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/wirish.c | 2 | ||||
-rw-r--r-- | wirish/wirish_analog.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/wirish/wirish.c b/wirish/wirish.c index a74e297..c5dec22 100644 --- a/wirish/wirish.c +++ b/wirish/wirish.c @@ -64,7 +64,7 @@ void init(void) { /* Initialize the ADC for slow conversions, to allow for high impedance inputs. */ adc_init(ADC1, 0); - adc_set_sample_rate(ADC1->regs, ADC_SMPR_55_5); + adc_set_sample_rate(ADC1, ADC_SMPR_55_5); timer_init(TIMER1, 1); timer_init(TIMER2, 1); diff --git a/wirish/wirish_analog.c b/wirish/wirish_analog.c index ba1290d..a658184 100644 --- a/wirish/wirish_analog.c +++ b/wirish/wirish_analog.c @@ -37,5 +37,5 @@ uint32 analogRead(uint8 pin) { return 0; } - return adc_read(ADC1->regs, PIN_MAP[pin].adc_channel); + return adc_read(ADC1, PIN_MAP[pin].adc_channel); } |