You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
693 B
32 lines
693 B
#include "sequentalIOps.h"
|
|
|
|
sequentalSerial::sequentalSerial( uint32_t dbID ):hardwareResourceSerialProvider( dbID ){
|
|
m_pCurrentIO = NULL;
|
|
};
|
|
|
|
sequentalSerial::~sequentalSerial(){
|
|
m_pCurrentIO = NULL;
|
|
};
|
|
|
|
IO_Sequence *sequentalSerial::fetchIO(){
|
|
m_mCurrentIO.lock();
|
|
if( m_qIOQ.size ){
|
|
m_pCurrentIO = m_qIOQ.front();
|
|
m_qIOQ.pop();
|
|
} else m_pCurrentIO = NULL;
|
|
m_mCurrentIO.unlock();
|
|
retrun m_pCurrentIO;
|
|
};
|
|
|
|
bool sequentalSerial::sendData( uint8_t *Data, size_t DataSize ){
|
|
IO_Sequence *tData = new IO_Sequence();
|
|
if( tData ){
|
|
m_qIOQ.push( tData );
|
|
return true;
|
|
};
|
|
return false;
|
|
};
|
|
|
|
bool sequentalSerial::receiveData( IO_Sequence *ptr ){
|
|
|
|
};
|