![]() |
Kinetis Bootloader Host
2.0.0
Host Tools for Kinetis devices
|
Peripheral that operates in the simulation space. More...
#include <SimPeripheral.h>
Inheritance diagram for blfwk::SimPeripheral:
Collaboration diagram for blfwk::SimPeripheral:Public Member Functions | |
| SimPeripheral (uchar_deque_t *inStream, uchar_deque_t *outStream) | |
| Default Constructor. | |
| virtual status_t | read (uint8_t *buffer, uint32_t requestedBytes, uint32_t *actualBytes, uint32_t timeoutMs) |
| Read bytes. More... | |
| virtual status_t | write (const uint8_t *buffer, uint32_t byteCount) |
| Write bytes. More... | |
Protected Attributes | |
| uchar_deque_t * | m_inStream |
| Writes go to this stream. | |
| uchar_deque_t * | m_outStream |
| Reads come from this stream. | |
Additional Inherited Members | |
Public Types inherited from blfwk::Peripheral | |
| enum | _host_peripheral_types { kHostPeripheralType_None, kHostPeripheralType_UART, kHostPeripheralType_BUSPAL_UART, kHostPeripheralType_USB_HID, kHostPeripheralType_SIM } |
Peripheral that operates in the simulation space.
Simulation peripherals are connected together using the streams provided to the init() method. For example, to connect a "host" peripheral to a "device" peripheral, specify the host's output stream as the device's input stream.
|
virtual |
Read bytes.
| buffer | Pointer to buffer. |
| requestedBytes | Number of bytes to read. |
| actualBytes | Number of bytes actually read. |
| timeoutMs | Time in milliseconds to wait for read to complete. |
Implements blfwk::Peripheral.
|
virtual |
Write bytes.
| buffer | Pointer to buffer to write |
| byteCount | Number of bytes to write |
Implements blfwk::Peripheral.