blfwk::Peripheral Class Referenceabstract

Represents a peripheral. More...

`#include <Peripheral.h>`

Inheritance diagram for blfwk::Peripheral:
[legend]

## Classes

struct | PeripheralConfigData

## Public Types

enum | _host_peripheral_types { kHostPeripheralType_None, kHostPeripheralType_UART, kHostPeripheralType_BUSPAL_UART, kHostPeripheralType_USB_HID, kHostPeripheralType_SIM }

## Public Member Functions

virtual status_t | read (uint8_t *buffer, uint32_t requestedBytes, uint32_t *actualBytes, uint32_t timeout)=0
| Read bytes. More...
virtual status_t | write (const uint8_t *buffer, uint32_t byteCount)=0
| Write bytes.

## Detailed Description

Represents a peripheral.

Interface class for objects that provide the source for commands or sink for responses.

## Class Documentation

struct blfwk::Peripheral::PeripheralConfigData

Collaboration diagram for blfwk::Peripheral::PeripheralConfigData:
[legend]

Class Members
BusPalConfigData | busPalConfig |
string | comPortName |
long | comPortSpeed |
uint32_t | packetTimeoutMs |
_host_peripheral_types | peripheralType |
bool | ping |
unsigned short | usbHidPid |
string | usbHidSerialNumber |
unsigned short | usbHidVid |

## Member Function Documentation

virtual status_t blfwk::Peripheral::read | ( | uint8_t * | buffer,
|  | uint32_t | requestedBytes,
|  | uint32_t * | actualBytes,
|  | uint32_t | timeout
| ) |  |

pure virtual

Read bytes.

Parameters

  buffer | Pointer to buffer
  requestedBytes | Number of bytes to read
  timeoutMs | Time in milliseconds to wait for read to complete.
  actualBytes | Number of bytes actually read.

Implemented in blfwk::UartPeripheral, blfwk::UsbHidPeripheral, blfwk::BusPalUartPeripheral, and blfwk::SimPeripheral.

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

- Peripheral.h