~ruther/stm32h747i-disco-usb-image-viewer

ref: d0823eecd4dee0c7e2f3ee08534b89477526b6ad stm32h747i-disco-usb-image-viewer/include/usb_device.h -rw-r--r-- 554 bytes
d0823eec — Rutherther feat: add registers, pin, exti, usb_device skeleton 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef USB_DEVICE_H
#define USB_DEVICE_H

//
#include <stm32h747xx.h>

typedef struct {
  volatile USB_OTG_GlobalTypeDef *core;
  volatile USB_OTG_DeviceTypeDef *device;
} usb_device_t;

struct usb_configuration_t;

typedef struct {

} usb_class_t;

// has configuration etc

#define USB_DEVICE_SIZE sizeof(usb_device_t)

extern usb_device_t* usb1_device;

void* usb_device_init(void* peripheral_address, usb_class_t* class, void* buffer);

void usb_device_setup(void* device);
void* usb_device_wait_for_handshake(void* device);

#endif // USB_DEVICE_H
Do not follow this link