mcp2515_driver.c
uint8_t canIsFreeTX(uint8_t _buff)
{
	pal_select_slave();
	pal_spi_send(MCP_READ);
	pal_spi_send( TXBnCTRL(_buff) );
	uint8_t tx=pal_spi_read();
	pal_deselect_slave();
	if( ( tx & (1<<TXREQ) ) )
		return 0;
	else
		return 1;
}
/**
 * @brief This function gets the state of one of the transmit buffers. It informs whether the buffer is occupied or not.
 *
 * @param
 * 1. _buff : the buffer number.
 *
 * @return
 * 1 : IF THE BUFFER IS AVAILABLE
 * 2 : IF THE BUFFER IS NOT AVAILABLE
 */
@brief This function gets the state of one of the transmit buffers. It informs whether the buffer is occupied or not.
@param
1. _buff : the buffer number.


@brief This function gets the state of one of the transmit buffers . It informs whether the buffer is occupied or not . @param 1 . _buff : the buffer number .
uint8_t canIsFreeTX(uint8_t _buff)
{
	pal_select_slave();
	pal_spi_send(MCP_READ);
	pal_spi_send( TXBnCTRL(_buff) );
	uint8_t tx=pal_spi_read();
	pal_deselect_slave();
	if( ( tx & (1<<TXREQ) ) )
		return 0;
	else
		return 1;
}
uint8_t canIsFreeTX ( uint8_t _buff ) { pal_select_slave ( ) ; pal_spi_send ( MCP_READ ) ; pal_spi_send ( TXBnCTRL ( _buff ) ) ; uint8_t tx = pal_spi_read ( ) ; pal_deselect_slave ( ) ; if ( ( tx & ( 1 << TXREQ ) ) ) return 0 ; else return 1 ; }
@brief This function gets the state of one of the transmit buffers.
@brief This function gets the state of one of the transmit buffers .