Hello!
There's some more options on the STM32 than on AVR and it's described in the reference manual (RM0008). But in short, there's four bits in a configuration register and, for pull-up/down, one bit in the ODR-register for each port pin.
The two lower bits in the configuration register are (from RM0008)
00: Input mode (reset state)
01: Output mode, max speed 10 MHz.
10: Output mode, max speed 2 MHz.
11: Output mode, max speed 50 MHz
and the upper two are
In input mode (MODE[1:0]=00):
00: Analog mode
01: Floating input (reset state)
10: Input with pull-up / pull-down
11: Reserved
In output mode (MODE[1:0] >00):
00: General purpose output push-pull
01: General purpose output Open-drain
10: Alternate function output Push-pull
11: Alternate function output Open-drain
If you, for example, want a port to be output push-pull max speed 10MHz, the bits will be 0001 in binary. Four bits corresponds to one hexadecimal digit, 0x1 in this case. To set GPIOA in this mode you can write (in recent versions of libmaple)
GPIOA->regs->CRL = 0x11111111; // Configure GPIOA[7:0]
GPIOA->regs->CRH = 0x11111111; // Configure GPIOA[15:8]
(each hexadecimal digit corresponds to one port pin)
To set GPIOA to input with pull-up enabled the four CR-bits will be 0b1000 which is 0x8 in hex and the ODR-register should be set to all 1's (zeros for pull-down).
GPIOA->regs->CRL = 0x88888888;
GPIOA->regs->CRH = 0x88888888;
GPIOA->regs->ODR = 0xFFFF;
So it's not that straight forward as on AVR's.