Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Data Structures | |
union | mipi_stp_decoder_data |
Union with data associated with a given STP opcode. More... | |
struct | mipi_stp_decoder_config |
Decoder configuration. More... | |
Macros | |
#define | STP_DECODER_TYPE2STR(_type) |
Convert type to a string literal. | |
Typedefs | |
typedef void(* | mipi_stp_decoder_cb) (enum mipi_stp_decoder_ctrl_type type, union mipi_stp_decoder_data data, uint64_t *ts, bool marked) |
Callback signature. | |
Enumerations | |
enum | mipi_stp_decoder_ctrl_type { STP_DATA4 = 1 , STP_DATA8 = 2 , STP_DATA16 = 4 , STP_DATA32 = 8 , STP_DATA64 = 16 , STP_DECODER_NULL = 128 , STP_DECODER_MASTER , STP_DECODER_MERROR , STP_DECODER_CHANNEL , STP_DECODER_VERSION , STP_DECODER_FREQ , STP_DECODER_GERROR , STP_DECODER_FLAG , STP_DECODER_ASYNC , STP_DECODER_NOT_SUPPORTED } |
STPv2 opcodes. More... | |
Functions | |
int | mipi_stp_decoder_init (const struct mipi_stp_decoder_config *config) |
Initialize the decoder. | |
int | mipi_stp_decoder_decode (const uint8_t *data, size_t len) |
Decode STPv2 stream. | |
void | mipi_stp_decoder_sync_loss (void) |
Indicate synchronization loss. | |
#define STP_DECODER_TYPE2STR | ( | _type | ) |
#include <zephyr/debug/mipi_stp_decoder.h>
Convert type to a string literal.
_type | type |
typedef void(* mipi_stp_decoder_cb) (enum mipi_stp_decoder_ctrl_type type, union mipi_stp_decoder_data data, uint64_t *ts, bool marked) |
#include <zephyr/debug/mipi_stp_decoder.h>
Callback signature.
Callback is called whenever an element from STPv2 stream is decoded.
type | Type. See mipi_stp_decoder_ctrl_type. |
data | Data. Data associated with a given type . |
ts | Timestamp. Present if not NULL. |
marked | Set to true if opcode was marked. |
#include <zephyr/debug/mipi_stp_decoder.h>
STPv2 opcodes.
#include <zephyr/debug/mipi_stp_decoder.h>
Decode STPv2 stream.
Function decodes the stream and calls the callback for every decoded element.
data | Data. |
len | Data length. |
0 | On successful decoding. |
negative | On failure. |
int mipi_stp_decoder_init | ( | const struct mipi_stp_decoder_config * | config | ) |
#include <zephyr/debug/mipi_stp_decoder.h>
Initialize the decoder.
config | Configuration. |
0 | On successful initialization. |
negative | On failure. |
void mipi_stp_decoder_sync_loss | ( | void | ) |
#include <zephyr/debug/mipi_stp_decoder.h>
Indicate synchronization loss.
If detected, then decoder starts to look for ASYNC marker and drops all data until ASYNC is found. Synchronization can be lost when there is data loss (e.g. due to overflow).