Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

treat_inlines and #defines

40 views
Skip to first unread message

Rob Lepage

unread,
May 7, 2024, 10:35:14 AM5/7/24
to ThrowTheSwitch Forums
I've been exploring :treat_inlines: to mock the stm32l4xx_ll_gpio driver from STMicro.

ceedling version
  Ceedling => 0.32.0
     CMock => 2.5.4
     Unity => 2.6.0
CException => 1.3.4

I have things basically working to convert and mock the __STATIC_INLINE functions, but many of the functions take parameter values that are #defined in the header file.

The build/mocks/stm32l4xx_ll_gpio.h copy of the original header contains declarations for the converted __STATIC_INLINE functions, but the #defines from the original header are stripped out.  I want to make my test calls with the expected defined values and was expecting these would be available in the mock driver.

My file under test (outputs.c), an example test file (with the needed #defines manually added directly to the test file) and my project.yml are attached.

Am I missing something?  Thoughts, suggestions?

Thanks,
-Rob
outputs.c
test_outputs_Enable.c
project.yml
Reply all
Reply to author
Forward
0 new messages