In Controls options, open the A-10C controls list, bottom left is a modifiers button, click that, select Joystick from the drop down list and hit the paddle (joystick Button 4) to set it as a modifier,
Now go to the trim control under joystick, click the box to enter a button, and while holding the paddle press the hat direction you want to use as the trim