33 #if defined(USE_PIPE0_WRITER) || defined(USE_PIPE0_READER)
37 #ifdef USE_PIPE0_WRITER
41 #ifdef USE_PIPE0_READER
45 #if defined(USE_PIPE1_WRITER) || defined(USE_PIPE1_READER)
49 #ifdef USE_PIPE1_WRITER
53 #ifdef USE_PIPE1_READER
57 #if defined(USE_PIPE2_WRITER) || defined(USE_PIPE2_READER)
61 #ifdef USE_PIPE2_WRITER
65 #ifdef USE_PIPE2_READER
75 p->rx_extract_idx = 0;
77 p->device.periph = (
void *)
p;
97 return available >= len ? available : 0;
111 p->tx_buf[
p->tx_insert_idx] = data;
121 memcpy(&(
p->tx_buf[
p->tx_insert_idx]), data, len);
122 p->tx_insert_idx += len;
int pipe_char_available(struct pipe_periph *p)
Get number of bytes available in receive buffer.
uint8_t pipe_getch(struct pipe_periph *p)
Get the last character from the receive buffer.
void pipe_arch_periph_init(struct pipe_periph *p, char *read_name, char *write_name)
Initialize the PIPE peripheral.
void pipe_send_message(struct pipe_periph *p, long fd)
Send a message.
#define PIPE_TX_BUFFER_SIZE
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
void WEAK pipe_put_byte(struct pipe_periph *p, long fd, uint8_t data)
Add one data byte to the tx buffer.
void pipe_periph_init(struct pipe_periph *p, char *read_name, char *write_name)
Initialize the PIPE peripheral.
void WEAK pipe_put_buffer(struct pipe_periph *p, long fd, const uint8_t *data, uint16_t len)
int WEAK pipe_check_free_space(struct pipe_periph *p, long *fd, uint16_t len)
Check if there is enough free space in the transmit buffer.
arch independent PIPE API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.