michallenc commented on code in PR #13127: URL: https://github.com/apache/nuttx/pull/13127#discussion_r1731278279
########## include/nuttx/can/can.h: ########## @@ -438,6 +493,30 @@ #define CAN_FILTER_DUAL 1 /* Dual address match */ #define CAN_FILTER_RANGE 2 /* Match a range of addresses */ +/* the state is default state. Indicates that the can controller is closed */ + +#define CAN_STATE_STOP 0 + +/* Indicates that the can controller is in the awake state */ + +#define CAN_STATE_START 1 Review Comment: Yes, but the controller can be in more states than just two. Take a look at `can_state` enum in SocketCAN https://elixir.bootlin.com/linux/v6.10.6/source/include/uapi/linux/can/netlink.h#L69 That also applies to the previous comment about stopping and starting the controller with `CAN_STATE_`. I am not sure if it is a good API as the name suggests you are getting some information from the controller, not commanding it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
