|
PER Firmware
|
Register-level interface used by the STM32G4 USB public layer. More...
Go to the source code of this file.
Functions | |
| bool | USB_PRIV_init (void) |
| Enable and reset the USB hardware, configure pins and packet memory. | |
| void | USB_PRIV_deinit (void) |
| Detach, disable interrupts, and power down the USB peripheral. | |
| void | USB_PRIV_enableInterrupts (void) |
| Enable USB event interrupts and endpoint operation. | |
| void | USB_PRIV_connect (void) |
| Attach to the bus by enabling the internal D+ pull-up. | |
| void | USB_PRIV_setAddress (uint8_t address) |
| Write the seven-bit device address while keeping the device enabled. | |
| void | USB_PRIV_stall (uint8_t endpoint, PHAL_USB_EndpointDirection_t direction) |
| Set one endpoint direction to the USB STALL handshake state. | |
| 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. | |
| 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. | |
| void | USB_PRIV_handleInterrupt (void) |
| Decode one pending USB interrupt and notify the application. | |
| uint16_t | USB_PRIV_getFrameNumber (void) |
| Read the USB peripheral's current 11-bit frame number. | |
Register-level interface used by the STM32G4 USB public layer.
These functions assume that the public layer has validated endpoint numbers, directions, pointers, packet lengths, and peripheral lifecycle state.
| void USB_PRIV_connect | ( | void | ) |
Attach to the bus by enabling the internal D+ pull-up.
| void USB_PRIV_deinit | ( | void | ) |
Detach, disable interrupts, and power down the USB peripheral.
| void USB_PRIV_enableInterrupts | ( | void | ) |
Enable USB event interrupts and endpoint operation.
| uint16_t USB_PRIV_getFrameNumber | ( | void | ) |
Read the USB peripheral's current 11-bit frame number.
| void USB_PRIV_handleInterrupt | ( | void | ) |
Decode one pending USB interrupt and notify the application.
| bool USB_PRIV_init | ( | void | ) |
Enable and reset the USB hardware, configure pins and packet memory.
| 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.
The received length is reported even when the destination is too small; in that case the packet remains pending and the OUT endpoint is not rearmed.
| void USB_PRIV_setAddress | ( | uint8_t | address | ) |
Write the seven-bit device address while keeping the device enabled.
| void USB_PRIV_stall | ( | uint8_t | endpoint, |
| PHAL_USB_EndpointDirection_t | direction ) |
Set one endpoint direction to the USB STALL handshake state.
| 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.