![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
USB HID peripheral interface. More...
Collaboration diagram for USB HID Peripheral:Data Structures | |
| struct | usb_hid_packetizer_info_t |
| State information for the USB HID packetizer. More... | |
Functions | |
| static bool | usb_hid_poll_for_activity (const peripheral_descriptor_t *self) |
| static status_t | usb_device_full_init (const peripheral_descriptor_t *self, serial_byte_receive_func_t function) |
| static void | usb_device_full_shutdown (const peripheral_descriptor_t *self) |
| static void | usb_msc_pump (const peripheral_descriptor_t *self) |
| Run the sbloader state machine. More... | |
| static status_t | usb_hid_packet_init (const peripheral_descriptor_t *self) |
| static status_t | usb_hid_packet_read (const peripheral_descriptor_t *self, uint8_t **packet, uint32_t *packetLength, packet_type_t packetType) |
| static status_t | usb_hid_packet_write (const peripheral_descriptor_t *self, const uint8_t *packet, uint32_t byteCount, packet_type_t packetType) |
| static void | usb_hid_packet_abort_data_phase (const peripheral_descriptor_t *self) |
| static status_t | usb_hid_packet_finalize (const peripheral_descriptor_t *self) |
| static uint32_t | usb_hid_packet_get_max_packet_size (const peripheral_descriptor_t *self) |
| usb_status_t | usb_device_callback (usb_device_handle handle, uint32_t event, void *param) |
| usb_status_t | usb_device_msc_callback (class_handle_t handle, uint32_t event, void *param) |
| device msc callback function. More... | |
| void | USBHS_IRQHandler (void) |
| void | USB0_IRQHandler (void) |
| static void | usb_hid_app_callback (uint8_t controller_ID, uint8_t event_type, void *val) |
| This function handles the callback. More... | |
| static uint8_t | usb_hid_app_param_callback (uint8_t request, uint16_t value, uint16_t wIndex, uint8_t **data, USB_PACKET_SIZE *size) |
| This function handles callbacks for USB HID Class request. More... | |
| static status_t | usb_hid_full_init (const peripheral_descriptor_t *self, serial_byte_receive_func_t function) |
| static void | usb_hid_full_shutdown (const peripheral_descriptor_t *self) |
| static void | usb_set_clock_gate (uint32_t instance, PeripheralClockSetting set) |
| static void | usb_hid_app_callback (uint8_t event_type, void *val, void *arg) |
| This function handles the callback. More... | |
| static uint8_t | usb_hid_app_param_callback (uint8_t request, uint16_t value, uint8_t **data, USB_PACKET_SIZE *size, void *arg) |
| uint32_t | usb_get_instance_via_ipsr (void) |
Variables | |
| static bool | s_dHidMscActivity [2] = { false } |
| const peripheral_control_interface_t | g_usbHidControlInterface |
| Control interface for the USB HID peripheral driver. More... | |
| const peripheral_packet_interface_t | g_usbHidPacketInterface |
| Packet interface for the USB HID peripheral driver. More... | |
| static usb_device_composite_struct_t | g_device_composite |
| const peripheral_control_interface_t | g_usbHidControlInterface |
| Control interface for the USB HID peripheral driver. More... | |
| const peripheral_packet_interface_t | g_usbHidPacketInterface |
| Packet interface for the USB HID peripheral driver. More... | |
| static const IRQn_Type | usb_irq_ids [USB_INSTANCE_COUNT] |
| static usb_hid_packetizer_info_t | s_hidInfo |
| Current state of the USB HID packetizer. | |
| bool | isEnumerated |
| Whether the device has enumerated and is configured. | |
| bool | didReceiveFirstReport |
| Whether the first report has been received. | |
| bool | didReceiveDataPhaseAbort |
| Whether we received a data phase abort request. | |
| bool | isReceiveDataRequestRequired |
| Whether an interrupt out pipe receive data request is required. | |
| uint8_t | appRequestParams [kAppRequestParamCount] |
| Storage for request parameter values. | |
| sync_object_t | receiveSync |
| Sync object used for reading packets. | |
| sync_object_t | sendSync |
| Sync object used for sending packets. | |
| uint32_t | reportSize |
| bl_hid_report_t | report |
| the report plus the header, as the host can send up to the max report size bytes. More... | |
| hid_handle_t | app_handle |
| usb_desc_request_notify_struct_t | g_desc_callback |
| const peripheral_control_interface_t | g_usbHidControlInterface |
| Control interface for the USB HID peripheral driver. More... | |
| const peripheral_packet_interface_t | g_usbHidPacketInterface |
| Packet interface for the USB HID peripheral driver. More... | |
| static usb_hid_packetizer_info_t | s_hidInfo [USB_INSTANCE_COUNT+USBHS_INSTANCE_COUNT] |
| Current state of the USB HID packetizer. | |
USB HID peripheral interface.
| struct usb_hid_packetizer_info_t |
State information for the USB HID packetizer.
Collaboration diagram for usb_hid_packetizer_info_t:| Data Fields | ||
|---|---|---|
| hid_handle_t | app_handle | |
| uint8_t | appRequestParams[kAppRequestParamCount] | Storage for request parameter values. |
| bool | didReceiveDataPhaseAbort | Whether we received a data phase abort request. |
| bool | didReceiveFirstReport | Whether the first report has been received. |
| bool | isEnumerated | Whether the device has enumerated and is configured. |
| bool | isReceiveDataRequestRequired | Whether an interrupt out pipe receive data request is required. |
| sync_object_t | receiveSync | Sync object used for reading packets. |
| bl_hid_report_t | report |
the report plus the header, as the host can send up to the max report size bytes. Buffer used to hold HID reports for sending and receiving. |
| uint32_t | reportSize |
The size in bytes of a received report. May be greater than the packet contained within |
| sync_object_t | sendSync | Sync object used for sending packets. |
| usb_status_t usb_device_msc_callback | ( | class_handle_t | handle, |
| uint32_t | event, | ||
| void * | param | ||
| ) |
device msc callback function.
This function handle the disk class specified event.
| handle | The USB class handle. |
| event | The USB device event type. |
| param | The parameter of the class specific event. |
< Send data completed
< Data received
< Host write data
< Host read data
|
static |
This function handles the callback.
This function is called from the class layer whenever reset occurs or enum is complete. after the enum is complete this function sets a variable so that the application can start
| controller_ID | Controller ID |
| event_type | value of the event |
| val | gives the configuration value |
|
static |
This function handles the callback.
This function is called from the class layer whenever reset occurs or enum is complete. after the enum is complete this function sets a variable so that the application can start
| event_type | value of the event |
| val | gives the configuration value |
| arg |
|
static |
This function handles callbacks for USB HID Class request.
This function is called whenever a HID class request is received. This function handles these class requests
| request | request type |
| value | give report type and id |
| data | pointer to the data |
| size | size of the transfer |
|
static |
Run the sbloader state machine.
This function is called repeatedly by the main application loop. We use it to run the sbloader state machine from non-interrupt context.
| hid_handle_t app_handle |
| uint8_t appRequestParams |
Storage for request parameter values.
| bool didReceiveDataPhaseAbort |
Whether we received a data phase abort request.
| bool didReceiveFirstReport |
Whether the first report has been received.
| const peripheral_control_interface_t g_usbHidControlInterface |
Control interface for the USB HID peripheral driver.
| const peripheral_control_interface_t g_usbHidControlInterface |
Control interface for the USB HID peripheral driver.
| const peripheral_control_interface_t g_usbHidControlInterface |
Control interface for the USB HID peripheral driver.
| const peripheral_packet_interface_t g_usbHidPacketInterface |
Packet interface for the USB HID peripheral driver.
| const peripheral_packet_interface_t g_usbHidPacketInterface |
Packet interface for the USB HID peripheral driver.
| const peripheral_packet_interface_t g_usbHidPacketInterface |
Packet interface for the USB HID peripheral driver.
| bool isEnumerated |
Whether the device has enumerated and is configured.
| bool isReceiveDataRequestRequired |
Whether an interrupt out pipe receive data request is required.
| sync_object_t receiveSync |
Sync object used for reading packets.
| bl_hid_report_t report |
the report plus the header, as the host can send up to the max report size bytes.
Buffer used to hold HID reports for sending and receiving.
| uint32_t reportSize |
The size in bytes of a received report. May be greater than the packet contained within
| sync_object_t sendSync |
Sync object used for sending packets.
|
static |