Skip to content
Snippets Groups Projects
Commit e9a5ebea authored by Edward Longman's avatar Edward Longman
Browse files

Merge branch 'pin-change-int-adaption'

parents e3e46b16 ecbbec4e
No related branches found
No related tags found
No related merge requests found
...@@ -138,6 +138,10 @@ void rfm12_poll(void) ...@@ -138,6 +138,10 @@ void rfm12_poll(void)
ISR(RFM12_INT_VECT, ISR_NOBLOCK) ISR(RFM12_INT_VECT, ISR_NOBLOCK)
#endif #endif
{ {
#ifdef USE_INT_PIN_CHECK
uint8_t interrupt_high_inactive = nIRQ_PIN & _BV(BIT_nIRQ); // Masked input of interrupt pin for PCINT
if(interrupt_high_inactive)return;
#endif
RFM12_INT_OFF(); RFM12_INT_OFF();
uint8_t status; uint8_t status;
uint8_t recheck_interrupt = 1; uint8_t recheck_interrupt = 1;
......
...@@ -119,6 +119,12 @@ ...@@ -119,6 +119,12 @@
//the interrupt vector //the interrupt vector
#define RFM12_INT_VECT (INT1_vect) #define RFM12_INT_VECT (INT1_vect)
//The interrupt pin and pin mask details (needed for pin change interrupt)
// #define USE_INT_PIN_CHECK
// #define nIRQ_PORT PORTB
// #define nIRQ_PIN PINB
// #define BIT_nIRQ 1
//the interrupt mask register //the interrupt mask register
#define RFM12_INT_MSK GICR #define RFM12_INT_MSK GICR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment