mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/: cleaned up the gross layering violation in atrf-xtal/atben.c
- include/atrf.h (atrf_ben_regs), lib/atrf.c (atrf_ben_regs), lib/driver.h (atben_regs), lib/atben.c (atben_regs): new function to get the mmap'ed registers in a less disgusting way - atrf-xtal/atben.c (base, ben_setup): cleaned up the horrible layering violation
This commit is contained in:
@@ -42,6 +42,16 @@ void *atrf_usb_handle(struct atrf_dsc *dsc)
|
||||
}
|
||||
|
||||
|
||||
void *atrf_ben_regs(struct atrf_dsc *dsc)
|
||||
{
|
||||
#ifdef HAVE_BEN
|
||||
return atben_regs(dsc->handle);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int atrf_error(struct atrf_dsc *dsc)
|
||||
{
|
||||
return dsc->driver->error ? dsc->driver->error(dsc->handle) : 0;
|
||||
|
||||
Reference in New Issue
Block a user