mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-27 20:59:37 +00:00
refactor
This commit is contained in:
@ -34,18 +34,7 @@ class IR_DecoderRaw : virtual public IR_FOX
|
||||
protected:
|
||||
PackInfo packInfo;
|
||||
IR_Encoder *encoder; // Указатель на парный передатчик
|
||||
bool availableRaw()
|
||||
{
|
||||
if (isAvailable)
|
||||
{
|
||||
isAvailable = false;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
bool availableRaw();
|
||||
|
||||
public:
|
||||
const uint8_t isrPin; // Пин прерывания
|
||||
@ -59,18 +48,10 @@ public:
|
||||
|
||||
void isr(); // Функция прерывания
|
||||
void tick(); // Обработка приёмника, необходима для работы
|
||||
void tickOld();
|
||||
|
||||
bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился
|
||||
bool isSubOverflow()
|
||||
{
|
||||
|
||||
// noInterrupts();
|
||||
volatile bool ret = isSubBufferOverflow;
|
||||
// interrupts();
|
||||
return ret;
|
||||
};
|
||||
bool isReciving() { return isBufferOverflow; }; // Возвращает true, если происходит приём пакета
|
||||
inline bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился
|
||||
bool isSubOverflow();
|
||||
inline bool isReciving() { return isBufferOverflow; }; // Возвращает true, если происходит приём пакета
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
private:
|
||||
@ -150,7 +131,8 @@ private:
|
||||
/// @return Результат
|
||||
uint16_t ceil_div(uint16_t val, uint16_t divider);
|
||||
|
||||
#if true //def IRDEBUG
|
||||
#ifdef IRDEBUG
|
||||
uint32_t wrCounter;
|
||||
inline void errPulse(uint8_t pin, uint8_t count);
|
||||
inline void infoPulse(uint8_t pin, uint8_t count);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user