I am working on an Embedded C project for which I am currently writing unit tests. I am using the fff mocking framework, which essentially creates fake function calls which should overload hardware specific calls.
When I create a 'fake function' I get an error stating that
Address of overloaded function does not match required type 'void()'
This is happening every time I attempt to create a Fake. I am primarily an embedded C programmer, and only using elements of C++ for the purposes of unit testing. I don't really understand what this message is telling me or why it is a problem. If anyone could offer any insight, I would be very grateful.
The code in question is shown below. The error is highlighted on the function names: xTaskCreate, HAL_TIM_Base_Init and HAL_TIM_ConfigClockSource.
#include <TinyEmbeddedTest.h>
#include <stdio.h>
#include "stm32f1xx_hal.h"
#include "FreeRTOS.h"
#include "task.h"
#include "fff.h"
#include "heater.c" //source file being tested
DEFINE_FFF_GLOBALS;
FAKE_VALUE_FUNC(BaseType_t, xTaskCreate, TaskFunction_t, char *, configSTACK_DEPTH_TYPE, void *, UBaseType_t, TaskHandle_t *);
FAKE_VALUE_FUNC(HAL_StatusTypeDef, HAL_TIM_Base_Init, TIM_HandleTypeDef);
FAKE_VALUE_FUNC(HAL_StatusTypeDef, HAL_TIM_ConfigClockSource, TIM_HandleTypeDef, TIM_ClockConfigTypeDef*);