caffeine-hal 0.6.6
A Header-Defined Interface c library, it provides the hal layer for the Caffeine framework
Loading...
Searching...
No Matches
cfn_hal_usb.h
Go to the documentation of this file.
1
29#ifndef CAFFEINE_HAL_HAL_USB_H
30#define CAFFEINE_HAL_HAL_USB_H
31
32#ifdef __cplusplus
33extern "C"
34{
35#endif
36
37/* Includes ---------------------------------------------------------*/
38#include "cfn_hal.h"
39#include "cfn_hal_base.h"
40#include "cfn_hal_gpio.h"
41#include "cfn_hal_types.h"
42
43/* Defines ----------------------------------------------------------*/
44
45/* Types Enums ------------------------------------------------------*/
46
61
72
83
84/* Types Structs ----------------------------------------------------*/
85
89typedef struct
90{
91 uint32_t dev_endpoints;
94
107
108typedef struct cfn_hal_usb_s cfn_hal_usb_t;
110
120 cfn_hal_usb_t *driver, uint32_t event_mask, uint32_t error_mask, uint8_t ep_addr, void *user_arg);
121
127{
129
130 /* USB PCD Extensions */
133 cfn_hal_error_code_t (*set_address)(cfn_hal_usb_t *driver, uint8_t address);
135 uint8_t ep_addr,
136 cfn_hal_usb_ep_type_t ep_type,
137 uint16_t ep_mps);
138 cfn_hal_error_code_t (*ep_close)(cfn_hal_usb_t *driver, uint8_t ep_addr);
139 cfn_hal_error_code_t (*ep_transmit)(cfn_hal_usb_t *driver, uint8_t ep_addr, const uint8_t *data, size_t length);
140 cfn_hal_error_code_t (*ep_receive)(cfn_hal_usb_t *driver, uint8_t ep_addr, uint8_t *buffer, size_t length);
141 cfn_hal_error_code_t (*ep_stall)(cfn_hal_usb_t *driver, uint8_t ep_addr, bool stall);
142
143 /* Stack Integration Helpers */
145 cfn_hal_error_code_t (*get_rx_data_size)(cfn_hal_usb_t *driver, uint8_t ep_addr, size_t *size);
146};
147
149
151
152/* Functions inline ------------------------------------------------- */
154 uint32_t peripheral_id,
155 struct cfn_hal_clock_s *clock,
156 void *dependency,
157 const cfn_hal_usb_api_t *api,
158 const cfn_hal_usb_phy_t *phy,
159 const cfn_hal_usb_config_t *config,
160 cfn_hal_usb_callback_t callback,
161 void *user_arg)
162{
164 driver, CFN_HAL_PERIPHERAL_TYPE_USB, peripheral_id, clock, dependency, api, phy, config, callback, user_arg);
165}
166
174 const cfn_hal_usb_config_t *config)
175{
176 if (driver == NULL || config == NULL)
177 {
179 }
180
181 if (config->dev_endpoints == 0)
182 {
184 }
185
186 return cfn_hal_base_config_validate(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, config);
187}
188
195{
196 if (!driver)
197 {
199 }
200 driver->base.vmt = (const struct cfn_hal_api_base_s *) driver->api;
201 cfn_hal_error_code_t error = cfn_hal_usb_config_validate(driver, driver->config);
202 if (error != CFN_HAL_ERROR_OK)
203 {
204 return error;
205 }
206 return cfn_hal_base_init(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB);
207}
208
215{
216 if (!driver)
217 {
219 }
221}
222
230{
231 if (!driver)
232 {
234 }
236 if (error != CFN_HAL_ERROR_OK)
237 {
238 return error;
239 }
240 {
241 driver->config = config;
242 }
243 return cfn_hal_base_config_set(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, (const void *) config);
244}
245
253{
254 if (!driver || !config || !driver->config)
255 {
257 }
258 *config = *(driver->config);
259 return CFN_HAL_ERROR_OK;
260}
261
270 const cfn_hal_usb_callback_t callback,
271 void *user_arg)
272{
273 if (!driver)
274 {
276 }
277 {
278 driver->cb = callback;
279 driver->cb_user_arg = user_arg;
280 }
282 &driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, (cfn_hal_callback_t) callback, user_arg);
283}
284
299
307{
308 if (!driver)
309 {
311 }
312 return cfn_hal_base_event_enable(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, event_mask);
313}
314
322{
323 if (!driver)
324 {
326 }
327 return cfn_hal_base_event_disable(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, event_mask);
328}
329
337{
338 if (!driver)
339 {
341 }
342 return cfn_hal_base_event_get(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, event_mask);
343}
344
352{
353 if (!driver)
354 {
356 }
357 return cfn_hal_base_error_enable(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, error_mask);
358}
359
367{
368 if (!driver)
369 {
371 }
372 return cfn_hal_base_error_disable(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, error_mask);
373}
374
382{
383 if (!driver)
384 {
386 }
387 return cfn_hal_base_error_get(&driver->base, CFN_HAL_PERIPHERAL_TYPE_USB, error_mask);
388}
389
390/* USB Specific Functions ------------------------------------------- */
391
403
415
423{
425 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, set_address, driver, error, address);
426 return error;
427}
428
438 uint8_t ep_addr,
439 cfn_hal_usb_ep_type_t ep_type,
440 uint16_t ep_mps)
441{
443 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, ep_open, driver, error, ep_addr, ep_type, ep_mps);
444 return error;
445}
446
454{
456 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, ep_close, driver, error, ep_addr);
457 return error;
458}
459
469 uint8_t ep_addr,
470 const uint8_t *data,
471 size_t length)
472{
474 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, ep_transmit, driver, error, ep_addr, data, length);
475 return error;
476}
477
487 uint8_t ep_addr,
488 uint8_t *buffer,
489 size_t length)
490{
492 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, ep_receive, driver, error, ep_addr, buffer, length);
493 return error;
494}
495
504{
506 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, ep_stall, driver, error, ep_addr, stall);
507 return error;
508}
509
517{
519 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, read_setup_packet, driver, error, buffer);
520 return error;
521}
522
531{
533 CFN_HAL_CHECK_AND_CALL_FUNC_VARG(CFN_HAL_PERIPHERAL_TYPE_USB, get_rx_data_size, driver, error, ep_addr, size);
534 return error;
535}
537 const cfn_hal_usb_config_t *config,
538 const cfn_hal_usb_phy_t *phy,
539 struct cfn_hal_clock_s *clock,
540 void *dependency,
541 cfn_hal_usb_callback_t callback,
542 void *user_arg);
544#ifdef __cplusplus
545}
546#endif
547
548#endif // CAFFEINE_HAL_HAL_usb_H
Core Hardware Abstraction Layer definitions and macros.
#define CFN_HAL_CHECK_AND_CALL_FUNC_VARG(expected_peripheral_type, func, driver, result,...)
Definition cfn_hal.h:134
#define CFN_HAL_CHECK_AND_CALL_FUNC(expected_peripheral_type, func, driver, result)
Definition cfn_hal.h:114
#define CFN_HAL_INLINE
Macro for inlining HAL wrapper functions. Can be overridden with attribute((always_inline)) for perfo...
Definition cfn_hal.h:61
#define CFN_HAL_BIT(x)
Definition cfn_hal.h:79
#define CFN_HAL_CREATE_DRIVER_TYPE(prefix, config_type, api_type, phy_type, cb_type)
Definition cfn_hal.h:102
Base driver Hardware Abstraction Layer declarations.
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_error_disable(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t error_mask)
Generic error disable for any driver. Deactivates exception-flow hardware triggers based on the provi...
Definition cfn_hal_base_impl.h:436
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_callback_register(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, cfn_hal_callback_t callback, void *user_arg)
Generic callback registration for any driver.
Definition cfn_hal_base_impl.h:254
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_error_enable(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t error_mask)
Generic error enable for any driver. Activates exception-flow hardware triggers based on the provided...
Definition cfn_hal_base_impl.h:411
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_event_enable(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t event_mask)
Generic event enable for any driver. Activates nominal hardware triggers based on the provided mask.
Definition cfn_hal_base_impl.h:331
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_event_get(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t *event_mask)
Generic event status getter for any driver. Retrieves the current nominal hardware triggers/flags.
Definition cfn_hal_base_impl.h:386
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_error_get(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t *error_mask)
Generic error status getter for any driver. Retrieves current exception-flow hardware flags/errors.
Definition cfn_hal_base_impl.h:461
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_config_set(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, const void *config)
Generic configuration setter for any driver.
Definition cfn_hal_base_impl.h:196
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_power_state_set(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, cfn_hal_power_state_t state)
Generic power state transition for any driver.
Definition cfn_hal_base_impl.h:279
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_deinit(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type)
Generic deinitialization for any driver. Returns the driver to the CONSTRUCTED state and releases boa...
Definition cfn_hal_base_impl.h:144
#define CFN_HAL_VMT_CHECK(api_struct_type)
Compile-time check to ensure a peripheral API struct is compatible with the base layer....
Definition cfn_hal_base.h:91
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_init(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type)
Generic initialization for any driver. Handles board-level hooks, type validation,...
Definition cfn_hal_base_impl.h:85
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_config_validate(const cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, const void *config)
Generic validation for a configuration.
Definition cfn_hal_base_impl.h:234
CFN_HAL_BASE_API cfn_hal_error_code_t cfn_hal_base_event_disable(cfn_hal_driver_t *base, cfn_hal_peripheral_type_t expected_type, uint32_t event_mask)
Generic event disable for any driver. Deactivates nominal hardware triggers based on the provided mas...
Definition cfn_hal_base_impl.h:361
#define CFN_HAL_POPULATE_DRIVER( driver_ptr, periph_type, periph_id, clock_ptr, dep_ptr, api_ptr, phy_ptr, cfg_ptr, cb_func, cb_arg)
Standardizes the population of a peripheral driver structure. This macro ensures that the base driver...
Definition cfn_hal_base_impl.h:45
General Purpose Input/Output (GPIO) HAL API.
Common type definitions and enums for the HAL.
void(* cfn_hal_callback_t)(void)
Generic function pointer for HAL callbacks. Used as a standard-compliant carrier in the base layer.
Definition cfn_hal_types.h:98
enum cfn_hal_error_codes cfn_hal_error_code_t
#define CFN_HAL_PERIPHERAL_TYPE_USB
Definition cfn_hal_types.h:139
cfn_hal_power_state_t
Definition cfn_hal_types.h:156
@ CFN_HAL_ERROR_OK
Definition cfn_hal_types.h:50
@ CFN_HAL_ERROR_BAD_PARAM
Definition cfn_hal_types.h:53
@ CFN_HAL_ERROR_BAD_CONFIG
Definition cfn_hal_types.h:60
struct cfn_hal_usb_s cfn_hal_usb_t
Definition cfn_hal_usb.h:108
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_event_get(cfn_hal_usb_t *driver, uint32_t *event_mask)
Retrieves the current USB nominal event status.
Definition cfn_hal_usb.h:336
cfn_hal_error_code_t cfn_hal_usb_destruct(cfn_hal_usb_t *driver)
Definition cfn_hal_usb_port.c:88
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_stop(cfn_hal_usb_t *driver)
Stops the USB device controller (disconnects pull-up).
Definition cfn_hal_usb.h:409
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_config_get(cfn_hal_usb_t *driver, cfn_hal_usb_config_t *config)
Gets the current USB configuration.
Definition cfn_hal_usb.h:252
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_ep_close(cfn_hal_usb_t *driver, uint8_t ep_addr)
Disables and closes a USB endpoint.
Definition cfn_hal_usb.h:453
cfn_hal_usb_event_t
USB nominal event flags. These events drive the state machine of the upper USB stack.
Definition cfn_hal_usb.h:52
@ CFN_HAL_USB_EVENT_EP_DATA_IN
Definition cfn_hal_usb.h:59
@ CFN_HAL_USB_EVENT_RESET
Definition cfn_hal_usb.h:56
@ CFN_HAL_USB_EVENT_SUSPEND
Definition cfn_hal_usb.h:54
@ CFN_HAL_USB_EVENT_SETUP_READY
Definition cfn_hal_usb.h:57
@ CFN_HAL_USB_EVENT_EP_DATA_OUT
Definition cfn_hal_usb.h:58
@ CFN_HAL_USB_EVENT_RESUME
Definition cfn_hal_usb.h:55
@ CFN_HAL_USB_EVENT_NONE
Definition cfn_hal_usb.h:53
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_config_validate(const cfn_hal_usb_t *driver, const cfn_hal_usb_config_t *config)
Validates the USB configuration.
Definition cfn_hal_usb.h:173
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_config_set(cfn_hal_usb_t *driver, const cfn_hal_usb_config_t *config)
Sets the USB configuration.
Definition cfn_hal_usb.h:229
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_ep_stall(cfn_hal_usb_t *driver, uint8_t ep_addr, bool stall)
Controls the stall condition of an endpoint.
Definition cfn_hal_usb.h:503
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_event_disable(cfn_hal_usb_t *driver, uint32_t event_mask)
Disables one or more USB nominal events.
Definition cfn_hal_usb.h:321
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_deinit(cfn_hal_usb_t *driver)
Deinitializes the USB driver.
Definition cfn_hal_usb.h:214
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_init(cfn_hal_usb_t *driver)
Initializes the USB driver.
Definition cfn_hal_usb.h:194
CFN_HAL_INLINE void cfn_hal_usb_populate(cfn_hal_usb_t *driver, uint32_t peripheral_id, struct cfn_hal_clock_s *clock, void *dependency, const cfn_hal_usb_api_t *api, const cfn_hal_usb_phy_t *phy, const cfn_hal_usb_config_t *config, cfn_hal_usb_callback_t callback, void *user_arg)
Definition cfn_hal_usb.h:153
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_error_disable(cfn_hal_usb_t *driver, uint32_t error_mask)
Disables one or more USB exception errors.
Definition cfn_hal_usb.h:366
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_ep_transmit(cfn_hal_usb_t *driver, uint8_t ep_addr, const uint8_t *data, size_t length)
Initiates data transmission on an IN endpoint.
Definition cfn_hal_usb.h:468
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_error_enable(cfn_hal_usb_t *driver, uint32_t error_mask)
Enables one or more USB exception errors.
Definition cfn_hal_usb.h:351
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_ep_receive(cfn_hal_usb_t *driver, uint8_t ep_addr, uint8_t *buffer, size_t length)
Prepares an OUT endpoint for data reception.
Definition cfn_hal_usb.h:486
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_error_get(cfn_hal_usb_t *driver, uint32_t *error_mask)
Retrieves the current USB exception error status.
Definition cfn_hal_usb.h:381
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_callback_register(cfn_hal_usb_t *driver, const cfn_hal_usb_callback_t callback, void *user_arg)
Registers a callback for USB events and errors.
Definition cfn_hal_usb.h:269
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_ep_open(cfn_hal_usb_t *driver, uint8_t ep_addr, cfn_hal_usb_ep_type_t ep_type, uint16_t ep_mps)
Configures and enables a USB endpoint.
Definition cfn_hal_usb.h:437
void(* cfn_hal_usb_callback_t)(cfn_hal_usb_t *driver, uint32_t event_mask, uint32_t error_mask, uint8_t ep_addr, void *user_arg)
USB callback signature.
Definition cfn_hal_usb.h:119
cfn_hal_usb_error_t
USB exception error flags.
Definition cfn_hal_usb.h:66
@ CFN_HAL_USB_ERROR_NONE
Definition cfn_hal_usb.h:67
@ CFN_HAL_USB_ERROR_ISO_OUT
Definition cfn_hal_usb.h:68
@ CFN_HAL_USB_ERROR_GENERAL
Definition cfn_hal_usb.h:70
@ CFN_HAL_USB_ERROR_ISO_IN
Definition cfn_hal_usb.h:69
cfn_hal_error_code_t cfn_hal_usb_construct(cfn_hal_usb_t *driver, const cfn_hal_usb_config_t *config, const cfn_hal_usb_phy_t *phy, struct cfn_hal_clock_s *clock, void *dependency, cfn_hal_usb_callback_t callback, void *user_arg)
Definition cfn_hal_usb_port.c:72
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_set_address(cfn_hal_usb_t *driver, uint8_t address)
Sets the USB device address.
Definition cfn_hal_usb.h:422
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_get_rx_data_size(cfn_hal_usb_t *driver, uint8_t ep_addr, size_t *size)
Retrieves the size of the last received data on an endpoint.
Definition cfn_hal_usb.h:530
cfn_hal_usb_ep_type_t
USB endpoint types.
Definition cfn_hal_usb.h:77
@ CFN_HAL_USB_EP_TYPE_CTRL
Definition cfn_hal_usb.h:78
@ CFN_HAL_USB_EP_TYPE_ISOC
Definition cfn_hal_usb.h:79
@ CFN_HAL_USB_EP_TYPE_BULK
Definition cfn_hal_usb.h:80
@ CFN_HAL_USB_EP_TYPE_INTR
Definition cfn_hal_usb.h:81
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_event_enable(cfn_hal_usb_t *driver, uint32_t event_mask)
Enables one or more USB nominal events.
Definition cfn_hal_usb.h:306
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_start(cfn_hal_usb_t *driver)
Starts the USB device controller (connects pull-up).
Definition cfn_hal_usb.h:397
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_read_setup_packet(cfn_hal_usb_t *driver, uint8_t *buffer)
Reads the latest received 8-byte setup packet.
Definition cfn_hal_usb.h:516
CFN_HAL_INLINE cfn_hal_error_code_t cfn_hal_usb_power_state_set(cfn_hal_usb_t *driver, cfn_hal_power_state_t state)
Sets the USB power state.
Definition cfn_hal_usb.h:291
Base API structure for all peripheral drivers. Every peripheral-specific API struct MUST have this as...
Definition cfn_hal_base.h:63
Lightweight handle to a specific GPIO pin. Used by other peripherals to reference physical pins.
Definition cfn_hal_gpio.h:173
USB Virtual Method Table (VMT). Focuses exclusively on Peripheral Controller Device (PCD) functions.
Definition cfn_hal_usb.h:127
cfn_hal_error_code_t(* stop)(cfn_hal_usb_t *driver)
Definition cfn_hal_usb.h:132
cfn_hal_error_code_t(* ep_transmit)(cfn_hal_usb_t *driver, uint8_t ep_addr, const uint8_t *data, size_t length)
Definition cfn_hal_usb.h:139
cfn_hal_error_code_t(* read_setup_packet)(cfn_hal_usb_t *driver, uint8_t *buffer)
Definition cfn_hal_usb.h:144
cfn_hal_error_code_t(* ep_stall)(cfn_hal_usb_t *driver, uint8_t ep_addr, bool stall)
Definition cfn_hal_usb.h:141
cfn_hal_api_base_t base
Definition cfn_hal_usb.h:128
cfn_hal_error_code_t(* start)(cfn_hal_usb_t *driver)
Definition cfn_hal_usb.h:131
cfn_hal_error_code_t(* ep_receive)(cfn_hal_usb_t *driver, uint8_t ep_addr, uint8_t *buffer, size_t length)
Definition cfn_hal_usb.h:140
cfn_hal_error_code_t(* set_address)(cfn_hal_usb_t *driver, uint8_t address)
Definition cfn_hal_usb.h:133
cfn_hal_error_code_t(* get_rx_data_size)(cfn_hal_usb_t *driver, uint8_t ep_addr, size_t *size)
Definition cfn_hal_usb.h:145
cfn_hal_error_code_t(* ep_close)(cfn_hal_usb_t *driver, uint8_t ep_addr)
Definition cfn_hal_usb.h:138
cfn_hal_error_code_t(* ep_open)(cfn_hal_usb_t *driver, uint8_t ep_addr, cfn_hal_usb_ep_type_t ep_type, uint16_t ep_mps)
Definition cfn_hal_usb.h:134
USB configuration structure.
Definition cfn_hal_usb.h:90
uint32_t dev_endpoints
Definition cfn_hal_usb.h:91
void * user_config
Definition cfn_hal_usb.h:92
USB hardware physical mapping.
Definition cfn_hal_usb.h:99
cfn_hal_gpio_pin_handle_t * dm
Definition cfn_hal_usb.h:102
cfn_hal_gpio_pin_handle_t * dp
Definition cfn_hal_usb.h:101
cfn_hal_gpio_pin_handle_t * id
Definition cfn_hal_usb.h:103
void * user_arg
Definition cfn_hal_usb.h:105
cfn_hal_gpio_pin_handle_t * vbus
Definition cfn_hal_usb.h:104
void * instance
Definition cfn_hal_usb.h:100