@@ -129,21 +129,21 @@ impl Pin {
129129
130130 fn gpioreg ( & self ) -> & ' static reg:: Gpio {
131131 match self . port {
132- PortA => & reg:: GpioA ,
133- PortB => & reg:: GpioB ,
134- PortC => & reg:: GpioC ,
135- PortD => & reg:: GpioD ,
136- PortE => & reg:: GpioE ,
132+ PortA => & reg:: GPIO_A ,
133+ PortB => & reg:: GPIO_B ,
134+ PortC => & reg:: GPIO_C ,
135+ PortD => & reg:: GPIO_D ,
136+ PortE => & reg:: GPIO_E ,
137137 }
138138 }
139139
140140 fn pcr ( & self ) -> & ' static reg:: Port_pcr {
141141 let port: & reg:: Port = match self . port {
142- PortA => & reg:: PortA ,
143- PortB => & reg:: PortB ,
144- PortC => & reg:: PortC ,
145- PortD => & reg:: PortD ,
146- PortE => & reg:: PortE ,
142+ PortA => & reg:: PORT_A ,
143+ PortB => & reg:: PORT_B ,
144+ PortC => & reg:: PORT_C ,
145+ PortD => & reg:: PORT_D ,
146+ PortE => & reg:: PORT_E ,
147147 } ;
148148 return & port. pcr [ self . pin as uint ] ;
149149 }
@@ -236,11 +236,11 @@ pub mod reg {
236236 } )
237237
238238 extern {
239- #[ link_name="k20_iomem_PORTA" ] pub static PortA : Port ;
240- #[ link_name="k20_iomem_PORTB" ] pub static PortB : Port ;
241- #[ link_name="k20_iomem_PORTC" ] pub static PortC : Port ;
242- #[ link_name="k20_iomem_PORTD" ] pub static PortD : Port ;
243- #[ link_name="k20_iomem_PORTE" ] pub static PortE : Port ;
239+ #[ link_name="k20_iomem_PORTA" ] pub static PORT_A : Port ;
240+ #[ link_name="k20_iomem_PORTB" ] pub static PORT_B : Port ;
241+ #[ link_name="k20_iomem_PORTC" ] pub static PORT_C : Port ;
242+ #[ link_name="k20_iomem_PORTD" ] pub static PORT_D : Port ;
243+ #[ link_name="k20_iomem_PORTE" ] pub static PORT_E : Port ;
244244 }
245245
246246 ioregs ! ( Gpio = {
@@ -273,10 +273,10 @@ pub mod reg {
273273 } )
274274
275275 extern {
276- #[ link_name="k20_iomem_GPIOA" ] pub static GpioA : Gpio ;
277- #[ link_name="k20_iomem_GPIOB" ] pub static GpioB : Gpio ;
278- #[ link_name="k20_iomem_GPIOC" ] pub static GpioC : Gpio ;
279- #[ link_name="k20_iomem_GPIOD" ] pub static GpioD : Gpio ;
280- #[ link_name="k20_iomem_GPIOE" ] pub static GpioE : Gpio ;
276+ #[ link_name="k20_iomem_GPIOA" ] pub static GPIO_A : Gpio ;
277+ #[ link_name="k20_iomem_GPIOB" ] pub static GPIO_B : Gpio ;
278+ #[ link_name="k20_iomem_GPIOC" ] pub static GPIO_C : Gpio ;
279+ #[ link_name="k20_iomem_GPIOD" ] pub static GPIO_D : Gpio ;
280+ #[ link_name="k20_iomem_GPIOE" ] pub static GPIO_E : Gpio ;
281281 }
282282}
0 commit comments