AppBridge.h 786 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * @file AppBridge.h
  3. * @brief Declaration of high-level logic of nBusBridge. This is the application entry point.
  4. * @date Nov 28, 2025
  5. * @author Juraj Dudak, Matus Necas
  6. */
  7. #ifndef SRC_APPBRIDGE_H_
  8. #define SRC_APPBRIDGE_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. #define PAYLOAD_SIZE 128
  19. #define META_SIZE 5
  20. #define BUFF_SIZE (PAYLOAD_SIZE + META_SIZE)*2
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. typedef enum {
  26. STATE_WAIT_LEN,
  27. STATE_PAYLOAD,
  28. } ProtocolState;
  29. void app(UART_HandleTypeDef *, UART_HandleTypeDef *);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* SRC_APPBRIDGE_H_ */