10#ifndef PHAL_G4_USB_PRIV_H
11#define PHAL_G4_USB_PRIV_H
42bool USB_PRIV_write(uint8_t endpoint,
const void *source, uint16_t length_bytes);
54 uint16_t destination_capacity,
55 uint16_t *received_length);
STM32G4 USB full-speed device API.
PHAL_USB_EndpointDirection_t
Definition usb.h:26
uint16_t USB_PRIV_getFrameNumber(void)
Read the USB peripheral's current 11-bit frame number.
Definition usb_priv.c:412
void USB_PRIV_handleInterrupt(void)
Decode one pending USB interrupt and notify the application.
Definition usb_priv.c:368
void USB_PRIV_enableInterrupts(void)
Enable USB event interrupts and endpoint operation.
Definition usb_priv.c:287
bool USB_PRIV_init(void)
Enable and reset the USB hardware, configure pins and packet memory.
Definition usb_priv.c:251
void USB_PRIV_connect(void)
Attach to the bus by enabling the internal D+ pull-up.
Definition usb_priv.c:297
void USB_PRIV_setAddress(uint8_t address)
Write the seven-bit device address while keeping the device enabled.
Definition usb_priv.c:303
void USB_PRIV_stall(uint8_t endpoint, PHAL_USB_EndpointDirection_t direction)
Set one endpoint direction to the USB STALL handshake state.
Definition usb_priv.c:308
bool USB_PRIV_read(uint8_t endpoint, void *destination, uint16_t destination_capacity, uint16_t *received_length)
Copy one completed OUT packet from packet memory and rearm reception.
Definition usb_priv.c:330
void USB_PRIV_deinit(void)
Detach, disable interrupts, and power down the USB peripheral.
Definition usb_priv.c:275
bool USB_PRIV_write(uint8_t endpoint, const void *source, uint16_t length_bytes)
Copy one IN packet to packet memory and make it available to the host.
Definition usb_priv.c:312