Add iomux_from_timers() function to recover an IOMux from
the associated UCTimers
This commit is contained in:
@@ -168,3 +168,8 @@ struct UCTimers *iomux_get_timers(struct IOMux *mux)
|
||||
return &mux->timers;
|
||||
}
|
||||
|
||||
struct IOMux *iomux_from_timers(struct UCTimers *timers)
|
||||
{
|
||||
return (struct IOMux*)timers; //timers is the 1. member of IOMux
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ struct IOMuxOps {
|
||||
};
|
||||
|
||||
struct IOMux {
|
||||
/* TImer instance */
|
||||
/* TImer instance - must be the 1. member*/
|
||||
struct UCTimers timers;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user