ctucan_set_btr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ctucan_set_btr β€” like, the bit timing plug for CTU CAN FD πŸ¦‹

okay so bestie, welcome to the kernel API manual β€” this is ctucan_set_btr(9), and honestly? it's giving "small function, big responsibility" energy. ✨ It sets the CAN bus bit timing in CTU CAN FD. That's the whole vibe. No cap.


🌸 SYNOPSIS 🌸

int ctucan_set_btr (struct net_device *ndev , struct can_bittiming *bt ,
bool nominal );

literally just three args and an int coming back at you. iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • ndev β€” pointer to the net_device structure. your main character netdev, hi bestie 🫢
  • bt β€” pointer to the Bit timing structure. this is where the actual timing tea lives πŸ’–
  • nominal β€” true means Nominal bit timing, false means Data bit timing. pick your fighter, both are valid πŸ‘‘

⭐ RETURN ⭐

  • 0 β€” OK! we slayed, everything worked πŸ’…
  • -EPERM β€” returned if the controller is enabled. yep, that's a hard no from the hardware, sorry bestie 😭
no cap, that -EPERM is a real "not me trying to set timing on an already-running controller" moment. respect the gate.

🌈 SEE ALSO 🌈

okay this list is long but every single one of these is invited to the group chat, fr fr:

iykyk πŸ’œ


and that's the whole page bestie β€” brought to you by the source/version at ./drivers/net/can/ctucanfd, dated October 2026. go forth and set those bit timings πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from