It worked perfectly!
About the H-bridge, it has 2 PWM inputs and 2 'direction' inputs (it is made with 4 TC4422/21 MOSFET drivers, a 74LS04 and a 74LS08), so I put all the four signals to 0 with these lines in the main method:
*(PORT_TO_DDR(PORTB)) |= 0x1E;
PORTB &= 0xE1;
(the signals are tied to PORTB1..4, pins 2..5)