L
Lox
Hello
I would like to make a macro that does the following:
If i write:
BACKUP(X);
it should expand to:
copy((u8_t *)&place.X_work, (u8_t *)&place.X_backup,
sizeof(X_work_t));
How do i make the macro
This does not work:
#define BACKUP(x) nv_copy((u8_t *)&place.##block##_work, (u8_t
*)&place.##block##_backup, sizeof( ##block##_t))
Thank you.
I would like to make a macro that does the following:
If i write:
BACKUP(X);
it should expand to:
copy((u8_t *)&place.X_work, (u8_t *)&place.X_backup,
sizeof(X_work_t));
How do i make the macro
This does not work:
#define BACKUP(x) nv_copy((u8_t *)&place.##block##_work, (u8_t
*)&place.##block##_backup, sizeof( ##block##_t))
Thank you.