refractor include chain with following policies

- header file only include what it needs for its declarations.
This commit is contained in:
hathach
2013-02-04 13:13:07 +07:00
parent 5ec56120e6
commit a5b29c5d33
11 changed files with 35 additions and 19 deletions

View File

@@ -66,10 +66,10 @@ typedef struct _fifo_t
volatile uint16_t wr_ptr ; ///< write pointer
volatile uint16_t rd_ptr ; ///< read pointer
bool overwritable ; ///< allow overwrite data when full
IRQn_Type irq ; ///< TODO (abstract later) interrupt used to lock fifo
// IRQn_Type irq ; ///< TODO (abstract later) interrupt used to lock fifo
} fifo_t;
bool fifo_init(fifo_t* f, uint8_t* buffer, uint16_t size, bool overwritable, IRQn_Type irq);
bool fifo_init(fifo_t* f, uint8_t* buffer, uint16_t size, bool overwritable); //, IRQn_Type irq);
bool fifo_write(fifo_t* f, uint8_t data);
bool fifo_read(fifo_t* f, uint8_t *data);
uint16_t fifo_read_n(fifo_t* f, uint8_t * rx, uint16_t maxlen);