UART receive delayed 1 char

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART receive delayed 1 char

440件の閲覧回数
erikmalund
Contributor I

In processing with the below I see that a character received does not trigger the calls till the next character is received.

another way of explaining if only one character is received from start no calls are made.  then when another character is received either (both) links are called and pointing to the first character

     Settings    :

**         Serial channel              : UART1

**       Protocol

** Width : 8 bits

**             Stop bits               : 1

**             Parity                  : none

**             Breaks                  : Disabled

**             Input buffer size       : 1

**             Output buffer size      : 64

**         Registers

**         Input interrupt

** Vector name : INT_UART1

**             Priority                : 2

**         Output interrupt

**             Vector name             : INT_UART1

**             Priority                 2

Code transfer from events to
particular module

void BT_UART_OnRxChar(void)

{

  /* Write your code here ... */

  BtProcessUARTrxChar();

}

void BT_UART_OnFullRxBuf(void)

{

  /* Write your code here ... */

  BtProcessUARTrxBufFull();

}

Processed here

byte blah;

void BtProcessUARTrxBufFull(void)

{

  BT_UART_RecvBlock(&BtRecvByt, 1, &BtRecvCount);

  if (BtRecvByt == 3) // the last character in the record is 0x03 a breakpoint will click when it comes

  {

    blah = 0;

  } 

  if (BtRecvByt != 0)

  {

    blah = 0; // a means of seeing that other characters are processed HERE

  }  

}

void BtProcessUARTrxChar(void)

{

  if (BtRecvByt == 3)

  {

    blah = 0; // the last character in the record is 0x03 a breakpoint will click when it comes

  }

  if (BtRecvByt != 0)

  {

    blah = 0;  // a means of seeing that other characters are processed HERE

  }   

}

タグ(1)
0 件の賞賛
0 返答(返信)