kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
Add free() function to memory pool to get number of free chunks.
rodzic
175f005427
commit
dd48ad5b0e
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "HdlcFrame.hpp"
|
||||
#include "Log.h"
|
||||
#include "main.h"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
namespace mobilinkd { namespace tnc { namespace hdlc {
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
DATA = 0, TX_DELAY, P_PERSIST, SLOT_TIME, TX_TAIL, DUPLEX, HARDWARE,
|
||||
TEXT, LOG};
|
||||
|
||||
enum Source { RF_DATA = 0x80 };
|
||||
enum Source { RF_DATA = 0x80, BERT = 0x30, STREAM = 0x20, PACKET = 0x10 };
|
||||
|
||||
private:
|
||||
data_type data_;
|
||||
|
|
|
@ -65,6 +65,8 @@ struct Pool {
|
|||
free_list.push_back(*item);
|
||||
taskEXIT_CRITICAL_FROM_ISR(x);
|
||||
}
|
||||
|
||||
size_t free() const { return free_list.size(); }
|
||||
};
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue