QP/C  6.5.1
qs_pkg.h File Reference

Internal (package scope) QS/C interface. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QS_INSERT_BYTE(b_)
 Internal QS macro to insert an un-escaped byte into the QS buffer. More...
 
#define QS_INSERT_ESC_BYTE(b_)
 Internal QS macro to insert an escaped byte into the QS buffer. More...
 
#define QS_PTR_INC_(ptr_)   (++(ptr_))
 Internal QS macro to increment the given pointer parameter ptr_. More...
 
#define QS_FRAME   ((uint8_t)0x7E)
 Frame character of the QS output protocol. More...
 
#define QS_ESC   ((uint8_t)0x7D)
 Escape character of the QS output protocol. More...
 
#define QS_GOOD_CHKSUM   ((uint8_t)0xFF)
 The expected checksum value over an uncorrupted QS record. More...
 
#define QS_ESC_XOR   ((uint8_t)0x20)
 Escape modifier of the QS output protocol. More...
 

Functions

void QS_target_info_ (uint8_t isReset)
 send the Target info (object sizes, build time-stamp, QP version) More...
 

Detailed Description

Internal (package scope) QS/C interface.

Definition in file qs_pkg.h.

Macro Definition Documentation

◆ QS_INSERT_BYTE

#define QS_INSERT_BYTE (   b_)
Value:
QS_PTR_AT_(buf, head) = (b_); \
++head; \
if (head == end) { \
head = (QSCtr)0; \
}
#define QS_PTR_AT_(base_, i_)
access element at index i_ from the base pointer base_
Definition: qs.h:234
uint_fast16_t QSCtr
QS ring buffer counter and offset type.
Definition: qs.h:1076

Internal QS macro to insert an un-escaped byte into the QS buffer.

Definition at line 45 of file qs_pkg.h.

◆ QS_INSERT_ESC_BYTE

#define QS_INSERT_ESC_BYTE (   b_)
Value:
chksum = (uint8_t)(chksum + (b_)); \
if (((b_) != QS_FRAME) && ((b_) != QS_ESC)) { \
QS_INSERT_BYTE(b_) \
} \
else { \
QS_INSERT_BYTE(QS_ESC) \
QS_INSERT_BYTE((uint8_t)((b_) ^ QS_ESC_XOR)) \
}
#define QS_FRAME
Frame character of the QS output protocol.
Definition: qs_pkg.h:73
unsigned char uint8_t
exact-width 8-bit unsigned int
Definition: stdint.h:29
#define QS_ESC_XOR
Escape modifier of the QS output protocol.
Definition: qs_pkg.h:87
QSPriv QS_priv_
Definition: qs.c:53
QSCtr used
number of bytes currently in the ring buffer
Definition: qs.h:1101
#define QS_ESC
Escape character of the QS output protocol.
Definition: qs_pkg.h:76

Internal QS macro to insert an escaped byte into the QS buffer.

Definition at line 53 of file qs_pkg.h.

◆ QS_PTR_INC_

#define QS_PTR_INC_ (   ptr_)    (++(ptr_))

Internal QS macro to increment the given pointer parameter ptr_.

Note
Incrementing a pointer violates the MISRA-C 2004 Rule 17.4(req), pointer arithmetic other than array indexing. Encapsulating this violation in a macro allows to selectively suppress this specific deviation.

Definition at line 70 of file qs_pkg.h.

◆ QS_FRAME

#define QS_FRAME   ((uint8_t)0x7E)

Frame character of the QS output protocol.

Definition at line 73 of file qs_pkg.h.

◆ QS_ESC

#define QS_ESC   ((uint8_t)0x7D)

Escape character of the QS output protocol.

Definition at line 76 of file qs_pkg.h.

◆ QS_GOOD_CHKSUM

#define QS_GOOD_CHKSUM   ((uint8_t)0xFF)

The expected checksum value over an uncorrupted QS record.

Definition at line 79 of file qs_pkg.h.

◆ QS_ESC_XOR

#define QS_ESC_XOR   ((uint8_t)0x20)

Escape modifier of the QS output protocol.

Description
The escaped byte is XOR-ed with the escape modifier before it is inserted into the QS buffer.

Definition at line 87 of file qs_pkg.h.

Function Documentation

◆ QS_target_info_()

void QS_target_info_ ( uint8_t  isReset)

send the Target info (object sizes, build time-stamp, QP version)

Definition at line 363 of file qs.c.