Microchip® Advanced Software Framework

abstractSerializer.h File Reference

Declaration of abstract serialize interface.

Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.

#include <hardwareInit.h>
#include <uartSerializer.h>

Data Structures

struct  SerialInterface_t
 

Functions

bool bootGetChar (uint8_t *p, bool flag)
 Read byte from interface. More...
 
bool bootScanInterfaces (void)
 Perform search interface activity and handshake message. More...
 
void bootSetChar (uint16_t len, uint8_t *p)
 Write byte to interface. More...
 
void bootUnInitSerializer (void)
 Clear interface setting. More...
 

bool bootGetChar ( uint8_t *  p,
bool  flag 
)

Read byte from interface.

Parameters
[out]p- pointer to data buffer;
[in]flag- flag about unlimited or limited reading time.
Returns
true - byte was read, false - byte was not read.

References currentInterface, and SerialInterface_t::getByte.

Referenced by srecParser(), srecWaitForAddress(), and srecWaitForType().

bool bootScanInterfaces ( void  )

Perform search interface activity and handshake message.

Returns
true - handshake was read, false - there is no activity.

References currentInterface, SerialInterface_t::getByte, HANDSHAKE_REQ, SerialInterface_t::hwInit, SerialInterface_t::hwUnInit, serialInterface, and UPPER_BYTE_OFFSET.

Referenced by srecHandshake().

void bootSetChar ( uint16_t  len,
uint8_t *  p 
)

Write byte to interface.

Parameters
[in]len- data length;
[in]p- pointer to data buffer.

References currentInterface, and SerialInterface_t::setByte.

Referenced by srecHandshake(), and srecProtocol().

void bootUnInitSerializer ( void  )

Clear interface setting.

References currentInterface, SerialInterface_t::hwUnInit, and lowLevelUnInit().

Referenced by srecHandshake(), and srecProtocol().