nbus_structs.h 705 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * @file nbus_structs.h
  3. *
  4. * @date: Mar 7, 2025
  5. * @author: Juraj Dudak
  6. */
  7. #ifndef INC_NBUS_STRUCTS_H_
  8. #define INC_NBUS_STRUCTS_H_
  9. #if defined(STM32F401xC) || defined(STM32F401xE)
  10. #include "stm32f4xx_hal.h"
  11. #endif
  12. #if defined (STM32L432xx)
  13. #include "stm32l4xx_hal.h"
  14. #endif
  15. #if defined (STM32L031xx) || defined (STM32L082xx)
  16. #include "stm32l0xx_hal.h"
  17. #endif
  18. typedef enum {
  19. FC_FIND = 0,
  20. FC_ECHO,
  21. FC_STOP,
  22. FC_START,
  23. FC_PARAM,
  24. FC_SENSOR_CNT,
  25. FC_SLEEP,
  26. FC_WAKEUP,
  27. FC_CALIBRATE,
  28. FC_RESET,
  29. FC_STORE,
  30. FC_DATA,
  31. FC_SYNC,
  32. FC_SENSOR_TYPE,
  33. FC_INFO,
  34. FC_SENSOR_FORMAT,
  35. }Nbus_FC_e;
  36. typedef struct {
  37. uint8_t ma;
  38. uint8_t sa;
  39. Nbus_FC_e fc;
  40. }Nbus_pdu;
  41. #endif /* INC_NBUS_STRUCTS_H_ */