ardnew/INA260-STM32-HAL

unknown type name ‘HAL_StatusTypeDef’

Opened this issue · 1 comments

In file included from ina260.c:15:
ina260.h:44:9: error: unknown type name ‘HAL_StatusTypeDef’

That typedef is provided by the STM32 firmware package for your particular MCU. It is not a type defined by this INA260-STM32-HAL library.

You probably just need to ensure your MCU's HAL is being included by the INA260-STM32-HAL library. It currently only detects a very small number of STM32 devcices to serve as an example on what users like yourself need to change to add support for their board. See the following lines:

#if defined (STM32L476xx)
#include "stm32l4xx_hal.h"
#elif defined(STM32F072xx)
#include "stm32f0xx_hal.h"
#elif defined(STM32F401xx)
#include "stm32f4xx_hal.h"
#elif defined(STM32G431xx)
#include "stm32g4xx_hal.h"
#elif defined(STM32G031xx)
#include "stm32g0xx_hal.h"
#endif

If your device is not listed there, then that is likely the culprit. Add an entry for your MCU, and also add an #include directive for your device's HAL driver.

If this doesn't resolve your issue, please provide some detail with your question:

  • What board/MCU are you using?
  • What version of its HAL driver?
  • What is your development environment or build procedure?

You typically shouldn't expect helpful responses unless you demonstrate you've made even the tiniest effort to solve the problem on your own.