mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
drivers/can/mcp2515.c: mcp2515 driver optimizations.
This commit is contained in:
committed by
Gregory Nutt
parent
7d112f5639
commit
ca5d940b7a
@@ -571,7 +571,7 @@ struct can_dev_s
|
||||
uint8_t cd_npendrtr; /* Number of pending RTR messages */
|
||||
volatile uint8_t cd_ntxwaiters; /* Number of threads waiting to enqueue a message */
|
||||
volatile uint8_t cd_nrxwaiters; /* Number of threads waiting to receive a message */
|
||||
struct list_node cd_readers;
|
||||
struct list_node cd_readers; /* Number of readers */
|
||||
#ifdef CONFIG_CAN_ERRORS
|
||||
uint8_t cd_error; /* Flags to indicate internal device errors */
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
|
||||
/* SPI BUS PARAMETERS *******************************************************/
|
||||
|
||||
#define MCP2515_SPI_FREQUENCY (1000000) /* 1 MHz */
|
||||
#define MCP2515_SPI_MODE (SPIDEV_MODE0) /* Device uses SPI Mode 0: CPOL=0, CPHA=0 */
|
||||
|
||||
/****************************************************************************
|
||||
@@ -86,10 +85,6 @@ struct mcp2515_config_s
|
||||
uint8_t devid; /* MCP2515 device ID */
|
||||
uint8_t mode; /* See enum mcp2515_canmod_e */
|
||||
uint8_t nfilters; /* Number of standard/extended filters */
|
||||
uint8_t ntxbuffers; /* Number of TX Buffer available */
|
||||
uint8_t txbuf0[10]; /* Transmit Buffer 0 */
|
||||
uint8_t txbuf1[10]; /* Transmit Buffer 1 */
|
||||
uint8_t txbuf2[10]; /* Transmit Buffer 2 */
|
||||
#ifdef MCP2515_LOOPBACK
|
||||
bool loopback; /* True: Loopback mode */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user