port.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _PORT_H
  2. #define _PORT_H
  3. //#include "main.h"
  4. #include "at32f403a_407.h"
  5. #include "FreeRTOS.h"
  6. #include "task.h"
  7. /* ----------------------- Defines ------------------------------------------*/
  8. #define INLINE inline
  9. #define PR_BEGIN_EXTERN_C extern "C" {
  10. #define PR_END_EXTERN_C }
  11. #define ENTER_CRITICAL_SECTION( ) vMBPortEnterCritical()
  12. #define EXIT_CRITICAL_SECTION( ) vMBPortExitCritical()
  13. #define assert( x )
  14. typedef char BOOL;
  15. typedef unsigned char UCHAR;
  16. typedef char CHAR;
  17. typedef unsigned short USHORT;
  18. typedef short SHORT;
  19. typedef unsigned long ULONG;
  20. typedef long LONG;
  21. #define MB_PORT_HAS_CLOSE 1
  22. #define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS 2
  23. /* ----------------------- Prototypes ---------------------------------------*/
  24. void vMBPortSetWithinException( BOOL bInException );
  25. BOOL bMBPortIsWithinException( void );
  26. void vMBPortEnterCritical( void );
  27. void vMBPortExitCritical( void );
  28. void vMB_USART_IRQHandler(void);
  29. #endif