mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-27 20:59:37 +00:00
STM First Test
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
#pragma once
|
||||
#include "IR_config.h"
|
||||
|
||||
// #define IRDEBUG
|
||||
#define IRDEBUG
|
||||
|
||||
#ifdef IRDEBUG
|
||||
#define wrHigh A3 // Запись HIGH инициирована // green
|
||||
#define wrLow A3 // Запись LOW инициирована // blue
|
||||
#define writeOp 13 // Операция записи, 1 пульс для 0 и 2 для 1 // orange
|
||||
#define wrHigh PA1 // Запись HIGH инициирована // green
|
||||
#define wrLow PA0 // Запись LOW инициирована // blue
|
||||
#define writeOp PA5 // Операция записи, 1 пульс для 0 и 2 для 1 // orange
|
||||
// Исправленные ошибки // purle
|
||||
// 1 пульс: fix
|
||||
#define errOut A3
|
||||
#define errOut PA4
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -58,10 +58,10 @@ public:
|
||||
bool isOverflow() { return isBufferOverflow; }; // Буффер переполнился
|
||||
bool isSubOverflow()
|
||||
{
|
||||
uint8_t oldSREG = SREG;
|
||||
cli();
|
||||
|
||||
// noInterrupts();
|
||||
volatile bool ret = isSubBufferOverflow;
|
||||
SREG = oldSREG;
|
||||
// interrupts();
|
||||
return ret;
|
||||
};
|
||||
bool isReciving() { return isBufferOverflow; }; // Возвращает true, если происходит приём пакета
|
||||
|
Reference in New Issue
Block a user