Nugget
Bare-metal libraries and examples for the original PlayStation
Loading...
Searching...
No Matches
Macros | Functions
transport.h File Reference
#include <stdint.h>
Include dependency graph for transport.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FRAME_SYNC   0x55AA
 
#define TRANSPORT_OK   0
 
#define TRANSPORT_EBADLEN   (-1) /* payload longer than caller's buffer */
 
#define TRANSPORT_ECKSUM   (-2) /* checksum mismatch */
 
#define TRANSPORT_STREAM_MAX_LEN   (4096 + 16)
 

Functions

void transportInit (void)
 
void transportSendFrame (uint16_t type, const uint16_t *payload, uint16_t len)
 
void transportSendBegin (uint16_t type, uint16_t len)
 
void transportSendWord (uint16_t w)
 
void transportSendEnd (void)
 
int transportTryRate (uint16_t reload, uint16_t pongType, uint16_t pongWord)
 
int transportHasRate (void)
 
int transportRecvFrame (uint16_t *type, uint16_t *payload, uint16_t maxLen, uint16_t *lenOut)
 
void transportRecvBegin (uint16_t *type, uint16_t *len)
 
int transportStopPending (void)
 
uint16_t transportRecvWord (void)
 
int transportRecvEnd (void)
 

Macro Definition Documentation

◆ FRAME_SYNC

#define FRAME_SYNC   0x55AA

◆ TRANSPORT_EBADLEN

#define TRANSPORT_EBADLEN   (-1) /* payload longer than caller's buffer */

◆ TRANSPORT_ECKSUM

#define TRANSPORT_ECKSUM   (-2) /* checksum mismatch */

◆ TRANSPORT_OK

#define TRANSPORT_OK   0

◆ TRANSPORT_STREAM_MAX_LEN

#define TRANSPORT_STREAM_MAX_LEN   (4096 + 16)

Function Documentation

◆ transportHasRate()

int transportHasRate ( void  )

◆ transportInit()

void transportInit ( void  )

◆ transportRecvBegin()

void transportRecvBegin ( uint16_t *  type,
uint16_t *  len 
)

◆ transportRecvEnd()

int transportRecvEnd ( void  )

◆ transportRecvFrame()

int transportRecvFrame ( uint16_t *  type,
uint16_t *  payload,
uint16_t  maxLen,
uint16_t *  lenOut 
)

◆ transportRecvWord()

uint16_t transportRecvWord ( void  )

◆ transportSendBegin()

void transportSendBegin ( uint16_t  type,
uint16_t  len 
)

◆ transportSendEnd()

void transportSendEnd ( void  )

◆ transportSendFrame()

void transportSendFrame ( uint16_t  type,
const uint16_t *  payload,
uint16_t  len 
)

◆ transportSendWord()

void transportSendWord ( uint16_t  w)

◆ transportStopPending()

int transportStopPending ( void  )

◆ transportTryRate()

int transportTryRate ( uint16_t  reload,
uint16_t  pongType,
uint16_t  pongWord 
)