Skip to content

Commit

Permalink
Fix build of Arduino STM32 CAN driver.
Browse files Browse the repository at this point in the history
It was broken by #644 which added a new feature for which there is no API on
the Arduino.
  • Loading branch information
balazsracz committed Feb 5, 2023
1 parent 8905b17 commit 3f3de53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/freertos_drivers/st/Stm32Can.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Stm32Can::Stm32Can(const char *name)
#endif
}

#ifndef ARDUINO
//
// Stm32Can::ioctl()
//
Expand All @@ -144,6 +145,7 @@ int Stm32Can::ioctl(File *file, unsigned long int key, unsigned long data)
}
return -EINVAL;
}
#endif

/** Enable use of the device.
*/
Expand Down
4 changes: 3 additions & 1 deletion src/freertos_drivers/st/Stm32Can.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ public:
static Stm32Can *instances[1];

private:
#ifndef ARDUINO
/// Request an ioctl transaction.
/// @param file file reference for this device
/// @param key ioctl key
/// @param data key data
/// @return >= 0 upon success, -errno upon failure
int ioctl(File *file, unsigned long int key, unsigned long data) override;

#endif

void enable() override; /**< function to enable device */
void disable() override; /**< function to disable device */
void tx_msg() override; /**< function to try and transmit a message */
Expand Down

0 comments on commit 3f3de53

Please sign in to comment.