mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
fix(px4_mtd): forward-declare the NuttX structs used in prototypes
px4_at24c_initialize() takes a struct i2c_master_s pointer. Without a declaration in scope the struct is local to the prototype, which is an error with -Werror on a target that does not include the NuttX I2C headers before px4_mtd.h. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
This commit is contained in:
1 parent
9e2711ae1a
commit
aa1724fa0c
1 file changed
+3
@@ -34,6 +34,9 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct i2c_master_s;
|
||||
struct mtd_dev_s;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define MAX_MTD_INSTANCES 5u
|
||||
|
||||
Reference in new issue
Block a user