ISR -> userspace pipe.  
More...
ISR -> userspace pipe. 
◆ ISRPIPE_INIT
      
        
          | #define ISRPIPE_INIT | 
          ( | 
            | 
          buf | ) | 
           | 
        
      
 
Value:
#define MUTEX_INIT_LOCKED
Static initializer for mutex_t with a locked mutex.
 
#define TSRB_INIT(BUF)
Static initializer.
 
 
Static initializer for irspipe. 
- Note
 - The size of the buffer (
sizeof(@p buf)) must be a power of two. 
- Parameters
 - 
  
    | [in] | buf | buffer to use as ringbuffer  | 
  
   
Definition at line 48 of file isrpipe.h.
 
 
◆ isrpipe_init()
      
        
          | void isrpipe_init  | 
          ( | 
          isrpipe_t *  | 
          isrpipe,  | 
        
        
           | 
           | 
          uint8_t *  | 
          buf,  | 
        
        
           | 
           | 
          size_t  | 
          bufsize  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Initialisation function for isrpipe. 
- Note
 - The size of the buffer (
bufsize) must be a power of two. 
- Parameters
 - 
  
    | [in] | isrpipe | isrpipe object to initialize  | 
    | [in] | buf | buffer to use as ringbuffer  | 
    | [in] | bufsize | size of buf  | 
  
   
 
 
◆ isrpipe_read()
      
        
          | int isrpipe_read  | 
          ( | 
          isrpipe_t *  | 
          isrpipe,  | 
        
        
           | 
           | 
          uint8_t *  | 
          buf,  | 
        
        
           | 
           | 
          size_t  | 
          count  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Read data from isrpipe (blocking) 
- Parameters
 - 
  
    | [in] | isrpipe | isrpipe object to operate on  | 
    | [in] | buf | buffer to write to  | 
    | [in] | count | number of bytes to read | 
  
   
- Returns
 - number of bytes read 
 
 
 
◆ isrpipe_write()
      
        
          | int isrpipe_write  | 
          ( | 
          isrpipe_t *  | 
          isrpipe,  | 
        
        
           | 
           | 
          const uint8_t *  | 
          buf,  | 
        
        
           | 
           | 
          size_t  | 
          n  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Put number of bytes into the isrpipe's buffer. 
- Parameters
 - 
  
    | [in] | isrpipe | isrpipe object to operate on  | 
    | [in] | buf | bytes to add to isrpipe buffer  | 
    | [in] | n | number of bytes to add from buf to isrpipe's buffer | 
  
   
- Returns
 - number of bytes that could be added 
 
- 
-1 if buffer was full 
 
 
 
◆ isrpipe_write_one()
      
        
          | int isrpipe_write_one  | 
          ( | 
          isrpipe_t *  | 
          isrpipe,  | 
        
        
           | 
           | 
          uint8_t  | 
          c  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Put one byte into the isrpipe's buffer. 
- Parameters
 - 
  
    | [in] | isrpipe | isrpipe object to operate on  | 
    | [in] | c | byte to add to isrpipe buffer | 
  
   
- Returns
 - 0 if byte could be added 
 
- 
-1 if buffer was full