Il y avait des problèmes dans la libraire...
Fork of ST_I2S by
Diff: drivers/I2S.h
- Revision:
- 17:7a4a4631672c
- Parent:
- 16:04e1abb4cca3
- Child:
- 19:ef6ef1795e30
--- a/drivers/I2S.h Wed Jan 25 13:56:15 2017 +0100 +++ b/drivers/I2S.h Thu Jan 26 10:37:27 2017 +0100 @@ -17,8 +17,6 @@ #include "events/EventQueue.h" -namespace mbed { - /** A I2S Master/Slave, used for communicating with I2S slave/master devices * * The default format is set to master transmission mode, one-shot (i.e. not circular) @@ -103,7 +101,7 @@ * -1 if I2S peripheral is busy (or out of resources) */ template<typename Type> - int transfer(const Type *tx_buffer, int tx_length, Type *rx_buffer, int rx_length, const event_callback_t& callback, int event) { + int transfer(const Type *tx_buffer, int tx_length, Type *rx_buffer, int rx_length, const mbed::event_callback_t& callback, int event) { int ret = 0; lock(); @@ -195,23 +193,23 @@ * @return Zero if a transfer was added to the queue, or -1 if the queue is full */ int queue_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, - const event_callback_t& callback, int event); + const mbed::event_callback_t& callback, int event); /** Configures a callback, i2s peripheral and initiate a new transfer * * @param data Transaction data */ void start_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, - const event_callback_t& callback, int event); + const mbed::event_callback_t& callback, int event); class I2sBhHandler { friend class I2S; - static void i2s_defer_function(const event_callback_t& bottom_half, int event) { + static void i2s_defer_function(const mbed::event_callback_t& bottom_half, int event) { i2s_bh_queue.call(bottom_half, event); } - static void i2s_defer_function(const Callback<void()>& bottom_half) { + static void i2s_defer_function(const mbed::Callback<void()>& bottom_half) { i2s_bh_queue.call(bottom_half); } }; @@ -221,14 +219,14 @@ * * @param data Transaction data */ - void start_transaction(transaction_t *data); + void start_transaction(mbed::transaction_t *data); /** Dequeue a transaction * */ void dequeue_transaction(); - CircularBuffer<Transaction<I2S>, TRANSACTION_QUEUE_SIZE_I2S> _transaction_buffer; + mbed::CircularBuffer<mbed::Transaction<I2S>, TRANSACTION_QUEUE_SIZE_I2S> _transaction_buffer; #endif // TRANSACTION_QUEUE_SIZE_I2S public: @@ -243,7 +241,7 @@ CThunk<I2S> _irq_tx; CThunk<I2S> _irq_rx; - event_callback_t _callback; + mbed::event_callback_t _callback; i2s_dma_prio_t _priority; // DMA priority void acquire(void); @@ -260,8 +258,6 @@ unsigned int _hz; }; -} // namespace mbed +#endif // DEVICE_I2S -#endif - -#endif +#endif // MBED_I2S_H