33 #if defined(USE_PIPE0_WRITER) || defined(USE_PIPE0_READER)
37 #ifdef USE_PIPE0_WRITER
38 PRINT_CONFIG_VAR(USE_PIPE0_WRITER)
41 #ifdef USE_PIPE0_READER
42 PRINT_CONFIG_VAR(USE_PIPE0_READER)
45 #if defined(USE_PIPE1_WRITER) || defined(USE_PIPE1_READER)
49 #ifdef USE_PIPE1_WRITER
50 PRINT_CONFIG_VAR(USE_PIPE1_WRITER)
53 #ifdef USE_PIPE1_READER
54 PRINT_CONFIG_VAR(USE_PIPE1_READER)
57 #if defined(USE_PIPE2_WRITER) || defined(USE_PIPE2_READER)
61 #ifdef USE_PIPE2_WRITER
62 PRINT_CONFIG_VAR(USE_PIPE2_WRITER)
65 #ifdef USE_PIPE2_READER
66 PRINT_CONFIG_VAR(USE_PIPE2_READER)
77 p->
device.periph = (
void *)p;
97 return available >= len ? available : 0;
arch independent PIPE API
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.
int pipe_char_available(struct pipe_periph *p)
Get number of bytes available in receive buffer.
void pipe_arch_periph_init(struct pipe_periph *p, char *read_name, char *write_name)
Initialize the PIPE peripheral.
#define PIPE_TX_BUFFER_SIZE
void WEAK pipe_put_buffer(struct pipe_periph *p, long fd, const uint8_t *data, uint16_t len)
void pipe_periph_init(struct pipe_periph *p, char *read_name, char *write_name)
Initialize the PIPE peripheral.
uint8_t tx_buf[PIPE_TX_BUFFER_SIZE]
Transmit buffer.
struct link_device device
Generic device interface.
uint8_t pipe_getch(struct pipe_periph *p)
Get the last character from the receive buffer.
void pipe_send_message(struct pipe_periph *p, long fd)
Send a message.
void WEAK pipe_put_byte(struct pipe_periph *p, long fd, uint8_t data)
Add one data byte to the tx buffer.