mcp2515_driver.c
void canSetBitTiming(unsigned char _cnf1, unsigned char _cnf2, unsigned char _cnf3)
{
	// selecting the MCP2515 chip using slave select line.
	pal_select_slave();
	// sending the write command
	pal_spi_send(MCP_WRITE);
	// sending the starting address for write command
	pal_spi_send(CNF3);
	//sending the data
	pal_spi_send(_cnf3);
	pal_spi_send(_cnf2);
	pal_spi_send(_cnf1);
	// de selecting the MCP2515 chip using slave select line
	pal_deselect_slave();
}
/**
 * @brief This function sets the bit timing of the can bus chip by writing to the CNFn control registers.
 *
 * @param
 * 1. cnf1 : CNF1 register content
 * 2. cnf2 : CNF2 register content
 * 3. cnf3 : CNF3 register content
 *
 * @return
 * 		NOTHING
 */
@brief This function sets the bit timing of the can bus chip by writing to the CNFn control registers.
@param
1. cnf1 : CNF1 register content
2. cnf2 : CNF2 register content
3. cnf3 : CNF3 register content

@return
NOTHING
@brief This function sets the bit timing of the can bus chip by writing to the CNFn control registers . @param 1 . cnf1 : CNF1 register content 2 . cnf2 : CNF2 register content 3 . cnf3 : CNF3 register content @return NOTHING
void canSetBitTiming(unsigned char _cnf1, unsigned char _cnf2, unsigned char _cnf3)
{
	pal_select_slave();
	pal_spi_send(MCP_WRITE);
	pal_spi_send(CNF3);
	pal_spi_send(_cnf3);
	pal_spi_send(_cnf2);
	pal_spi_send(_cnf1);
	pal_deselect_slave();
}
void canSetBitTiming ( unsigned char _cnf1 , unsigned char _cnf2 , unsigned char _cnf3 ) { pal_select_slave ( ) ; pal_spi_send ( MCP_WRITE ) ; pal_spi_send ( CNF3 ) ; pal_spi_send ( _cnf3 ) ; pal_spi_send ( _cnf2 ) ; pal_spi_send ( _cnf1 ) ; pal_deselect_slave ( ) ; }
@brief This function sets the bit timing of the can bus chip by writing to the CNFn control registers.
@brief This function sets the bit timing of the can bus chip by writing to the CNFn control registers .
// selecting the MCP2515 chip using slave select line. // sending the write command // sending the starting address for write command //sending the data // de selecting the MCP2515 chip using slave select line