| #define CLEAR_COMM_FEATURE 0x04 |
| #define CLEAR_COMM_FEATURE 0x04 |
| #define GET_COMM_FEATURE 0x03 |
| #define GET_COMM_FEATURE 0x03 |
| #define GET_ENCAPSULATED_RESPONSE 0x01 |
| #define GET_ENCAPSULATED_RESPONSE 0x01 |
| #define GET_LINE_CODING 0x21 |
| #define GET_LINE_CODING 0x21 |
| #define SEND_BREAK 0x23 |
| #define SEND_BREAK 0x23 |
| #define SEND_ENCAPSULATED_COMMAND 0x00 |
| #define SEND_ENCAPSULATED_COMMAND 0x00 |
| #define SET_COMM_FEATURE 0x02 |
| #define SET_COMM_FEATURE 0x02 |
| #define SET_CONTROL_LINE_STATE 0x22 |
| #define SET_CONTROL_LINE_STATE 0x22 |
| #define SET_LINE_CODING 0x20 |
| #define SET_LINE_CODING 0x20 |
| void MIOS32_USB_COM_CB_StatusIn | ( | void | ) |
MIOS32_USB callback functions (forwarded from STM32 USB driver)
This function is called by the USB driver on cable connection/disconnection
| [in] | connected | connection status (1 if connected) |
| s32 MIOS32_USB_COM_CheckAvailable | ( | void | ) |
This function returns the connection status of the USB COM interface
0: interface not available
Called by STM32 USB driver to check for OUT streams
also: bEP, bEPStatus only relevant for LPC17xx port
| void MIOS32_USB_COM_EP3_OUT_Callback | ( | void | ) |
Called by STM32 USB driver to check for OUT streams
Called by STM32 USB driver to check for IN streams
also: bEP, bEPStatus only relevant for LPC17xx port
| void MIOS32_USB_COM_EP4_IN_Callback | ( | void | ) |
Called by STM32 USB driver to check for IN streams
Initializes USB COM layer
| [in] | mode | currently only mode 0 supported |
Returns number of free bytes in receive buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
0 if usb_com not available
Gets a byte from the receive buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
-2 if no new byte available
>= 0: received byte
| void MIOS32_USB_COM_RxBufferHandler | ( | void | ) |
Returns the next byte of the receive buffer without taking it
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
-2 if no new byte available
>= 0: received byte
Returns number of used bytes in receive buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
0 if usb_com not available
returns number of free bytes in transmit buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
0 if usb_com not available
| void MIOS32_USB_COM_TxBufferHandler | ( | void | ) |
puts a byte onto the transmit buffer
(blocking function)
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
| [in] | b | byte which should be put into Tx buffer |
-1 if USB_COM not available
-3 if USB_COM not supported by MIOS32_USB_COM_TxBufferPut Routine
puts a byte onto the transmit buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
| [in] | b | byte which should be put into Tx buffer |
-1 if USB_COM not available
-2 if buffer full (retry)
-3 if USB_COM not supported by MIOS32_USB_COM_TxBufferPut Routine
puts more than one byte onto the transmit buffer (used for atomic sends)
(blocking function)
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
| [in] | *buffer | pointer to buffer which should be transmitted |
| [in] | len | number of bytes which should be transmitted |
-1 if USB_COM not available
-3 if USB_COM not supported by MIOS32_USB_COM_TxBufferPut Routine
-4 if too many bytes should be sent
puts more than one byte onto the transmit buffer (used for atomic sends)
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
| [in] | *buffer | pointer to buffer which should be transmitted |
| [in] | len | number of bytes which should be transmitted |
-1 if USB_COM not available
-2 if buffer full or cannot get all requested bytes (retry)
-3 if USB_COM not supported by MIOS32_USB_COM_TxBufferPut Routine
-4 if too many bytes should be sent
Returns number of used bytes in transmit buffer
| [in] | usb_com | USB_COM number (not supported yet, should always be 0) |
0 if usb_com not available
Initial value:
{
115200,
0x00,
0x00,
0x08
}
Initial value:
{
115200,
0x00,
0x00,
0x08
}
1.4.7