/* Create an ISR which is called whenever the timer has expired. This function
* must then call pxMBPortCBTimerExpired( ) to notify the protocol stack that
* the timer has expired.
*/
static void prvvTIMERExpiredISR( void ) interrupt 1
{
// ( void )pxMBPortCBTimerExpired( );²»ÄÜÖ±½Óµ÷ÓÃ
if(eMBCurrentMode==MB_RTU)
{
xMBRTUTimerT35Expired();
}
else if(eMBCurrentMode==MB_ASCII)
{
xMBASCIITimerT1SExpired();
}
}
/* Create an interrupt handler for the transmit buffer empty interrupt
* (or an equivalent) for your target processor. This function should then
* call pxMBFrameCBTransmitterEmpty( ) which tells the protocol stack that
* a new character can be sent. The protocol stack will then call
* xMBPortSerialPutByte( ) to send the character.
*/
static void prvvUARTTxReadyISR( void )
//×ÜÏß·¢ËͳÌÐòºó×Ô¶¯µ÷Óà ¸Ä ÖжϷþÎñ
{
/* Create an interrupt handler for the receive interrupt for your target
* processor. This function should then call pxMBFrameCBByteReceived( ). The
* protocol stack will then call xMBPortSerialGetByte( ) to retrieve the
* character.
*/
static void prvvUARTRxISR( void )
{
if(eMBCurrentMode==MB_RTU){
xMBRTUReceiveFSM();
}else if(eMBCurrentMode==MB_ASCII){
xMBASCIIReceiveFSM();
}
}