123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef ZEPHYR_INCLUDE_SYS_MPSC_PACKET_H_
- #define ZEPHYR_INCLUDE_SYS_MPSC_PACKET_H_
- #include <string.h>
- #include <stdint.h>
- #include <stdbool.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define MPSC_PBUF_HDR_BITS 2
- #define MPSC_PBUF_HDR \
- uint32_t valid: 1; \
- uint32_t busy: 1
- struct mpsc_pbuf_hdr {
- MPSC_PBUF_HDR;
- uint32_t data: 32 - MPSC_PBUF_HDR_BITS;
- };
- struct mpsc_pbuf_skip {
- MPSC_PBUF_HDR;
- uint32_t len: 32 - MPSC_PBUF_HDR_BITS;
- };
- union mpsc_pbuf_generic {
- struct mpsc_pbuf_hdr hdr;
- struct mpsc_pbuf_skip skip;
- uint32_t raw;
- };
- #ifdef __cplusplus
- }
- #endif
- #endif
|