![]() |
Kinetis Bootloader Host
2.0.0
Host Tools for Kinetis devices
|
Provides source and sink for packets in the simulator space. More...
#include <SimPacketizer.h>
Inheritance diagram for blfwk::SimPacketizer:
Collaboration diagram for blfwk::SimPacketizer:Public Types | |
| enum | _simPacketizer_contants { kSimReadTimeoutMs = 5000 } |
| Constants. | |
Public Member Functions | |
| SimPacketizer (SimPeripheral *peripheral) | |
| Default Constructor. | |
| virtual | ~SimPacketizer () |
| Destructor. | |
| virtual SimPeripheral * | getPeripheral () |
| Peripheral accessor. | |
| virtual status_t | readPacket (uint8_t **packet, uint32_t *packetLength, packet_type_t packetType) |
| Read a packet. More... | |
| virtual status_t | writePacket (const uint8_t *packet, uint32_t byteCount, packet_type_t packetType) |
| Write a packet. More... | |
| virtual void | abortPacket () |
| Abort data phase. | |
| virtual void | sync () |
| Send framing packet ack. | |
| virtual void | finalize () |
| Finalize. | |
| virtual void | enableSimulatorPump () |
| Enable simulator command processor pump. | |
| virtual void | pumpSimulator () |
| Pump simulator command processor. | |
| virtual void | setAborted (bool aborted) |
| Set aborted flag. More... | |
| virtual uint32_t | getMaxPacketSize () |
| Return the max packet size. | |
Public Member Functions inherited from blfwk::Packetizer | |
| Packetizer (Peripheral *peripheral, uint32_t packetTimeoutMs) | |
| standard_version_t | getVersion () |
| Get Framing Protocol Version. | |
| uint16_t | getOptions () |
| Get Framing Protocol Options. | |
| void | setAbortEnabled (bool isEnabled) |
| Set abort packet check enable. | |
| bool | isAbortEnabled () |
| Check if abort data phase is enabled. | |
Protected Attributes | |
| bool | m_isPumpEnabled |
| True if simulator pump enabled. | |
| bool | m_isAborted |
| Data phase abort requested by receiver. | |
| uint8_t | m_buffer [kDefaultMaxPacketSize] |
| Buffer for bytes used to build read packet. | |
Protected Attributes inherited from blfwk::Packetizer | |
| Peripheral * | m_peripheral |
| Peripheral to send/receive bytes on. | |
| standard_version_t | m_version |
| Framing protocol version. | |
| uint16_t | m_options |
| Framing protocol options bitfield. | |
| clock_t | m_startTime |
| Beginning time of packet transaction. | |
| uint32_t | m_packetTimeoutMs |
| bool | m_isAbortEnabled |
| True if allowing abort packet. Not used by all packetizers. | |
Provides source and sink for packets in the simulator space.
|
virtual |
Read a packet.
Provides the address of a buffer containing the packet.
| packet | Pointer location to write packet pointer |
| packetLength | Number of bytes in returned packet. |
Implements blfwk::Packetizer.
|
inlinevirtual |
|
virtual |
Write a packet.
| packet | Pointer to packet to write. |
| byteCount | Number of bytes in packet. |
Implements blfwk::Packetizer.