AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches

Data buffer for outgoing frames. More...

#include <sci_internal_types.h>

Collaboration diagram for sci_frame_t:

Data Fields

uint8_t * WrPtr
 
uint8_t * RdPtr
 
uint8_t * Buffer
 
struct sci_frame_tNext
 

Detailed Description

Data buffer for outgoing frames.


A frame needs to be initialize with an data buffer and read/write pointers equal to zero. Status of the frame can be determined by the following conditions:

  • Idle: WrPtr == 0 && RdPtr == 0
  • Write/Read: WrPtr != 0 (|| RdPtr == 0)

The total amount of stored data is given by (size_t)(WrPtr - Buffer) The amount that is still to read is given by (size_t)(WrPtr - RdPtr)

Idle:
Buffer: 0000000000000000
Write: | (0x00)
Read: | (0x00)
Write:
Buffer: xxxxxxxx00000000
Write: |
Read: | (&Buffer)
Read:
Buffer: 0000xxxxxxxx0000
Write: |
Read: |
(0 = empty; x = full)
uint8_t * Buffer
Definition sci_internal_types.h:118

In order to accomplish flexible frame length, the frames might link to another frame which will be sent right after the current one has completely sent.

Field Documentation

◆ Buffer

uint8_t* sci_frame_t::Buffer

Data buffer.

◆ Next

struct sci_frame_t* sci_frame_t::Next

Pointer to the next frame in the chain.

◆ RdPtr

uint8_t* sci_frame_t::RdPtr

Frame read pointer

◆ WrPtr

uint8_t* sci_frame_t::WrPtr

Frame write pointer


The documentation for this struct was generated from the following file: