GPIOv1/v2 PAL #defines
Posted: Wed May 08, 2013 1:56 pm
I was getting the FSMC driver from ChibiOS/GFX to work on a Hy-MINI STM32V and while I got the demos going (see http://imgur.com/5VGJBef) I ran into a couple of roadblocks along the way, mainly to do with the PAL differences:
I took SSD1289/gdisp_lld_board_example_fsmc.h and modified it
- what is meant to define STM32F1XX? I ended up defining it in my board.h but I'm not sure of the right place for it to go
- the original code has
palSetBusMode(&busD, PAL_MODE_ALTERNATE(12));
palSetBusMode(&busE, PAL_MODE_ALTERNATE(12));
but for GPIOv1, I needed
palSetBusMode(&busD, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetBusMode(&busE, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
I'm not sure what the accepted way of writing things that are portable across the two GPIO interfaces is.
I took SSD1289/gdisp_lld_board_example_fsmc.h and modified it
- what is meant to define STM32F1XX? I ended up defining it in my board.h but I'm not sure of the right place for it to go
- the original code has
palSetBusMode(&busD, PAL_MODE_ALTERNATE(12));
palSetBusMode(&busE, PAL_MODE_ALTERNATE(12));
but for GPIOv1, I needed
palSetBusMode(&busD, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetBusMode(&busE, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
I'm not sure what the accepted way of writing things that are portable across the two GPIO interfaces is.