mirror of https://github.com/ARMmbed/mbed-os.git
[NUCLEO_F072RB] Update gpio/port structures
Needed due to the new STM32Cube version used.pull/660/head
parent
d8e93f093f
commit
e449648cbc
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue