[NUCLEO_F072RB] Update gpio/port structures

Needed due to the new STM32Cube version used.
pull/660/head
bcostm 2014-11-06 10:26:20 +01:00
parent d8e93f093f
commit e449648cbc
3 changed files with 7 additions and 7 deletions

View File

@ -57,8 +57,8 @@ void gpio_init(gpio_t *obj, PinName pin) {
// Fill GPIO object structure for future use
obj->mask = gpio_set(pin);
obj->reg_in = &gpio->IDR;
obj->reg_set = &gpio->BSRRL;
obj->reg_clr = &gpio->BSRRH;
obj->reg_set = &gpio->BSRR;
obj->reg_clr = &gpio->BRR;
}
void gpio_mode(gpio_t *obj, PinMode mode) {

View File

@ -43,9 +43,9 @@ extern "C" {
typedef struct {
PinName pin;
uint32_t mask;
__IO uint16_t *reg_in;
__IO uint16_t *reg_set;
__IO uint16_t *reg_clr;
__IO uint32_t *reg_in;
__IO uint32_t *reg_set;
__IO uint32_t *reg_clr;
} gpio_t;
static inline void gpio_write(gpio_t *obj, int value) {

View File

@ -50,8 +50,8 @@ struct port_s {
PortName port;
uint32_t mask;
PinDirection direction;
__IO uint16_t *reg_in;
__IO uint16_t *reg_out;
__IO uint32_t *reg_in;
__IO uint32_t *reg_out;
};
struct analogin_s {