mcp2515_driver.c
void enableRX(uint8_t _buff)
{
	pal_select_slave();

	pal_spi_send( MCP_BIT_MODIFY );
	pal_spi_send( CANINTF );
	switch(_buff)
	{
	case 0:
	pal_spi_send( (1<<RX0IF) );
	break;

	case 1:
	pal_spi_send( (1<<RX1IF) );
	break;
	}
	// clearing the interrupt flag and make the buffer available for incoming CAN data
	pal_spi_send( 0 );

	pal_deselect_slave();
}
/**
 * @brief This function makes available one the two receive buffer for available CAN data.
 * The  function clears the RXnIF flags for this purpose.
 *
 * @param
 * 1. _buff : the receive buffer number.
 *
 * @return
 * NOTHING
 */
@brief This function makes available one the two receive buffer for available CAN data.
The  function clears the RXnIF flags for this purpose.

@param
1. _buff : the receive buffer number.

@return
NOTHING
@brief This function makes available one the two receive buffer for available CAN data . The function clears the RXnIF flags for this purpose . @param 1 . _buff : the receive buffer number . @return NOTHING
void enableRX(uint8_t _buff)
{
	pal_select_slave();
	pal_spi_send( MCP_BIT_MODIFY );
	pal_spi_send( CANINTF );
	switch(_buff)
	{
	case 0:
	pal_spi_send( (1<<RX0IF) );
	break;
	case 1:
	pal_spi_send( (1<<RX1IF) );
	break;
	}
	pal_spi_send( 0 );
	pal_deselect_slave();
}
void enableRX ( uint8_t _buff ) { pal_select_slave ( ) ; pal_spi_send ( MCP_BIT_MODIFY ) ; pal_spi_send ( CANINTF ) ; switch ( _buff ) { case 0 : pal_spi_send ( ( 1 << RX0IF ) ) ; break ; case 1 : pal_spi_send ( ( 1 << RX1IF ) ) ; break ; } pal_spi_send ( 0 ) ; pal_deselect_slave ( ) ; }
@brief This function makes available one the two receive buffer for available CAN data.
@brief This function makes available one the two receive buffer for available CAN data .
// clearing the interrupt flag and make the buffer available for incoming CAN data