diff options
| author | Nathan Conrad <[email protected]> | 2019-09-25 12:17:49 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2019-09-25 12:46:35 -0400 |
| commit | 3a87dd65d735085845cbf799add77596cf737f44 (patch) | |
| tree | 361d61eedf0b85e4e2c2256ca0024b519f9a75e6 /examples/device | |
| parent | 2d4352bfe9d969c76374cd15c3332fbe9f98d66a (diff) | |
Change getting the capabilities structure to a callback instead of an extern struct.
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/usbtmc/src/usbtmc_app.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/device/usbtmc/src/usbtmc_app.c b/examples/device/usbtmc/src/usbtmc_app.c index d06014ce8..924a33fab 100644 --- a/examples/device/usbtmc/src/usbtmc_app.c +++ b/examples/device/usbtmc/src/usbtmc_app.c @@ -30,9 +30,9 @@ #include "main.h" #if (CFG_TUD_USBTMC_ENABLE_488) -usbtmc_response_capabilities_488_t const +static usbtmc_response_capabilities_488_t const #else -usbtmc_response_capabilities_t const +static usbtmc_response_capabilities_t const #endif tud_usbtmc_app_capabilities = { @@ -102,6 +102,16 @@ void tud_usbtmc_app_open_cb(uint8_t interface_id) tud_usbtmc_start_bus_read(); } +#if (CFG_TUD_USBTMC_ENABLE_488) +usbtmc_response_capabilities_488_t const * +#else +usbtmc_response_capabilities_t const * +#endif +tud_usbtmc_get_capabilities_cb() +{ + return &tud_usbtmc_app_capabilities; +} + bool tud_usbtmc_app_msg_trigger_cb(usbtmc_msg_generic_t* msg) { (void)msg; |
