Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 7 months ago.
Identifier "event_callback_t"is undefined "event_callback_t callback;/**<User's callback*/"
- ifndef MBED_TRANSACTION_H
- define MBED_TRANSACTION_H
- include "platform/platform.h"
- include "platform/FunctionPointer.h"
namespace mbed { typedef struct { void *tx_buffer; /< Tx buffer */ size_t tx_length; /< Length of Tx buffer*/ void *rx_buffer; /< Rx buffer */ size_t rx_length; /< Length of Rx buffer */ uint32_t event; /< Event for a transaction */ event_callback_t callback; /< User's callback */ uint8_t width; /< Buffer's word width (8, 16, 32, 64) */ } transaction_t;
template<typename Class> class Transaction { public: Transaction(Class *tpointer, const transaction_t& transaction) : _obj(tpointer), _data(transaction) { }
Transaction() : _obj(), _data() { }
Transaction() { }
Class* get_object() { return _obj; }
transaction_t* get_transaction() { return &_data; }
private: Class* _obj; transaction_t _data; };
}
- endif
What's the matter? Your anwser are thanks.