stm32_gpio_setup_t pinout porting

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
Debbio
Posts: 16
Joined: Fri Jan 11, 2013 10:42 am

stm32_gpio_setup_t pinout porting

Post by Debbio »

Good morning,
For a while i used to work with old chibios version let's say 2.5 where for pad initialization we have :

Code: Select all

typedef struct {
  /** Initial value for MODER register.*/
  uint32_t              moder;
  /** Initial value for OTYPER register.*/
  uint32_t              otyper;
  /** Initial value for OSPEEDR register.*/
  uint32_t              ospeedr;
  /** Initial value for PUPDR register.*/
  uint32_t              pupdr;
  /** Initial value for ODR register.*/
  uint32_t              odr;
  /** Initial value for AFRL register.*/
  uint32_t              afrl;
  /** Initial value for AFRH register.*/
  uint32_t              afrh;
} stm32_gpio_setup_t;


Now i moved to major version 3 and i found that the same struct is :

Code: Select all

typedef struct {
  /** Initial value for ODR register.*/
  uint32_t      odr;
  /** Initial value for CRL register.*/
  uint32_t      crl;
  /** Initial value for CRH register.*/
  uint32_t      crh;
} stm32_gpio_setup_t;


My question is , presuming i did not missed some part of the struct, how can easy rewrite old pinout config to the new style without rewriting all by hand.
By old pinout config i mean the board.h generated by xml eclipse plugin, maybe there is a new plugin ?

Thanks for your attention.
Matteo.
Post Reply