Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
blfwk::SimPeripheral Class Reference

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
}
 

Detailed Description

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.

Member Function Documentation

status_t SimPeripheral::read ( uint8_t *  buffer,
uint32_t  requestedBytes,
uint32_t *  actualBytes,
uint32_t  timeoutMs 
)
virtual

Read bytes.

Parameters
bufferPointer to buffer.
requestedBytesNumber of bytes to read.
actualBytesNumber of bytes actually read.
timeoutMsTime in milliseconds to wait for read to complete.

Implements blfwk::Peripheral.

status_t SimPeripheral::write ( const uint8_t *  buffer,
uint32_t  byteCount 
)
virtual

Write bytes.

Parameters
bufferPointer to buffer to write
byteCountNumber of bytes to write

Implements blfwk::Peripheral.


The documentation for this class was generated from the following files: