Fix compiler warning for deprecated function call

Replaced the deprecated function call .attach() with an assignment
pull/4900/head
Steve Cartmell 2017-08-14 12:10:31 +01:00
parent 1c948283be
commit cdca13798b
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ CAN::CAN(PinName rd, PinName td, int hz) : _can(), _irq() {
// No lock needed in constructor
for (size_t i = 0; i < sizeof _irq / sizeof _irq[0]; i++) {
_irq[i].attach(donothing);
_irq[i] = callback(donothing);
}
can_init_freq(&_can, rd, td, hz);