123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef _PORT_H
- #define _PORT_H
- //#include "main.h"
- #include "at32f403a_407.h"
- #include "FreeRTOS.h"
- #include "task.h"
- /* ----------------------- Defines ------------------------------------------*/
- #define INLINE inline
- #define PR_BEGIN_EXTERN_C extern "C" {
- #define PR_END_EXTERN_C }
- #define ENTER_CRITICAL_SECTION( ) vMBPortEnterCritical()
- #define EXIT_CRITICAL_SECTION( ) vMBPortExitCritical()
- #define assert( x )
- typedef char BOOL;
- typedef unsigned char UCHAR;
- typedef char CHAR;
- typedef unsigned short USHORT;
- typedef short SHORT;
- typedef unsigned long ULONG;
- typedef long LONG;
- //typedef enum {FALSE = 0, TRUE = !FALSE} confirm_state;
- /*
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef FALSE
- #define FALSE 0
- #endif
- */
- #define MB_PORT_HAS_CLOSE 1
- #define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS 2
- /* ----------------------- Prototypes ---------------------------------------*/
- void vMBPortSetWithinException( BOOL bInException );
- BOOL bMBPortIsWithinException( void );
- void vMBPortEnterCritical( void );
- void vMBPortExitCritical( void );
- void vMB_USART_IRQHandler(void);
- #endif
|