Kconfig 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. config RT_USING_CAN
  2. bool "Using CAN device drivers"
  3. default n
  4. help
  5. Enable this option to include the CAN device driver framework.
  6. if RT_USING_CAN
  7. config RT_CAN_USING_HDR
  8. bool "Enable CAN hardware filter support"
  9. default n
  10. help
  11. If your CAN controller supports hardware filtering, and you want to
  12. use the framework to configure these filters, enable this option.
  13. config RT_CAN_USING_CANFD
  14. bool "Enable CAN-FD support"
  15. default n
  16. help
  17. Enable this to support CAN with Flexible Data-Rate. This will
  18. increase the size of the rt_can_msg structure.
  19. config RT_CANMSG_BOX_SZ
  20. int "Software RX message box size (in messages)"
  21. default 16
  22. help
  23. This sets the capacity of the software buffer (FIFO) for incoming
  24. CAN messages. It defines how many messages can be buffered by the
  25. driver before the application must read them.
  26. config RT_CANSND_BOX_NUM
  27. int "Number of mailboxes for blocking send"
  28. default 1
  29. help
  30. This sets the number of concurrent blocking send operations that
  31. can be in flight. It is typically matched to the number of
  32. hardware transmission mailboxes on the CAN controller.
  33. config RT_CANSND_MSG_TIMEOUT
  34. int "Timeout for blocking send (in OS ticks)"
  35. default 100
  36. help
  37. This sets the default time a thread will wait for a hardware
  38. mailbox to become available when sending in blocking mode.
  39. config RT_CAN_NB_TX_FIFO_SIZE
  40. int "Non-blocking send buffer size (in bytes)"
  41. default 256
  42. help
  43. This defines the size of the software ring buffer used for
  44. non-blocking and ISR-based transmissions. When the hardware
  45. mailboxes are full, outgoing messages are temporarily stored
  46. in this buffer.
  47. To calculate a suitable size, use:
  48. (number of messages to buffer) * sizeof(struct rt_can_msg).
  49. For standard CAN, sizeof(struct rt_can_msg) is typically 16 bytes.
  50. The default of 256 bytes can buffer 16 standard CAN messages.
  51. If using CAN-FD, you will need to increase this size significantly.
  52. config RT_CAN_MALLOC_NB_TX_BUFFER
  53. bool "Dynamically allocate the non-blocking send buffer"
  54. depends on RT_USING_HEAP
  55. default n
  56. help
  57. If this option is enabled (y), the non-blocking send buffer will
  58. be allocated from the system heap at runtime when the CAN device
  59. is opened (using rt_malloc). This saves static RAM but requires
  60. a heap to be available.
  61. If this option is disabled (n), the buffer will be allocated
  62. as a static array within the rt_can_device structure. This
  63. consumes static RAM but guarantees the memory is always available
  64. and avoids heap fragmentation.
  65. endif