You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			399 B
		
	
	
	
		
			C
		
	
			
		
		
	
	
			21 lines
		
	
	
		
			399 B
		
	
	
	
		
			C
		
	
| #ifndef _FIFO_H_
 | |
| #define _FIFO_H_
 | |
| 
 | |
| #include <avr/io.h>
 | |
| 
 | |
| #define FIFO_FAIL     0
 | |
| #define FIFO_SUCCESS  1
 | |
| 
 | |
| #define FIFO_SIZE 128
 | |
| 
 | |
| typedef struct {
 | |
|   uint8_t data[FIFO_SIZE];
 | |
|   uint8_t read; // zeigt auf das Feld mit dem ältesten Inhalt
 | |
|   uint8_t write; // zeigt immer auf leeres Feld
 | |
| } Fifo_t;
 | |
| 
 | |
| uint8_t fifo_push(Fifo_t * fifo, uint8_t byte);
 | |
| uint8_t fifo_pop(Fifo_t * fifo, uint8_t *pByte);
 | |
| 
 | |
| #endif
 |