forked from M-Labs/ionpak-thermostat
Also set AFSEL bits for pins where AMSEL is set.
This commit is contained in:
parent
afda70c2a0
commit
5431780700
|
@ -161,7 +161,9 @@ fn main() {
|
||||||
// Set up ADC
|
// Set up ADC
|
||||||
let gpio_d = tm4c129x::GPIO_PORTD_AHB.borrow(cs);
|
let gpio_d = tm4c129x::GPIO_PORTD_AHB.borrow(cs);
|
||||||
let gpio_e = tm4c129x::GPIO_PORTE_AHB.borrow(cs);
|
let gpio_e = tm4c129x::GPIO_PORTE_AHB.borrow(cs);
|
||||||
|
gpio_d.afsel.write(|w| w.afsel().bits(FBV_ADC|AV_ADC));
|
||||||
gpio_d.amsel.write(|w| w.amsel().bits(FBV_ADC|AV_ADC));
|
gpio_d.amsel.write(|w| w.amsel().bits(FBV_ADC|AV_ADC));
|
||||||
|
gpio_e.afsel.write(|w| w.afsel().bits(FD_ADC|FV_ADC|FBI_ADC|IC_ADC));
|
||||||
gpio_e.amsel.write(|w| w.amsel().bits(FD_ADC|FV_ADC|FBI_ADC|IC_ADC));
|
gpio_e.amsel.write(|w| w.amsel().bits(FD_ADC|FV_ADC|FBI_ADC|IC_ADC));
|
||||||
|
|
||||||
sysctl.rcgcadc.modify(|_, w| w.r0().bit(true));
|
sysctl.rcgcadc.modify(|_, w| w.r0().bit(true));
|
||||||
|
|
Loading…
Reference in New Issue