EasyManua.ls Logo

Elprotronic MSP430 - Page 114

Default Icon
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
//make sure the Vcc is ON -place required instruction to supply the Vcc
//put UART Tx message to data buffer
for(k=0; k<Tx_size; k++ ) //max TX size - 56
F_Put_Byte_to_Buffer( UART_BUFFER_START_ADDR+k, *(TxData+k));
//put Tx_size and Rx_size to data buffer
F_Put_Byte_to_Buffer( UART_TX_SIZE_ADDR, Tx_size );
F_Put_Byte_to_Buffer( UART_RX_SIZE_ADDR, 0 );
//Send/Receive message via UART
if ( speed == CUSTOM_FUNCTION_UART_9600 )
response = F_Custom_Function( CUSTOM_FUNCTION_UART_9600 );
else
response = F_Custom_Function( CUSTOM_FUNCTION_UART_57K6 );
// get Rx message
if ( Rx_size > 0 )
{
for(k=0; k<Rx_size; k++ )
*(RxData+k) = (BYTE)(0xFF & F_Get_Byte_from_Buffer( UART_BUFFER_START_ADDR+k ));
}
return(response);
}
114

Table of Contents