Jump to content
 

mehmetozdemir

New Member
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mehmetozdemir

  • Rank
    Newbie
  1. and in the eusart.c file there is another function "EUSART2_RxDataHandler" can you explain how this works? void EUSART2_RxDataHandler(void){ // use this default receive interrupt handler code eusart2RxBuffer[eusart2RxHead++] = RCREG2; if(sizeof(eusart2RxBuffer) <= eusart2RxHead) { eusart2RxHead = 0; } eusart2RxCount++; } and "EUSART2_Read" function seems very complicated uint8_t EUSART2_Read(void) { uint8_t readValue = 0; while(0 == eusart2RxCount) { } eusart2RxLastError = eusart2RxStatusBuffer[eusart2RxTail]; readValue = eusart2RxBuffer[eusart2RxTail++]; if(sizeof(eusart2RxBuffer) <= eusart2RxTail) { eusart2RxTail = 0; } PIE3bits.RC2IE = 0; eusart2RxCount--; PIE3bits.RC2IE = 1; return readValue; }
×
×
  • Create New...