Skip to content

Commit

Permalink
Version 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Jun 7, 2020
1 parent c38aa07 commit 3e5c560
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Available as Arduino library "IRMP"
### [Version 2.2.0](https://github.com/ukw100/IRMP/releases)

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Commits since latest](https://img.shields.io/github/commits-since/ukw100/irmp/latest)](https://github.com/ukw100/irmp/commits/master)
[![Build Status](https://github.com/ukw100/irmp/workflows/LibraryBuild/badge.svg)](https://github.com/ukw100/irmp/actions)
[![Hit Counter](https://hitcounter.pythonanywhere.com/count/tag.svg?url=https%3A%2F%2Fgithub.com%2Fukw100%2FIRMP)](https://github.com/brentvollebregt/hit-counter)

Expand Down Expand Up @@ -131,6 +132,12 @@ The **tone() library is still available**. You can use it alternating with IR re


# Revision History
### Version 2.2.1
- Improved pin layout.
- Fixed bug with stm32duino 1.9.
- Version number.
- Blink13 -> LEDFeedback.

### Version 2.2.0
- Supported **Apollo3** platform.
- Fixed DigisparkPro bug.
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/ukw100/IRMP"
},
"version": "2.0.0",
"version": "2.2.1",
"exclude": "pictures",
"authors": [
{
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=IRMP
version=2.2.0
version=2.2.1
author=Frank Meyer, Armin Joachimsmeyer
maintainer=Armin Joachimsmeyer <[email protected]>, [email protected]
sentence=Receive and Send infrared signals from your remote<br/>
paragraph=Supports <b>50 different IR protocols</b>. <b>Small footprint</b>. Can receive <b>40 protocols concurrently</b>.<br/>Supports ATTinyCore as well as Digispark and Digispark Pro boards.<br/>Receive and send can be used in the same sketch.<br/>For a short comparison of IR libraries, see <a href="https://github.com/ukw100/IRMP#quick-comparison-of-4-arduino-ir-receiving-libraries">GitHub README</a>
paragraph=Supports <b>50 different IR protocols</b>. <b>Small footprint</b>. Can receive <b>40 protocols concurrently</b>.<br/>Supports ATTinyCore as well as Digispark and Digispark Pro boards.<br/>Receive and send can be used in the same sketch.<br/>For a short comparison of IR libraries, see <a href="https://github.com/ukw100/IRMP#quick-comparison-of-4-arduino-ir-receiving-libraries">GitHub README</a><br/><br/><b>New:<b>Minor improvements.
category=Signal Input/Output
url=https://github.com/ukw100/IRMP
architectures=avr,esp8266,esp32,STM32,stm32,stm32duino,samd,apollo3
16 changes: 5 additions & 11 deletions src/IRTimer.cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ timer1_enable(TIM_DIV16, TIM_EDGE, TIM_LOOP);
timer1_write((F_CPU / 16) / IR_INTERRUPT_FREQUENCY);

#elif defined(ESP32)
// Use Timer1 with 1 microsecond resolution
// Use Timer1 with 1 microsecond resolution, main clock is 80MHZ
sESP32Timer = timerBegin(1, 80, true);
timerAttachInterrupt(sESP32Timer, irmp_timer_ISR, true);
timerAlarmWrite(sESP32Timer, (getApbFrequency() / 80) / IR_INTERRUPT_FREQUENCY, true);
Expand Down Expand Up @@ -193,22 +193,16 @@ sSTM32Timer.refresh(); // Set the timer's count to 0 and update the prescaler an

#elif defined(ARDUINO_ARCH_SAMD)
REG_GCLK_CLKCTRL = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID_TCC2_TC3); // GCLK1=32kHz, GCLK0=48Mhz
while ( GCLK->STATUS.bit.SYNCBUSY == 1 ); // wait for sync
// while (GCLK->STATUS.bit.SYNCBUSY) // not required to wait
// ;

TcCount16* TC = (TcCount16*) TC3;

TC->CTRLA.reg &= ~TC_CTRLA_ENABLE; // Enable write access to CTRLA register
while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync

TC->CTRLA.reg |= TC_CTRLA_MODE_COUNT16; // Set Timer counter Mode to 16 bits
while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync
TC->CTRLA.reg |= TC_CTRLA_WAVEGEN_MFRQ;// Use match mode so that the timer counter resets when the count matches the compare register
while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync
TC->CTRLA.reg |= TC_CTRLA_PRESCALER_DIV1;
while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync

// Set Timer counter Mode to 16 bits, use match mode so that the timer counter resets when the count matches the compare register
//TC->CTRLA.reg |= TC_CTRLA_MODE_COUNT16 | TC_CTRLA_WAVEGEN_MFRQ |TC_CTRLA_PRESCALER_DIV1;
TC->CTRLA.reg |= TC_CTRLA_MODE_COUNT16 | TC_CTRLA_WAVEGEN_MFRQ |TC_CTRLA_PRESCALER_DIV1;

TC->CC[0].reg = (uint16_t) ((F_CPU / IR_INTERRUPT_FREQUENCY)- 1); // ((48Mhz / sampleRate) - 1);

Expand All @@ -219,7 +213,7 @@ TC->INTENSET.bit.MC0 = 1;
NVIC_EnableIRQ (TC3_IRQn);

TC->CTRLA.reg |= TC_CTRLA_ENABLE;
while (TC->STATUS.bit.SYNCBUSY == 1); // wait for sync (max 6 clocks?)
// while (TC5->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY); // Not required to wait at end of function

#elif defined(ARDUINO_ARCH_APOLLO3)
// Use Timer 3 segment B
Expand Down

0 comments on commit 3e5c560

Please sign in to comment.