read 1 byte and detect end frame: done
This commit is contained in:
parent
649f9d2968
commit
5397036918
8
main.c
8
main.c
@ -104,12 +104,18 @@ void main(void)
|
|||||||
|
|
||||||
|
|
||||||
void resetTMR0(void){
|
void resetTMR0(void){
|
||||||
INTCONbits.TMR0IF = 0;
|
volatile uint8_t dummy;
|
||||||
|
dummy = EUSART1_Read();
|
||||||
|
|
||||||
|
|
||||||
TMR0_Reload();
|
TMR0_Reload();
|
||||||
TMR0_StartTimer();
|
TMR0_StartTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void endFrame(void){
|
void endFrame(void){
|
||||||
|
|
||||||
|
|
||||||
|
INTCONbits.TMR0IF = 0;
|
||||||
TMR0_StopTimer();
|
TMR0_StopTimer();
|
||||||
modbus_analyse_and_answer();
|
modbus_analyse_and_answer();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user