Skip to content

Commit cdca137

Browse files
author
Steve Cartmell
committed
Fix compiler warning for deprecated function call
Replaced the deprecated function call .attach() with an assignment
1 parent 1c94828 commit cdca137

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/CAN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CAN::CAN(PinName rd, PinName td, int hz) : _can(), _irq() {
3838
// No lock needed in constructor
3939

4040
for (size_t i = 0; i < sizeof _irq / sizeof _irq[0]; i++) {
41-
_irq[i].attach(donothing);
41+
_irq[i] = callback(donothing);
4242
}
4343

4444
can_init_freq(&_can, rd, td, hz);

0 commit comments

Comments
 (0)