Corrected comments that didn't convert well automatically and caused syntax errors.
This commit is contained in:
@@ -43,7 +43,8 @@ uint32_t RS485_Baud_Rate = 9600;
|
||||
/* the ISR and other use this for status and control */
|
||||
COMSTAT RS485_Comstat;
|
||||
|
||||
/*#pragma udata MSTPPortData
|
||||
/*#pragma udata MSTPPortData
|
||||
*/
|
||||
/* the buffer for receiving characters */
|
||||
volatile uint8_t RS485_Rx_Buffer[MAX_MPDU];
|
||||
|
||||
@@ -86,14 +87,15 @@ void RS485_Send_Frame(volatile struct mstp_port_struct_t *mstp_port, /* port
|
||||
};
|
||||
|
||||
RS485_Comstat.TxHead = 0;
|
||||
RS485_Comstat.TxHead = 0;
|
||||
memcpy((void *) &RS485_Tx_Buffer[0], (void *) buffer, nbytes);
|
||||
|
||||
/*for (i = 0; i < nbytes; i++) {
|
||||
*/
|
||||
/* /* put the data into the buffer */
|
||||
*/
|
||||
/* RS485_Tx_Buffer[i] = *buffer;
|
||||
memcpy((void *) &RS485_Tx_Buffer[0], (void *) buffer, nbytes);
|
||||
#if 0
|
||||
for (i = 0; i < nbytes; i++) {
|
||||
/* put the data into the buffer */
|
||||
RS485_Tx_Buffer[i] = *buffer;
|
||||
buffer++;
|
||||
}
|
||||
#endif
|
||||
RS485_Comstat.Tx_Bytes = nbytes;
|
||||
/* disable the receiver */
|
||||
PIE3bits.RC2IE = 0;
|
||||
RCSTA2bits.CREN = 0;
|
||||
@@ -198,7 +200,8 @@ void RS485_Interrupt_Tx(void)
|
||||
/* enable the receiver */
|
||||
RS485_TX_ENABLE = 0;
|
||||
RS485_RX_DISABLE = 0;
|
||||
while (!TXSTA2bits.TRMT);
|
||||
/* FIXME: might not be necessary
|
||||
*/
|
||||
PIE3bits.RC2IE = 1;
|
||||
RCSTA2bits.CREN = 1;
|
||||
}
|
||||
@@ -346,7 +349,7 @@ void RS485_Disable_Port(void)
|
||||
|
||||
void RS485_Reinit(void)
|
||||
{
|
||||
RCSTA2 &= 0x4F; /* Disable the receiver */
|
||||
RS485_Set_Baud_Rate(38400);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user